Model 2657A High Power System SourceMeter® Instrument Reference Manual
Section 6: Instrument programming
2657A-901-01 Rev. B/December 2012
6-59
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, see
(on page 7-371).
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
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 as a way to coordinate activities.
Nodes that are running test scripts at the same time can store data in the data queue for real-time
communication. Each Model 2657A 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.
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 completely separate copy of
the data in the original table, with no references to the original table or any subtables.
You can retrieve data from the data queue from any node at any time using remote commands. See
the
dataqueue
commands in the
(on page 7-1) for more information.
Summary of Contents for 2657A
Page 3: ......