Conditional interpretation

Similar to a precompiler-statement in the programming language “C”, parts of NC-program can be summarized in #IF-#ELSE-#ENDIF-constructs. The interpretation of these program parts can thus be controlled as a function of the arithmetic expression.

The conditional interpretation always begins with

#IF <expr> 

and ends with

#ENDIF 

The statement

#ELSE 

is optional and serves to build up a branching also.

Notice

The condition in $IF-control-block is checked by verifying the mathematical expression for “true” or “ not true” (TRUE and FALSE). To be able to use also decimal variables the jump condition is fulfilled (TRUE) if..
the absolute value of the mathematical expression is > or = 0.5.

In the use of conditional interpretation, the following rules are valid:

Programming example

#IF V.E.START_VALUE == TRUE 
N100 F100
:
#ELSE
N200 F40
:
#ENDIF
N300
:
:
N999 M30