8: TSP command reference Model 2450 Interactive SourceMeter® Instrument
8-108 2450-901-01 Rev. B/September 2013
smu.source.func = smu.FUNC_DC_CURRENT -- set the instrument source current
smu.measure.func = smu.FUNC_DC_VOLTAGE -- set the instrument to measure voltage
smu.measure.range = 10 -- set the range to 10 volts
smu.measure.nplc = 0.1 -- set the nplc to 0.1
smu.measure.limit[1].autoclear = smu.OFF -- disable auto clearing for limit 1
smu.measure.limit[1].high.value = 5 -- set high limit on 1 to fail if
-- reading exceeds 5 volts
smu.measure.limit[1].low.value = 3 -- set low limit on 1 to fail if reading
-- is less than 3 volts
smu.measure.limit[1].enable = smu.ON -- enable limit 1 checking for voltage
-- measurements
smu.measure.limit[2].autoclear = smu.OFF -- disable auto clearing for limit 2
smu.measure.limit[2].high.value = 7 -- set high limit on 2 to fail if
-- reading exceeds 7 volts
smu.measure.limit[2].low.value = 1 -- set low limit on 2 to fail if reading
-- is less than 1 volts
smu.measure.limit[2].enable = smu.ON -- enable limit 2 checking for voltage
-- measurements
smu.measure.count = 50 -- set the measure count to 50
LimitBuffer = buffer.make(100) -- create a reading buffer that can store
-- 100 readings
smu.measure.read(LimitBuffer) -- make 50 readings and store them in
-- LimitBuffer
-- then check if any of the 50 readings
-- were outside of the limits
print("limit 1 results = " .. smu.measure.limit[1].fail)
print("limit 2 results = " .. smu.measure.limit[2].fail)
smu.measure.limit[1].clear() -- clear limit 1 conditions
smu.measure.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 results = smu.FAIL_NONE
limit 2 results = smu.FAIL_NONE
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 results = smu.FAIL_HIGH
limit 2 results = smu.FAIL_NONE
Sample output showing at least one reading failed limit 1 and 2 low values (a 0.5 volt reading would cause
this condition or a reading less than 1):
limit 1 results = smu.FAIL_LOW
limit 2 results = smu.FAIL_LOW
Also see
Limit testing and binning (on page 3-68)
smu.measure.limit[Y].enable (on page 8-106)