Model 2601B-PULSE System SourceMeter Instrument Reference Manual Section 6: Triggering
2601B-PULSE-901-01A April 2020 6-27
Manual triggering example
The programming example below illustrates how to pause a script and prompt the operator to press
the TRIG key when they are ready to continue. If the TRIG key is not pressed, the test will continue
after waiting 10 minutes (600 seconds).
display.clear()
display.trigger.clear()
display.setcursor(1, 1)
display.settext("Take a Break")
display.setcursor(2, 1)
display.settext("Press TRIG to continue")
display.trigger.wait(600)
display.clear()
Digital I/O triggering interactive example
The programming example below illustrates how to configure digital I/O line 2 as an input trigger and
digital I/O line 14 as an output trigger. It commands the 2601B-PULSE to wait for an external input
trigger on digital I/O line 2. If a trigger event occurs, the 2601B-PULSE outputs an external trigger on
digital I/O line 14. If no trigger event is received on digital I/O line 2, the test is aborted.
-- Configure digital I/O lines 2 and 14 for input trigger detection
-- and output trigger generation, respectively.
digio.trigger[2].mode = digio.TRIG_RISINGA
digio.trigger[2].clear()
digio.trigger[14].mode = digio.TRIG_FALLING
digio.trigger[14].pulsewidth = 0.0001
-- Wait 15 seconds for a trigger event to occur on digital I/O line 2.
trigInput = digio.trigger[2].wait(15)
-- If a trigger event occurs on digital I/O line 2, assert an output
-- trigger on digital I/O line 14. If a trigger event does
-- not occur, then turn off the output of smua and issue a message
-- on the front-panel display.
if trigInput == true then
digio.trigger[14].assert()
else
smua.source.output = smua.OUTPUT_OFF
display.screen = display.USER
display.clear()
display.setcursor(1, 1)
display.settext("No trigger received. Test aborted.")
exit()
end