next up previous contents index
Next: Labrf Property: Property Number Up: Device Properties Set By Previous: Mutual Property: Property Number   Contents   Index


Branch Property: Property Number 15

The branch property is used to define a ``hot spot'' that when clicked on yields a device parameter, such as device current, which can be used in plots. In SPICE, voltage sources and inductors have internal storage for current values present by default. Other device parameters may require additional computational or storage overhead. If the branch property is given in the device definition in the device library file, it is added to instantiated devices by Xic.
5 15 x y dx dy [string];

The x and y values specify the hot spot where the branch current can be accessed by clicking. The next two numbers specify the assumed direction of current flow. They are interpreted as a unit vector directed outward from the origin along the + / - x or y axes. Thus,

direction dx dy
+y 0 1
-y 0 -1
+x 1 0
-x -1 0
are the options. The string will be expanded and added to the token list in the prompt line when the branch is selected for plotting.

When the hot spot is clicked on, an expression will be produced which after expansion is added to the input line in the plot command. The string token can contain the following literal tokens, which will be replaced with the appropriate values during expansion:

<v> Voltage across the device
<value> The ``value'' property
<name> The device name

Anything else in the string will be copied literally. If the string is absent, the expression will be ``<name>#branch''.

Here are some examples. for a resistor, the string is

<v>/<value>
to return the current. Similarly for a capacitor,
<value>*deriv(<v>).
Thus the current will be computed using the WRspice deriv function. For an inductor or voltage source, no string is required, as the default
<name>#branch
is appropriate. For a current source, one can use
@<name>[c].
This works through the WRspice @device[param] mechanism, however the vector must be saved, most conveniently by setting the LibSave global property for the device (see A.6).


next up previous contents index
Next: Labrf Property: Property Number Up: Device Properties Set By Previous: Mutual Property: Property Number   Contents   Index
Stephen R. Whiteley 2012-04-01