BLOCK_TEMPLATE name
{
@
Address_Name [ Address_Expression
] @
@ \nows @
@ \opt @
@ \ldr=string1 @
@ \trlr=string@
@ "string" @
}
Instructs Post to define a Block Template identified by the string name. Block Templates are used by the event handlers to request formatted output. (see MOM_do_template in event handler example).
Address_Name
The name of a previously defined Address. The attributes of that Address determine the format of the output for this Block Template member.
Address_Expression (ae)
A TCL expression whose value should be sent to the output. This expression can be any valid TCL expression. Post will ask TCL to evaluate this expression and then output its value using the format indicated by the Address Format attribute.
\nows
An optional switch. If present then the value is not followed by the WORD_SEPARATOR in the generated output. If not present then the value is followed by the WORD_SEPARATOR in the generated output.
\opt
An optional switch. If present and the ae can not be evaluated then ignore this address. If it is not present and the ae cannot be evaluated an error is issued.
\ldr=string1
An optional switch. If present then precede this address with string1 in this Block Template (not in every template in which the address appears; use LEADER in the address definition for that).
\trlr=string1
An optional switch. If present then follow this address with string1 in this Block Template (not in every template in which the address appears; use TRAILER in the address definition for that).
"string"
A string to output literally. This string follows the octal rule. This string may also be qualified with switches.
There can be any number of Address members and any number of string members in a Block Template. They may appear in any order.
Example
BLOCK_TEMPLATE rapid_xy {
cutcom_g[$mom_cutcom_code]\opt
motion_g[0]
X[$mom_pos(0)]
Y[$mom_pos(1)]
cutcom_register[$mom_cutcom_adjust_register]\opt
}