Section 4: Sourcing and measuring
2470 High Voltage SourceMeter Instrument Reference Manual
4-82
2470-901-01 Rev. A /
May
2019
-- Output a falling edge trigger.
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 source output on.
trigger.model.setblock(3, trigger.BLOCK_SOURCE_OUTPUT, smu.ON)
-- Block 4: Delay for 1 ms 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 source output off.
trigger.model.setblock(6, trigger.BLOCK_SOURCE_OUTPUT, smu.OFF)
-- Block 7: Check if 99<=R<=101; if yes, go to Block 17.
trigger.model.setblock(7, trigger.BLOCK_BRANCH_LIMIT_CONSTANT, trigger.LIMIT_INSIDE,
99, 101, 17, 5)
-- Block 8: Check if 101<=R<=103; if yes, go to Block 19.
trigger.model.setblock(8, trigger.BLOCK_BRANCH_LIMIT_CONSTANT, trigger.LIMIT_INSIDE,
101, 103, 19, 5)
-- Block 9: Check if 104<=R<=106; if yes, go to Block 21.
trigger.model.setblock(9, trigger.BLOCK_BRANCH_LIMIT_CONSTANT, trigger.LIMIT_INSIDE,
104, 106, 21, 5)
-- Block 10: Check if 106<=R<=108; if yes, go to Block 23.
trigger.model.setblock(10, trigger.BLOCK_BRANCH_LIMIT_CONSTANT,
trigger.LIMIT_INSIDE, 106, 108, 23, 5)
-- Block 11: Set digital I/O lines 1 through 4; output
-- decimal 15 (binary 1111) to component handler.
trigger.model.setblock(11, trigger.BLOCK_DIGITAL_IO, 15, 15)
-- Block 12: Delay 1 ms. Controls duration of digital bit patterns;
-- adjust as appropriate.
trigger.model.setblock(12, trigger.BLOCK_DELAY_CONSTANT, 0.001)
-- Block 13: Set digital I/O lines 1 through 4; output
-- decimal 0 (binary 0000) clear pattern to component handler.
trigger.model.setblock(13, trigger.BLOCK_DIGITAL_IO, 0, 15)
-- Block 14: Notify block generates event, which causes output
-- of a trigger pulse on digital I/O line 6.
trigger.model.setblock(14, trigger.BLOCK_NOTIFY, trigger.EVENT_NOTIFY1)
-- Block 15: Loop back to Block 2; keep looping until all resistors
-- have been tested.
trigger.model.setblock(15, trigger.BLOCK_BRANCH_COUNTER, number_of_resistors, 2)
-- Block 16: Go to Block 0 (go to Idle).
trigger.model.setblock(16, trigger.BLOCK_BRANCH_ALWAYS, 0)
-- Block 17: Set digital I/O lines 1 through 4; output
-- decimal 1 (binary 0001) to component handler.
trigger.model.setblock(17, trigger.BLOCK_DIGITAL_IO, 1, 15)
-- Block 18: Go to Block 12.
trigger.model.setblock(18, trigger.BLOCK_BRANCH_ALWAYS, 12)
-- Block 19: Set digital I/O lines 1 through 4; output
-- decimal 2 (binary 0010) to component handler.