Models 707B and 708B Switching Matrix Reference Manual
Section 7: TSP command reference
707B-901-01 Rev. B / January 2015
7-133
Details
If
startIndex
is set to less than 1 or if
endIndex
is more than the size of the index, 9.37
is returned for each value outside the allowed index and an event is generated.
If overlapped commands use the specified reading buffers and the commands are not complete (at
least to the specified index), this function outputs data as it becomes available.
When there are outstanding overlapped commands to acquire data,
n
refers to the index that the last
entry in the table has after all the readings have completed.
If you pass a reading buffer instead of a reading buffer subtable, the default subtable for that reading
buffer is used.
This command generates a single response message that contains all data.
The
format.data
attribute controls the format of the response message.
You can use the
bufferVar
attributes that are listed in the following table with the print buffer
command. For example, if
testData
is the buffer, you can use
testData.dates
attribute to print
the date of each reading in the
testData
buffer.
You can use
bufferVar
.n
to retrieve the number of readings in the specified reading buffer.
Example 1
reset()
testData = buffer.make(200)
format.data = format.ASCII
format.asciiprecision = 6
trigger.model.load("SimpleLoop", 6, 0, testData)
trigger.model.initiate()
waitcomplete()
printbuffer(1, testData.n, testData.readings, testData.units,
testData.relativetimestamps)
Reset the instrument.
Set the data format and ASCII precision.
Use trigger model SimpleLoop to create a 6 count loop with no delays that stores data in the reading buffer
testBuffer
.
Start the trigger model, wait for the commands to complete, and output the readings.
Use of
testData.n
(
bufferVar
.n
) indicates that the instrument should output all readings in the reading
buffer. In this example,
testBuffer.n
equals 6.
Example of output data:
1.10458e-11, Amp DC, 0.00, 1.19908e-11, Amp DC, 1.01858e-01, 1.19908e-11, Amp DC,
2.03718e-01, 1.20325e-11, Amp DC, 3.05581e-01, 1.20603e-11, Amp DC, 4.07440e-01, 1.20325e-
11, Amp DC, 5.09299e-01
Example 2
for x = 1, testData.n do
printbuffer(x,x,testData, testData.units, testData.relativetimestamps)
end
Using the same buffer created in Example 1, output the readings, units and relative timestamps on a separate
line for each reading.
1.10458e-11, Amp DC, 0.00
1.19908e-11, Amp DC, 1.01858e-01
1.19908e-11, Amp DC, 2.03718e-01
1.20325e-11, Amp DC, 3.05581e-01
1.20603e-11, Amp DC, 4.07440e-01
1.20325e-11, Amp DC, 5.09299e-01