Using The Data Queue For Real-Time Communication; Copying Test Scripts Across The Tsp-Link Network - Keithley 2651A Reference Manual

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual
The 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 send the waitcomplete() command:
-- Waits for all nodes in a 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. You can use the data queue to retrieve
data from any node in a group performing an overlapped operation. In addition, the master node and
the group leaders can use the data queue as a way to coordinate activities.
The data queue uses the first-in, first-out (FIFO) structure to store data. Nodes running test scripts in
parallel can store data in the data queue for real-time communication. Each Model 2651A has an
internal data queue. You can access the data queue from any node at any time.
You can use the data queue to post numeric values, strings, and tables. Tables in the data queue
consume one entry. A new copy of the table is created when the table is retrieved from the data
queue. The copy of the table does not contain any references to the original table or any subtables.
To add or retrieve values from the data queue and view the capacity, see the
(see "Commands" on page 7-8).

Copying test scripts across the TSP-Link network

To run a large script on a remote node, it is recommended that you copy the test script to the remote
node to increase the speed of test script initiation.
Use the code below to copy test scripts across the TSP-Link
of a script on the remote node with the same name.
Note the following:
Replace N with the number of the node that receives a copy of the script
Replace scriptName with the name of the script that you want to copy from the local node
-- Adds the source code from scriptName to the data queue.
node[N].dataqueue.add(scriptName.source)
-- Creates a new script on the remote node
-- using the source code from scriptName.
node[N].execute(scriptName.name ..
"= script.new(dataqueue.next(), [[" .. scriptName.name .. "]])")
2651A-901-01 Rev. A / March 2011
Section 6: Instrument programming
Command reference
®
network. This example creates a copy
6-59

Advertisement

Table of Contents
loading

Table of Contents