Section 9: TSP-Link and TSP-Net
2470 High Voltage SourceMeter Instrument Reference Manual
9-10
2470-901-01 Rev. A /
May
2019
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)
A group leader can issue the
waitcomplete()
command to wait for the local group to complete all
overlapped operations.
The following code is an example of how to use the
waitcomplete()
command from a group
leader:
-- Wait for all nodes in the local group to complete all overlapped operations.
waitcomplete()
Using the data queue for real-time communication
Nodes that are running test scripts at the same time can store data in the data queue for real-time
communication. Each instrument has an internal data queue that uses the first-in, first-out (FIFO)
structure to store data. You can use the data queue to post numeric values, strings, and tables.
Use the data queue commands to:
•
Share data between test scripts running in parallel
•
Access data from a remote group or a local node on a TSP-Link
®
network at any time
You cannot access the reading buffers or global variables from any node in a remote group while a
node in that group is performing an overlapped operation. However, you can use the data queue to
retrieve data from any node in a group that is performing an overlapped operation. In addition, the
master node and the group leaders can use the data queue to coordinate activities.
Tables in the data queue consume one entry. When a node stores a table in the data queue, a copy
of the data in the table is made. When the data is retrieved from the data queue, a new table is
created on the node that is retrieving the data. The new table contains a separate copy of the data in
the original table, with no references to the original table or any subtables.
You can access data from the data queue even if a remote group or a node has overlapped
operations in process. See the
dataqueue
commands in the
(on page 14-1)
for more information.
Remote TSP-Link commands
Commands that control and access the TSP-Link
®
synchronization port are summarized in the
following table. See the
(on page 14-1) for complete details on these
commands.