
Model 2461 Interactive SourceMeter® Instrument Reference Manual
Section 3: Functions and features
2461-901-01 A/November 2015
3-143
trigger.digout[6].logic = trigger.LOGIC_NEGATIVE
-- Set width of output trigger pulse to 10 us.
trigger.digout[6].pulsewidth = 10E-6
-- Trigger pulse will be output when Notify Block generates an event.
trigger.digout[6].stimulus = trigger.EVENT_NOTIFY1
-- Reset existing trigger model settings.
trigger.model.load("Empty")
-- Configure the Trigger Model.
-- Block 1: Clear defbuffer1.
trigger.model.setblock(1, trigger.BLOCK_BUFFER_CLEAR, defbuffer1)
-- Block 2: Wait for start-of-test trigger on digital I/O line 5.
trigger.model.setblock(2, trigger.BLOCK_WAIT, trigger.EVENT_DIGIO5)
-- Block 3: Turn SMU output ON.
trigger.model.setblock(3, trigger.BLOCK_SOURCE_OUTPUT, smu.ON)
-- Block 4: Delay for 1ms to allow source to settle; adjust as appropriate.
trigger.model.setblock(4, trigger.BLOCK_DELAY_CONSTANT, 0.001)
-- Block 5: Measure resistance and store result in defbuffer1.
trigger.model.setblock(5, trigger.BLOCK_MEASURE, defbuffer1)
-- Block 6: Turn SMU output OFF.
trigger.model.setblock(6, trigger.BLOCK_SOURCE_OUTPUT, smu.OFF)
-- Block 7: Check if 80<=R<=120; if yes, go to Block 10.
trigger.model.setblock(7, trigger.BLOCK_BRANCH_LIMIT_CONSTANT,
trigger.LIMIT_INSIDE, 80, 120, 10, 5)
-- Block 8: Set digital I/O lines 1-4; output decimal 15 (binary 1111)
-- to component handler.
trigger.model.setblock(8, trigger.BLOCK_DIGITAL_IO, 15, 15)
-- Block 9: Go to Block 20.
trigger.model.setblock(9, trigger.BLOCK_BRANCH_ALWAYS, 20)
-- Block 10: Check if 90<=R<=110; if yes, go to Block 13.
trigger.model.setblock(10, trigger.BLOCK_BRANCH_LIMIT_CONSTANT,
trigger.LIMIT_INSIDE, 90, 110, 13, 5)
-- Block 11: Set digital I/O lines 1-4; output decimal 1 (binary 0001)
-- to component handler.
trigger.model.setblock(11, trigger.BLOCK_DIGITAL_IO, 1, 15)
-- Block 12: Go to Block 20.
trigger.model.setblock(12, trigger.BLOCK_BRANCH_ALWAYS, 20)
-- Block 13: Check if 95<=R<=105; if yes, go to Block 16.
trigger.model.setblock(13, trigger.BLOCK_BRANCH_LIMIT_CONSTANT,
trigger.LIMIT_INSIDE, 95, 105, 16, 5)
-- Block 14: Set digital I/O lines 1-4; output decimal 2 (binary 0010)
-- to component handler.
trigger.model.setblock(14, trigger.BLOCK_DIGITAL_IO, 2, 15)
-- Block 15: Go to Block 20.
trigger.model.setblock(15, trigger.BLOCK_BRANCH_ALWAYS, 20)
-- Block 16: Check if 99<=R<=101; if yes, go to Block 19.
trigger.model.setblock(16, trigger.BLOCK_BRANCH_LIMIT_CONSTANT,
trigger.LIMIT_INSIDE, 99, 101, 19, 5)
-- Block 17: Set digital I/O lines 1-4; output decimal 3 (binary 0011)
-- to component handler.
trigger.model.setblock(17, trigger.BLOCK_DIGITAL_IO, 3, 15)
-- Block 18: Go to Block 20.
trigger.model.setblock(18, trigger.BLOCK_BRANCH_ALWAYS, 20)
-- Block 19: Set digital I/O lines 1-4; output decimal 4 (binary 0100)
-- to component handler.
trigger.model.setblock(19, trigger.BLOCK_DIGITAL_IO, 4, 15)
-- Block 20: Delay 1ms; controls duration of digital bit patterns;