The programming example below illustrates how to configure a 10-point linear voltage sweep on SMU
A, in which each step is triggered by the TRIG key:
-- Configure a 10-point source voltage sweep.
smua.trigger.source.linearv(1, 10, 10)
smua.trigger.source.action = smua.ENABLE
-- Configure the TRIG key press as an input trigger for source action.
smua.trigger.source.stimulus = display.trigger.EVENT_ID
-- Configure the SMU to execute a single 10-point sweep.
smua.trigger.count = 10
smua.trigger.arm.count = 1
-- Turn on the output in preparation for the sweep.
smua.source.output = smua.OUTPUT_ON
-- Start the sweep and clear the event detectors.
smua.trigger.initiate()
-- The SMU waits for the front-panel TRIG key press before executing
-- each source action.
-- Wait for the sweep to complete.
waitcomplete()
The following figure graphically illustrates this example. See Sweep operation (on page 2-51) for
more information about sweep operation.
Figure 36: Front-panel TRIG key triggering