ROUTe:SEQuence:DEFine

34980A

ROUTe:SEQuence:DEFine

Syntax

ROUTe:SEQuence:DEFine <name>, "<commands>"

ROUTe:SEQuence:DEFine? <name>

Description

This command defines a series of SCPI commands that will be associated with the specified sequence. The commands associated with the sequence are compiled when defined and are then stored in a compressed format in non-volatile memory. The following SCPI commands are allowed in a sequence definition (all other commands will generate an error):

ABORt

DISPlay:TEXT '<string>'

OUTPut[:STATe] {OFF|0|ON|1}, (@<ch_list>)

ROUTe:CLOSe (@<ch_list>)

ROUTe:CLOSe:EXCLusive (@<ch_list>)

ROUTe:MODule:WAIT {1-8|SLOT1-SLOT8|ALL}

ROUTe:OPEN (@<ch_list>)

ROUTe:OPEN:ABUS [{1-4|ABUS1-ABUS4|ALL}]

ROUTe:OPEN:ALL [{1-8|SLOT1-SLOT8|ALL}]

ROUTe:SEQuence:TRIGger[:IMMediate] <name>

[SENSe:]TOTalize:CLEar:IMMediate (@<ch_list>)

SOURce:CURRent[:LEVel] {<current>|MIN|MAX|DEF}, (@<ch_list>)

SOURce:DIGital:DATA[:{BYTE|1|WORD|2|LWORd|4}] <data>, (@<ch_list>)

SOURce:DIGital:DATA:BIT {0|1}, <bit>, (@<ch_list>)

SOURce:FUNCtion:TRIGger:IMMediate (@<ch_list>)

SOURce:VOLTage[:LEVel] {<voltage>|MIN|MAX|DEF} , (@<ch_list>)

SYSTem:BEEPer

SYSTem:DELay[:IMMediate] <time>
 

Parameters

Name

Type

Range of Values

Default Value

<name>

ASCII String

A sequence name consisting of up to 30 characters. The first character must be a letter (A-Z), but the remaining 29 characters can be letters, numbers (0-9), or an underscore ( _ ). Blank spaces are not allowed.

This is a required parameter

<commands>

Quoted ASCII String

A string of valid SCPI commands (see list above) separated by semicolons. A semicolon or <new line> character is not required after the last command in the string.

This is a required parameter

Remarks

  • When a sequence is defined, 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. During compilation, the sequence commands do not have to be valid for the current instrument configuration; this allows you to define sequences without regard to compatibility with the current set of installed modules. More extensive error checking, such as channel range expansion and validation, is performed when the sequence is executed (see ROUTe:SEQuence:TRIGger[:IMMediate] command).

  • If you define a sequence with a name already in use by another sequence, the new definition will overwrite the previous definition (no error is generated).

  • When stored in memory, the user-defined sequence names are converted to all uppercase letters. For example, when stored "MySeq_1" is converted to "MYSEQ_1".

  • A sequence may invoke another sequence (see ROUTe:SEQuence:TRIGger[:IMMediate] command), 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.

  • At the time of sequence definition, a sequence may reference another undefined sequence; however, at the time of execution an error will be generated if an undefined sequence is invoked.

  • Up to 500 unique sequences can be stored in non-volatile memory. Each sequence is limited to 1024 bytes.

  • While a scan is running (see ROUTe:SCAN command), 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.

  • If the command overlap function is enabled (see ROUTe:OPERation:OVERlap[:ENABle] command), all switching operations within the sequence follow the overlapping rules. If the command overlap function is disabled, all commands within the sequence are processed in a serial fashion in the exact order in which they are received. Note, however, that within a single command containing a <ch_list> parameter (e.g., ROUT:CLOSE (@1001:1010)), the order of the individual switch operations is not guaranteed.

  • 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.  

Return Format

The query command returns a string containing the SCPI commands assigned to the specified sequence. The exact text specified in the original sequence definition is not preserved when the sequence is compressed/stored in memory. Therefore, the string returned may not be identical to the original string, but it will be functionally equivalent. If the specified sequence name is not currently stored in memory, an error is generated.

The query command always returns the short form of the command header in all upper-case letters (e.g., "ROUT:CLOS" is returned instead of "ROUTE:CLOSE"). Channel numbers and channel range specifiers are returned as they were specified.

Examples

The following command defines a sequence named "MYSEQ_1", which closes several channels on the module in slot 1 and opens a single channel on the module in slot 2.

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

The following query returns a string containing the sequence definition (the quotes are also returned).  

ROUT:SEQ:DEF? MYSEQ_1

Typical Response:  ":ROUT:CLOS (@1001:1009);:ROUT:OPEN (@2001)"

See Also

ROUTe:OPERation:OVERlap[:ENABle]

ROUTe:SEQuence:ABORt

ROUTe:SEQuence:CATalog?

ROUTe:SEQuence:DELete[:NAME]

ROUTe:SEQuence:TRIGger[:IMMediate]

ROUTe:SEQuence:TRIGger:SOURce