
Section 3: Functions and features
Model 2461 Interactive SourceMeter® Instrument Reference Manual
3-148
2461-901-01 A/November 2015
Resistor sorting TSP code
-- Create global variable to hold the number of resistors to be tested.
-- Can use local variable if all commands are sent to instrument as
-- a single script
number_of_resistors = 10
-- Reset instrument to default settings.
reset()
-- Clear the event log.
eventlog.clear()
-- Source function must be the first source setting;
-- most other settings are tied to the function.
smu.source.func = smu.FUNC_DC_CURRENT
-- Set the current range.
smu.source.range = 0.01
-- Set the source level to 10 mA.
smu.source.level = 0.01
-- The measure function must be first measure setting;
-- most other settings are tied to the function.
smu.measure.func = smu.FUNC_DC_VOLTAGE
-- Set the measure range after setting source function to current.
smu.measure.range = 2
-- Report Vmeasured/Isource.
smu.measure.unit = smu.UNIT_OHM
-- Use 4-wire or remote voltage sensing.
smu.measure.sense = smu.SENSE_4WIRE
-- Measure the actual value of the source for higher accuracy.
smu.source.readback = smu.ON
-- Set measurement integration time to 1 PLC (16.67 ms at 60 Hz).
-- Decrease to reduce test time; trade-off accuracy for speed.
smu.measure.nplc = 1
-- Immediately update autozero reference measurements and then
-- disable autozero function.
smu.measure.autozero.once()
-- Set voltage limit of current source to 2 V; set this after
-- setting measure range.
smu.source.vlimit.level = 2
-- This example records the resistance measurements for later
-- statistical analysis.
-- Limit inspection and binning can be performed without recording
-- the measurements.
-- Set default buffer equal to the number of resistors to be tested.
defbuffer1.capacity = number_of_resistors
-- Configure digital I/O lines 1 through 4 as digital outputs.
-- These I/O lines are used to output binning code to component handler.
digio.line[1].mode = digio.MODE_DIGITAL_OUT
digio.line[2].mode = digio.MODE_DIGITAL_OUT
digio.line[3].mode = digio.MODE_DIGITAL_OUT
digio.line[4].mode = digio.MODE_DIGITAL_OUT
-- Configure digital I/0 line 5 as a trigger input.
-- Used to detect start-of-test trigger from component handler.
digio.line[5].mode = digio.MODE_TRIGGER_IN
-- Set trigger detector to detect falling edge.
trigger.digin[5].edge = trigger.EDGE_FALLING
-- Configure digital I/0 line 6 as a trigger output.
-- Used to send end-of-test trigger to component handler.
digio.line[6].mode = digio.MODE_TRIGGER_OUT