Series 3700A System Switch/Multimeter Reference Manual Section 6: Reading buffers
3700AS-901-01 Rev. D/June 2018 6-7
To delete a dynamically allocated buffer, use the command bufferVar = nil.
Creates a file on a USB flash drive if it doesn't already
exist. If the file already exists on the flash drive, it will be
overwritten.
An iterator that can act on all reading buffer names in the
system.
dmm.buffer.info("buffer name")
Returns the number of stored readings in the specified
buffer, along with the overall buffer capacity. The first
returned value is the stored readings number, while the
second is the capacity.
Returns the overall maximum storage capacity of all
reading buffers in the system.
Returns the sum storage capacity allocated for all
currently created reading buffers in the system.
Creates buffer to sore measurement data.
Saves buffer data to a file on a USB flash drive. If the file
already exists on the flash drive, it will be overwritten.
To see the current storage number and capacity of all reading buffers in the system, use the following
at a Test Script Processor (TSP
TM
) prompt or in a script:
for n in dmm.buffer.catalog() do stored, cap = dmm.buffer.info(n) print(n, 'stored
= ' .. stored, 'capacity = ' .. cap) end
Sample output:
As the sample output shows, the system has five reading buffers, but currently none of them have
data stored in them (stored = 0). The storage capacity of the buffers ranges from 1000 to 5000. If
you send:
print(dmm.buffer.usedcapacity)
The output is 1.500000000e+004.
This means the system is allocating 15000 of its maximum storage capacity for reading buffers.
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 ninth
measurement as rb[9], and so on. The additional information in the table is accessed as additional
members of the table.