
Series 3700 System Switch/Multimeter Reference Manual
Section 6
:
Buffer: Data Storage and Retrieval
Document Number: 3700S-901-01 Rev. A / August 2007
6-9
Buffer status
The buffer reading status attribute can include the status information as a numeric value shown
in the following table. To access status information, send the following command:
stat_info = readingbuffer.statuses[2]
Bit
Name
Hex value
ICL
B0
Low limit 1
0x01
dmm.buffer. LIMIT1_LOW_BIT
B1
High limit 1
0x02
dmm.buffer.LIMIT1_HIGH_BIT
B2
Low limit 2
0x04
dmm.buffer. LIMIT2_LOW_BIT
B3
High limit 2
0x08
dmm.buffer.LIMIT2_HIGH_BIT
B6
Measure overflow 0x40
dmm.buffer.MEAS_OVERFLOW_BIT
B7
Measure connect
question
0x80
dmm.buffer.MEAS_CONNECT_QUESTION_BIT
Dynamically-allocated buffers
RAM reading buffers are created and dynamically-allocated with the
dmm.makebuffer(n)
command, where
n
is the maximum number of readings the buffer can store.
Example:
The following command allocates a buffer named "mybuffer" that can store 100
readings:
mybuffer = dmm.makebuffer(100)
Example:
To delete an allocated buffer named "mybuffer:"
mybuffer = nil
Example:
To see if the high limit 1 was exceeded during the reading:
stat_info = readingbuffer.statuses[3]
if (bit.bitand(stat_info, dmm.buffer.LIMIT1_HIGH_BIT) ==
dmm.buffer.LIMIT1_HIGH_BIT) then
print("Limit 1 high exceeded")
else
print("Limit 1 high okay")
end