Removing Stale Values From The Reading Buffer; Tsp-Net; Overview - Keithley 2651A Reference Manual

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

Advertisement

Section 6: Instrument programming

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 cause reading buffer data held in the cache to become stale. 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 = smua.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])
-- Runs code on the remote node that updates the reading buffer.
node[N].execute("smua.measure.v(rbremote)")
-- Use the clearcache command if the reading buffer contains cached data.
rblocal.clearcache()
-- If you do not use the clearcache command, the data buffer
-- values will never update. Every time the print command is
-- issued after the first print command, the same data buffer
-- values will print.
print(rblocal[1])

TSP-Net

Overview

The TSP-Net
port. This enables the Model 2651A to communicate directly with a non-TSP
the use of a controlling computer.
6-60
Model 2651A High Power System SourceMeter® Instrument Reference Manual
"smua.measure.count = 20
"smua.measure.v(rbremote)")
®
library allows the Model 2651A to control LAN-enabled devices directly through its LAN
" ..
2651A-901-01 Rev. A / March 2011
®
enabled device without

Advertisement

Table of Contents
loading

Table of Contents