3Operating and Programming

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.

You can also execute a sequence when an alarm condition is reached. See “Executing a Sequence on an Alarm Condition" on page 94 for more information.

While a scan is running (see “Scanning Applications" on page 69), the instrument prevents use of all channels in banks that contain one or more channels in the specified scan list (these channels are dedicated to

the scan). Therefore, if a sequence attempts to operate a channel in a scanned bank, an error is generated and the entire sequence will

be discarded.

The following command executes a sequence named “MYSEQ_1”, which closes several channels on the module and opens a single channel.

ROUT:SEQ:DEF MYSEQ_1,"ROUT:CLOS (@1001:1009);OPEN (@1011)"

ROUT:SEQ:TRIG MYSEQ_1

Executing a Sequence on an Alarm Condition

After you have defined a valid sequence, you can configure the instrument to execute a sequence when a reading crosses an alarm limit on a channel. The specified sequence will execute once when an alarm occurs on the specified alarm. If the specified sequence name is not currently stored in memory, an error will be generated.

For more information on configuring alarms, see “Alarm Limits" on page 84.

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.

You can assign multiple channels to either of the two available alarms (numbered 1 and 2). You cannot, however, assign alarms on a specific channel to more than one alarm number.

The 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 has been reassigned,

the alarm has been cleared, the association of the sequence to the alarm has been re- established, and the alarm condition exists again.

To assign the sequence to a specific alarm number, use the following command. Specify the MANual parameter to remove an association without reassigning it to another alarm.

ROUTe:SEQuence:TRIGger:SOURce <name>,{ALARm1-ALARm2MANual}

94

L4400 User’s Guide

Page 104
Image 104
Agilent Technologies L4400 manual Executing a Sequence on an Alarm Condition