User manual

94 Relay Multiplexer Command Reference Chapter 3
TRIG:SOUR EXT
!Select external triggering
SCAN (@100:107)
!Scan channels 0 to 7 in bank 0
INIT
!Begin scan, close bank 0, channel 0
trigger externally
!Advance scan to next channel
Example Scanning Using Bus Triggers
This example uses bus triggering (TRIG:SOUR BUS) to scan bank 0,
channels 0 through 7 of a single-module switchbox. The trigger source to
advance the scan is the *TRG command (as set with TRIGger:SOURce
BUS). When INIT is executed, the scan is started and bank 0, channel 0
is closed. Then, each *TRG command advances the scan to the next
channel. For the example, ROUTe:SCAN:MODE and
ROUTe:SCAN:PORT default values of NONE are used.
TRIG:SOUR BUS
!Trigger command will be via backplane
(bus) interface (*TRG command
generates trigger)
SCAN (@100:107)
!Scan channels 0 to 7 in bank 0
INIT
!Begin scan, close bank 0, channel 0
loop statement
!Loop to scan all channels
*TRG
!Advance scan using bus triggering
increment loop
!Increment loop count
TRIGger:SOURce?
TRIGger:SOURce? returns the current trigger source for the switchbox.
Command returns BUS, ECLT, EXT, HOLD, IMM, or TTLT for sources
BUS, ECLTrgn, EXTernal, HOLD, IMMediate, or TTLTrgn, respectively.
Example Querying the Trigger Source
This example sets external triggering and queries the trigger source.
Since external triggering is set, TRIG:SOUR? returns "EXT".
TRIG:SOUR EXT
!Set external trigger source
TRIG:SOUR?
!Query trigger source