
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Section 3: Functions and features
2450-901-01 Rev. B/September 2013
3-125
Group leader overview
Each group has a dynamic group leader. The last node in a group that performs any operation
initiated by the master node is the group leader.
The group leader:
•
Performs operations initiated by the master node
•
Initiates remote operations on any node with the same group number
•
Cannot initiate remote operations on any node with a different group number
•
Can use the
waitcomplete()
command without a parameter to wait for all overlapped
operations running on nodes in the same group
Assigning groups
Group numbers can range from zero (0) to 64. The default group number is 0. You can change the
group number at any time. You can also add or remove a node to or from a group at any time.
Each time the node's power is turned off, the group number for that node changes to 0.
The following example code dynamically assigns a node to a group:
-- Assign node 3 to group 1.
node[3].tsplink.group = 1
Running test scripts and programs on remote nodes
You can send the
execute()
command from the master node to initiate a test script and Lua code
on a remote node. The
execute()
command places the remote node in the overlapped operation
state. As a test script runs on the remote node, the master node continues to process other
commands simultaneously.
Use the following code to send the
execute()
command for a remote node. The
N
parameter
represents the node number that runs the test script (replace
N
with the node number).
To set the global variable "setpoint" on node N to 2.5:
node[
N
].execute("setpoint = 2.5")
The following code demonstrates how to run a test script that is defined on the local node. For this
example,
scriptVar
is defined on the local node, which is the node that initiates the code to run on
the remote node. The local node must be the master node.
To run scriptVar on node N:
node[
N
].execute(
scriptVar
.source)
The programming example below demonstrates how to run a test script that is defined on a remote
node. For this example,
scriptVar
is defined on the remote node.
To run a script defined on the remote node:
node[
N
].execute("
scriptVar
()")
It is recommended that you copy large scripts to a remote node to improve system performance. See
Copying test scripts across the TSP-Link network for more information.