Macro Variables

The $CEBKSH Variable

\textbf{{\char36}CEBKSH}

Whether Block Shutdown macros are activated

Type: Logical, Read/Write

Block Shutdown macros are invoked only if the $CEBKSH variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, block shutdown macros will not be executed.

The $CEBKST Variable

\textbf{{\char36}CEBKST}

Whether Block Startup macros are activated

Type: Logical, Read/Write

Block Startup macros are invoked only if the $CEBKST variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, block startup macros will not be executed.

The $CEPPID Variable

\textbf{{\char36}CEPPID}

Whether Pre-processor Identification macros are activated

Type: Logical, Read/Write

Pre-processor Identification macros are invoked only if the $CEPPID variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, pre-processor identification macros will not be executed.

The $CEPPSH Variable

\textbf{{\char36}CEPPSH}

Whether Pre-processor Shutdown macros are activated

Type: Logical, Read/Write

Pre-processor Shutdown macros are invoked only if the $CEPPSH variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, pre-processor shutdown macros will not be executed.

The $CEPPST Variable

\textbf{{\char36}CEPPST}

Whether Pre-processor Startup macros are activated

Type: Logical, Read/Write

Pre-processor Startup macros are invoked only if the $CEPPST variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, pre-processor startup macros will not be executed.

The $CESBSH Variable

\textbf{{\char36}CESBSH}

Whether Subprogram Shutdown macros are activated

Type: Logical, Read/Write

Subprogram Shutdown macros are invoked only if the $CESBSH variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, subprogram shutdown macros will not be executed.

The $CESBST Variable

\textbf{{\char36}CESBST}

Whether Subprogram Startup macros are activated

Type: Logical, Read/Write

Subprogram Sartup macros are invoked only if the $CESBST variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, subprogram startup macros will not be executed.

The $CYCMAC Variable

\textbf{{\char36}CYCMAC}

Whether cycle event macros are activated

Type: Logical, Read/Write

Cycle event macros are invoked only if the $CYCMAC variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, cycle event macros will not be executed.

The $DIAGMAC Variable

\textbf{{\char36}DIAGMAC}

Whether diagnostic macros are activated

Type: Logical, Read/Write

Diagnostic macros are invoked only if the $DIAGMAC variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, diagnostic macros will not be executed.

The $EDTMAX Variable

\textbf{{\char36}EDTMAX}

Number of Tape Editor expressions defined

Type: Numeric, Read-only

The $EDTMAX variable indicates how many Tape Editor expression are defined in QUEST. It defines the upper limit of the $EDTSTA array described below.

The $EDTSTA Variable

\textbf{{\char36}EDTSTA}\textbf{(}\mathit{index}\textbf{)}

Whether Tape Editor expressions are activated

Type: Logical, Read/Write

The $EDTSTA variable is an array of length $EDTMAX, with each element in the array defining the active/inactive state of the corresponding numbered Tape Editor expression as defined in QUEST. All tape editor expressions are enabled by default at the start of CERUN processing.

The $EMBMAC Variable

\textbf{{\char36}EMBMAC}\textbf{(}\mathit{n}\textbf{)}

MCD embedded macro delimiters

Type: String, Read/Write

The $EMBMAC array variable indicates the string delimiters that identify the start and end of macro code embedded in the MCD. The macro code between the start and end delimiters is compiled and executed when the block is read. The embedded macro and delimiters are then removed from the block and replaced by the return value of the macro (if any). The following embedded macro delimiters are defined in the $EMBMAC array. They can be changed if necessary should the prefix strings conflict with valid MCD for the controller.

$EMBMAC(1)

Embedded macro prefix for use with a pre-processor (default '#{' )

$EMBMAC(2)

Embedded macro prefix for use with regular processing (default '!{' )

$EMBMAC(3)

Embedded macro suffix (default '}' )

A #{macro} pre-processor embedded macro is compiled and executed after the Tape Editor, but before the Pre-Processor Startup macro (if using a pre-processor) or Block Startup macro (if not using a pre-processor). A !{macro} regular embedded macro is compiled and executed after the Tape Editor and pre-processor have completed, but before the Block Startup macro.

The $MNEST Variable

\textbf{{\char36}MNEST}

Macro nest level

Type: Numeric, Read-only

The $MNEST variable indicates how many macros are active. If the variable is equal to one, the current macro is the only active macro. A value greater than one indicates that the current macro has been called by another macro. (e.g., If the $MNEST value is 3 this indicates that there are 3 active macros: the current macro; the one that called the current macro; and the one that called the one that called the current macro!).

The $MTNMAC Variable

\textbf{{\char36}MTNMAC}

Whether motion event macros are activated

Type: Logical, Read/Write

Motion event macros are invoked only if the $MTNMAC variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, motion event macros will not be executed.

The $SEQALLOC Variable

\textbf{{\char36}SEQALLOC}

Sequence allocation size/strategy

Type: Numeric, Read/Write

The $SEQALLOC variable defines how internal memory should be allocated when sequence variables are created and when they grow in size. This increase in size occurs when the += operator is used to append to an existing sequence, or when a sequence variable is overwritten by a larger sequence, as in A={A,B} or even A={B}. Note that internal allocation size is not the same as the actual size of a sequence as determined using $FLEN().

–n:

Reserve at least |n|, double size when extending

 0:

Reserve as required, double size when extending

+n:

Reserve at least n, increase size in multiples of n when extending

Setting $SEQALLOC=0 (the default) will generally result in faster macro processing of sequences at the expense of greater memory usage, whereas setting $SEQALLOC=1 will maintain the same memory allocation and speed as for V20 and earlier releases.

The $TCMAC Variable

\textbf{{\char36}TCMAC}

Whether tool event macros are activated

Type: Logical, Read/Write

Tool event macros are invoked only if the $TCMAC variable is set to $TRUE. It is initialized to $TRUE by CERUN at the start of program processing. If it is set to $FALSE, tool event macros will not be executed.