Section 6: Instrument programming
The programming example below illustrates a TSP-Link reset operation and displays its state:
tsplink.reset()
print(tsplink.state)
If the reset operation is successful, online is output to indicate that communications with all nodes
have been established.
Using the expanded system
Accessing nodes
®
A TSP-Link
an entry in this table. Each entry is indexed by the node number of the instrument. The variable
node[N] (where N is the node number) is used to access any node in the system. For example, node
1 is represented as entry node[1] in the node table.
You can access all the remote commands for a specific node by adding node[N]. to the beginning
of the remote command, where N is the node number. For example, to set the NPLC value for the
source-measure unit (SMU) A on node 1 to 0.1, you could send the this command:
node[1].smua.measure.nplc = 0.1
The variable localnode is an alias for node[N], where N is the node number of the node on which
the code is running. For example, if node 1 is running the code, localnode can be used instead of
node[1].
The following programming examples illustrate how to access instruments in the TSP-Link system
(shown in TSP-Link connections):
•
You can use any one of the following three commands to reset SMU A of node 1 (which, in this
example, is the master). The other nodes in the system are not affected.
smua.reset()
localnode.smua.reset()
node[1].smua.reset()
•
The following command will reset SMU A of node 4, which is a subordinate. The other nodes are
not affected.
node[4].smua.reset()
6-52
reset command populates the node table. Each instrument in the system corresponds to
Series 2600B System SourceMeter® Instrument Reference Manual
2600BS-901-01 Rev. B / May 2013