Model 2651A High Power System SourceMeter® Instrument Reference Manual
Section 3: Functions and features
2651A-901-01 Rev. A / March 2011
3-55
NOTE
Detector overruns are not the same as action overruns that are reported in the status model.
The programming example below illustrates how to check and respond to detector overruns.
testOver = digio.trigger[4].overrun
if testOver == true then
print("Digital I/O overrun occurred.")
end
Examples using interactive triggering
Command interface interactive trigger example
The programming example below illustrates how to clear triggers, turn on the SMU output, and then
enable a 30 second timeout to wait for a command interface trigger. Upon receipt of the trigger, the
Model 2651A performs a voltage reading.
-- Clear any previously detected command interface triggers.
trigger.clear()
-- Turn on output.
smua.source.output = smua.OUTPUT_ON
-- Wait 30 seconds for a command interface trigger.
triggered = trigger.wait(30)
-- Get voltage reading.
reading = smua.measure.v()
-- Send command interface trigger to trigger the measurement.
*TRG
NOTE
*TRG
cannot be used in a script.
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 Model 2651A to wait for an external input
trigger on digital I/O line 2. If a trigger event occurs, the Model 2651A 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.