ROUTe:SEQuence:TRIGger:SOURce
Syntax
ROUTe:SEQuence:TRIGger:SOURce <name>, <source>
ROUTe:SEQuence:TRIGger:SOURce? <name>
Description
This command executes the specified sequence from non-volatile memory when a reading crosses an alarm limit on a channel (see OUTPut:ALARm<n>:SOURce command). The specified sequence will execute once when an alarm occurs on the specified alarm, after which the trigger source will be automatically set to MANual. Regardless of whether or not an alarm association is configured, you can always execute a sequence using the ROUTe:SEQuence:TRIGger[:IMMediate] command. If the specified sequence name is not currently stored in memory, an error will be generated.
Assigning a sequence to an alarm will remove any other sequence's association with that alarm, as well as that alarm's association to any other sequence. Use the MANual parameter to remove an association without reassigning it to another alarm.
Used With:
34921A through 34925A Multiplexer Modules
34950A Digital I/O Module (digital input and counter channels only)
34952A Multifunction Module (digital input and totalizer channels only)
Parameters
Name |
Type |
Range of Values |
Default Value |
<name> |
ASCII String |
A previously-defined sequence name consisting of up to 30 characters (see ROUTe:SEQuence:DEFine command). |
This is a required parameter |
<source> |
Discrete |
{ALARm1|ALARm2|ALARm3|ALARm4|MANual} |
This is a required parameter |
Remarks
The specified sequence will execute once when an alarm occurs, after which the trigger source will be automatically set to MANual. The sequence will not execute again until the trigger source is reassigned, the alarm has been cleared, the association of the sequence to the alarm has been re-established, and the alarm condition exists again.
You can assign multiple channels to any of the four available alarms (numbered 1 through 4, see OUTPut:ALARm<n>:SOURce command). For example, you can configure the instrument to generate an alarm on the Alarm 1 output when a limit is exceeded on any of channels 1003, 2005, or 3010. You cannot, however, assign alarms on a specific channel to more than one alarm number.
Regardless of whether or not an alarm association is configured, you can always execute a sequence using the ROUTe:SEQuence:TRIGger[:IMMediate] command.
If you attempt to trigger a sequence while one is already executing, the trigger will be placed in a queue. When the trigger queue is full, a "trigger ignored" error will be generated.
To abort a sequence execution, use the ROUTe:SEQuence:ABORt command or a Device Clear. When the sequence is terminated, the resultant instrument state will be determined by how much of the sequence had been executed when the ABORt/Device Clear was received. An ABORt command (system abort) executed from within a sequence will not terminate the sequence. The *RST and SYSTem:PRESet commands will also abort a sequence execution prior to performing their own actions.
When a sequence is defined (see ROUTe:SEQuence:DEFine command), the specified commands are checked for proper syntax and absolute parameter range limits. If an error is detected during compilation, the entire sequence will be discarded. More extensive error checking, such as channel range expansion and validation, is performed when the sequence is executed.
A sequence may invoke another sequence. but may not invoke itself recursively. In addition, the number of invocations is limited to four levels of nesting and this is enforced at the time of execution. Exceeding the limit will abort the sequence and an error will be generated.
A Factory Reset (*RST command) will remove all alarm associations. Redefining or deleting a sequence will also remove all alarm associations.
Return Format
The query command returns the present trigger source: "ALAR1", "ALAR2", "ALAR3", "ALAR4", or "MAN".
Examples
The following program segment selects the alarm source and configures the instrument to execute the sequence named "MYSEQ_1" when an alarm is reported on Alarm 1. The Monitor mode is used to evaluate alarm conditions on the selected channel.
ROUT:SEQ:DEF
MYSEQ_1,"ROUT:CLOS (@1001:1009);OPEN (@2001)" !Define
sequence
CALC:LIM:UPP 10.25,(@1003) !Set
upper alarm limit
CALC:LIM:UPP:STAT ON,(@1003) !Enable
alarms
OUTP:ALARM1:SOUR (@1003)
!Report
alarms on Alarm 1
ROUT:MON:CHAN (@1003) !Select
monitor channel
ROUT:MON:CHAN:ENAB ON, (@1003) !Enable
monitoring on selected channel
ROUT:SEQ:TRIG:SOUR MYSEQ_1,ALAR1 !Enable
trigger source
ROUT:MON:STAT ON !Enable
monitor mode
INIT !Initiate
measurement
The following query returns the trigger source currently selected.
ROUT:SEQ:TRIG:SOUR? MYSEQ_1
Typical Response: ALAR1