System and logical reserved words are used together to set up conditional statements that are evaluated by XBUILD. Depending on whether a conditional statement is TRUE or FALSE, XBUILD either includes or omits certain data from the program format.
<IF> |
First element in a conditional statement, always followed by a logical reserved word to verify that a condition is TRUE. |
<IFNOT> |
First element in a conditional statement, always followed by a logical reserved word to verify that a condition is FALSE. |
<THEN> |
Second element in a conditional statement, placed after a logical reserved word. |
<ELSE> |
Third element in a conditional statement following an <IF><logical reserved word><THEN> to output an alternative decision. |
<ELSEIF> |
Third and higher element in a conditional statement to verify that a condition is TRUE. Used to evaluate multiple alternative decisions within an <IF> <ENDIF> block. |
<ELSEIFNOT> |
Third and higher element in a conditional statement to verify that a condition is FALSE. Used to evaluate multiple alternative decisions within a single <IF> <ENDIF> block. |
<ENDIF> |
Last element in a conditional statement. This must be on a line by itself. |
<F1> |
Use this word at the start of a line to send the line to intermediate file 1. Variables up to <F20> may be defined. If you enter a Name for an intermediate file in the Files dialog, you can define the variable using the file name, for example <F:filename>. |
<INCLUDE:Custom Format Name> |
Operates like a subroutine by calling a custom format from within another format. The custom format is used to eliminate duplicating large blocks of code in more than one format. |
<MESSAGE:Your Message Here> |
Used for displaying errors that are detected during post-processing and that typically would invalidate the posted NC code. The message string is displayed in a dialog and printed in the NC code. You may choose either to cancel posting or to ignore the error and continue posting. |
<Set-F1> |
Use this word to send proceeding code to intermediate file 1. Variables up to <Set-F20> may be defined. If you enter a Name for an intermediate file in the Files dialog, you can define the variable using the file name, for example <Set-F:filename>. |
The format for conditional statements is as follows:
<IF><Logical Reserved Word><THEN> {N<SEQ>} . . . <ENDIF>
or
<IFNOT><Logical Reserved Word><THEN> {N<SEQ>} . . . <ENDIF>
In the conditional statement below, for example, the data between the words <THEN> and <ENDIF> is output only if CSS is ON.
<IF><CSS-ON><THEN> {N<SEQ>}G96S<CSS-SPEED><EOB> <ENDIF>