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,
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.
direction dx dy +y 0 1 -y 0 -1 +x 1 0 -x -1 0
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>#branchis 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.5).