User manual

Series 3700 System Switch/Multimeter Reference Manual Section 7: Buffer: Data Storage and Retrieval
3700S-901-01 Rev. C / July 2008 7-19
Buffer for...do loops
The following examples illustrate the use of for...do loops with respect to
recalling buffer data from a reading buffer called mybuffer. The following code
may be sent as one command line or as part of a script. Sample outputs follow
the line of code. Also see the printbuffer() (on page 13-221) ICL command.
NOTE Buffer mybuffer has time stamp collection enabled in the example
below.
This example loop uses printbuffer to show the reading, units, and relative
time stamps for all readings stored in the buffer. The information for each
reading (reading, units, and relative time stamps) is shown on a single line with
the elements comma-delimited.
for x = 1,mybuffer.n do
printbuffer(x,x,mybuffer, mybuffer.units,
mybuffer.relativetimestamps)
end
Sample comma-delimited output of above code:
3.535493836e-002, Volts DC, 0.000000000e+000
-4.749810696e-002, Volts DC, 5.730966000e-002
-8.893087506e-002, Volts DC, 7.722769500e-002
4.164193198e-002, Volts DC, 1.246876800e-001
-6.900507957e-002, Volts DC, 1.815213600e-001
-8.851423860e-002, Volts DC, 2.009161500e-001
3.891038895e-002, Volts DC, 2.647790700e-001
-7.581630349e-002, Volts DC, 3.032140350e-001
-8.236359060e-002, Volts DC, 3.226125750e-001
-8.551311493e-002, Volts DC, 3.425625900e-001