dmm.func = "dcvolts" -- set the DMM for DC volts functionality
dmm.reset("active") -- reset DC volts to default settings
dmm.range = 10 -- set the range to 10 volts
dmm.nplc = 0.1 -- set the nplc to 0.1
dmm.limit[1].autoclear = dmm.OFF -- disable auto clearing for limit 1
dmm.limit[1].high.value = 5 -- set high limit on 1 to fail if reading
-- exceeds 5 volts
dmm.limit[1].low.value = 3 -- set low limit on 1 to fail if reading
-- is less than 3 volts
dmm.limit[1].enable = dmm.ON -- enable limit 1 checking for DC volt
-- measurements
dmm.limit[2].autoclear = dmm.OFF -- disable auto clearing for limit 2
dmm.limit[2].high.value = 7 -- set high limit on 2 to fail if reading
-- exceeds 7 volts
dmm.limit[2].low.value = 1 -- set low limit on 2 to fail if reading
-- is less than 1 volts
dmm.limit[2].enable = dmm.ON -- enable limit 2 checking for DC volt
-- measurements
dmm.measurecount = 50 -- set the measure count to 50
LimitBuffer = dmm.makebuffer(100) -- create a reading buffer that can store
-- 100 readings
dmm.measure(LimitBuffer) -- take 50 readings and store them in
-- LimitBuffer
-- then check if any of the 50 readings
-- were outside of the limits
print("limit 1 high fail = " .. dmm.limit[1].high.fail)
print("limit 1 low fail = " .. dmm.limit[1].low.fail)
print("limit 2 high fail = " .. dmm.limit[2].high.fail)
print("limit 2 low fail = " .. dmm.limit[2].low.fail)
dmm.limit[1].clear() -- clear limit 1 conditions
dmm.limit[2].clear() -- clear limit 2 conditions
Sample output that shows all readings are within limit values (all readings between 3 and 5 volts):
limit 1 high fail = 0
limit 1 low fail = 0
limit 2 high fail = 0
limit 2 low fail = 0
Sample output showing at least one reading failed limit 1 high values (a 6 volt reading would cause this
condition or a reading greater than 5 but less than 7.):
limit 1 high fail = 1
limit 1 low fail = 0
limit 2 high fail = 0
limit 2 low fail = 0
Sample output showing at least one reading failed limit 1 and 2 low values (a 0.5 volts reading would cause this
condition or a reading less than 1):
limit 1 high fail = 0
limit 1 low fail = 1
limit 2 high fail = 0
limit 2 low fail = 1
Also see
dmm.configure.recall() (on page 11-165)
dmm.configure.set() (on page 11-166)
dmm.func (on page 11-179)
dmm.limit[Y].high.value (on page 11-189)
dmm.limit[Y].low.fail (on page 11-191)
dmm.limit[Y].low.value (on page 11-193)
dmm.measure() (on page 11-205)