User manual

Section 7: Buffer: Data Storage and Retrieval Series 3700 System Switch/Multimeter Reference Manual
7-12 3700S-901-01 Rev. C / July 2008
dmm.savebuffer()
Example
To save readings from valid DMM buffer named mybuffer with default time information
to a file named mydata.csv on the USB flash drive:
dmm.savebuffer('mybuffer', '/usb1/mydata.csv')
To save readings from mybuffer with relative time stamps to a file named
mydatarel.csv on the USB flash drive:
dmm.savebuffer('mybuffer', '/usb1/mydatarel.csv',
dmm.buffer.SAVE_RELATIVE_TIME)
Reading buffers
A reading buffer is based on a Lua table. The measurements themselves are
accessed by ordinary array notation. If rb is a reading buffer, the first
measurement is accessed as rb[1], the 9th measurement as rb[9], and so
on. The additional information in the table is accessed as additional members of
the table.
Reading buffer designations
To access the buffer, include the buffer attribute in the respective command. For
example, the following commands would store five readings from the DMM into
a buffer named readingbuffer:
-- Sets how many readings to take with the dmm.measure
command.
dmm.measurecount = 5
-- Takes the measurements and stores them in readingbuffer.
dmm.measure(readingbuffer)
NOTE Do not use quotes around the reading buffer name when you send the
dmm.measure (readingbuffer) command from the instrument
front panel, because a data type error message will be logged to the
error queue.
Buffer storage control attributes
Buffer storage attributes are summarized in the following table. To control which
elements are stored in the buffer, enable the desired attribute for the buffer
(which sets it to 1). The following attributes are all available per reading buffer.
For example, to access the appendmode attribute for a buffer named rb, send
rb.appendmode.