Keithley 2450 Reference Manual page 175

Interactive sourcemeter instrument
Table of Contents

Advertisement

Section 3: Functions and features
Using TSP commands:
A reading buffer is based on a Lua table. When you use TSP commands, the measurements
themselves are accessed by ordinary array notation. If rb is a reading buffer, the first measurement is
accessed as rb[1], the ninth measurement as rb[9], and so on. The additional information in the
table is accessed as additional members of the table.
To access a buffer, include the buffer name in the respective command. For example, the following
commands return five readings (including the measurement, source value, and relative time) from a
user-defined buffer named testData:
-- Create a buffer named testData to store 100 readings.
testData = buffer.make(100)
-- Set the instrument to make 5 readings and store them in the buffer.
trigger.model.load("SimpleLoop", 5, 0, testData)
-- Make the readings
trigger.model.initiate()
waitcomplete()
-- Read the 5 readings and print them including the measurement, source value, and
relative time for each reading.
printbuffer(1, 5, testData.readings,
testData.sourcevalues,testData.relativetimestamps)
Buffer read-only attributes
Use buffer read-only attributes to access the information contained in an existing buffer.
Using SCPI commands:
The following attributes are available for each reading buffer.
Attribute
:TRACe:ACTual?
:TRACe:DATA
:TRACe:STATistics:AVERage
:TRACe:STATistics:MAXimum?
:TRACe:STATistics:MINimum?
:TRACe:STATistics:PK2Pk?
:TRACe:STATistics:STDDev?
3-30
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Description
This attribute contains the number of readings in the specified
buffer. See
:TRACe:ACTual?
This attribute contains the readings stored in a specified
reading buffer. See
.:TRACe:DATA?
This command returns average of all readings added to the
buffer. See
:TRACe:STATistics:AVERage?
This command returns the maximum reading value added to
the buffer. See
:TRACe:STATistics:MAXimum?
121)
This command returns the minimum reading value added to
the buffer.
:TRACe:STATistics:MINimum?
This command returns the peak-to-peak value of all readings
(samples) added to the buffer. See
:TRACe:STATistics:PK2Pk?
This command returns the standard deviation of all readings
(samples) added to the buffer. See
:TRACe:STATistics:STDDev?
(on page 6-107)
(on page 6-109).
(on page 6-119)
(on page 6-
(on page 6-121)
(on page 6-122).
(on page 6-123).
2450-901-01 Rev. B/September 2013

Advertisement

Table of Contents
loading

Table of Contents