Section 4: Sourcing and measuring
2470 High Voltage SourceMeter Instrument Reference Manual
4-76
2470-901-01 Rev. A /
May
2019
-- 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;
-- adjust as appropriate.
trigger.model.setblock(20, trigger.BLOCK_DELAY_CONSTANT, 0.001)
-- Block 21: Set digital I/O lines 1-4; output decimal 0 (binary 0000)
-- clear pattern to component handler.
trigger.model.setblock(21, trigger.BLOCK_DIGITAL_IO, 0, 15)
-- Block 22: Notify block generates event, which causes output
-- of a trigger pulse on digital I/O line 6.
trigger.model.setblock(22, trigger.BLOCK_NOTIFY, trigger.EVENT_NOTIFY1)
-- Block 23: Loop back to Block 2; keep looping until
-- all resistors have been tested.
trigger.model.setblock(23, trigger.BLOCK_BRANCH_COUNTER, number_of_resistors, 2)
-- After executing all of the above commands the trigger model can be initiated
-- by executing trigger.model.initiate().