Dynamic Buffer Programming Example - Keithley 3700 series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700 series:
Table of Contents

Advertisement

Section 6: Buffer: Data Storage and Retrieval

Dynamic buffer programming example

The listing below shows a programming example for storing data using a dynamically-allocated
buffer named "mybuff."
Command
dmm.reset('all')
mybuffer = dmm.makebuffer(100000)
mybuffer.appendmode = 1
dmm.measurecount = 1
dmm.func = dmm.DC_VOLTS
for x =
dmm.measure(mybuffer)
end
printbuffer(1, 100, mybuffer.readings)
printbuffer(1, 100, mybuffer.units)
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
155) ICL command.
NOTE
for x = 1,mybuffer.n do
printbuffer(x,x,mybuffer, mybuffer.units,
end
Sample 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
6-10
1, 100 do
Buffer mybuffer has timestamp collection enabled.
mybuffer.relativetimestamps)
Series 3700 System Switch/Multimeter Reference Manual
Description
Resets the DMM.
Create a buffer named mybuffer and
allocate space for 100,000 readings.
Enable append buffer mode.
Set count to 1.
Select the DMM function as DC volts.
Start for...do loop.
Measure and store readings in buffer.
End loop.
Return readings 1-100.
Return units 1-100.
Document Number: 3700S-901-01 Rev. A / August 2007
printbuffer
(on page 9-

Advertisement

Table of Contents
loading

Table of Contents