Section 6: Instrument programming
Models 707B and 708B Switching Matrix Reference Manual
6-50
707B-901-01 Rev. B / January 2015
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
(on page 6-51) for more information.
Coordinating overlapped operations in remote groups
All overlapped operations on all nodes in a group must have completed before the master node can
send a command to the group. If you send a command to a node in a remote group when an
overlapped operation is running on any node in that group, errors will occur.
You can execute the
waitcomplete()
command on the master node or group leader to wait for
overlapped operations. The action of
waitcomplete()
depends on the parameters specified.
If you want to wait for completion of overlapped operations for:
•
All nodes in the local group:
Use
waitcomplete()
without a parameter from the master node
or group leader.
•
A specific group:
Use
waitcomplete(
N
)
with a group number as the parameter from the
master node. This option is not available for group leaders.
•
All nodes in the system:
Use
waitcomplete(0)
from the master node. This option is not
available for group leaders.
For additional information, refer to
(on page 7-242).
The following code shows two examples of using the
waitcomplete()
command from the master
node:
-- Wait for each node in group
N
to complete all overlapped operations.
waitcomplete(
N
)
-- Wait for all groups on the TSP-Link network to complete overlapped operations.
waitcomplete(0)