2600AS-901-01 Rev. B / September 2008 Return to Section Topics 19-29
Series 2600A System SourceMeter® Instruments Reference Manual Section 19: Remote Commands
data queue
You can use the data queue commands to share data between test scripts running in parallel and
to access data from a remote group or a local node on a TSP-Link network. You can access data
from the data queue even if a remote group or a local node has overlapped operations in process.
dataqueue.add
Function Adds an entry into the data queue.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage results = dataqueue.add(value)
results = dataqueue.add(value, timeout)
value The data item to add.
timeout The maximum number of seconds to wait for room
in the data queue.
results The resulting value of true or false based on the
success of the add function. Replace the word
results with the name of the variable in which you
want to store the result indicator.
Remarks • You can only use the timeout value while adding data to the local data queue.
• The timeout value is ignored if the data queue is not full.
• The dataqueue.add function returns false if time-out expires before room is available in the
data queue or if the data queue is full and a timeout value is not specified.
• If the value is a table, a duplicate of the table and any subtables is made. The duplicate table
does not contain any references to the original table or to any subtables.
Example dataqueue.add(10)
dataqueue.add(10, 2)
data_added = dataqueue.add(10, 3)
Use the following code to verify data was added to the data queue:
if not data_added then
print(“timeout error”)
end
dataqueue.CAPACITY
Attribute The maximum number of entries that you can store in the data queue.
TSP-Link
accessibility
This attribute can be accessed from a remote TSP-Link node.
Usage capacity = dataqueue.CAPACITY -- Reads dataqueue capacity
dataqueue.CAPACITY = capacity -- Writes dataqueue capacity.
capacity A custom variable that stores the maximum number of
entries in the data queue.
Remarks A read only attribute.
Example print(dataqueue.CAPACITY)