Copying Test Scripts Across The Tsp-Link Network; Removing Stale Values From The Reading Buffer - Keithley 708B Reference Manual

Switching matrix
Hide thumbs Also See for 708B:
Table of Contents

Advertisement

Section 6: Instrument programming

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 network. This example creates a copy 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 .. "]])")

Removing stale values from the reading buffer

The node that acquires the data stores the data for the reading buffer. To optimize data access, all
nodes can cache data from the node that stores the reading buffer data.
Running Lua code remotely can return stale values from the reading buffer to the cached data. If the
values in the reading buffer change while the Lua code runs remotely, another node can hold stale
values. Use the clearcache command to clear the cache.
The following code demonstrates how stale values occur and how to use the clearcache command
to clear the cache.
Note the following:
Replace N with the node number
Replace G with the group number
-- Creates a reading buffer on a node in a remote group.
node[N].tsplink.group = G
node[N].execute("rbremote = dmm.makebuffer(20)" ..
-- Creates a variable on the local node to
-- access the reading buffer.
rblocal = node[N].getglobal("rbremote")
-- Access data from the reading buffer.
print(rblocal[1])
6-54
"dmm.measure.count = 20
"dmm.measure(rbremote)")
Models 707B and 708B Switching Matrix Reference Manual
" ..
707B-901-01 Rev. A / August 2010

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

707b

Table of Contents