Programming manual
CNC 8070
STATEMENTS AND INSTRUCTIONS
Flow controlling instructions
15.
(SOFT V02.0X)
481
15.2.2 Conditional execution ($IF)
$IF <condition>... $ENDIF
The following parameter is defined in this instruction:
This instruction analyzes the programmed condition.
• If the condition is true, it executes the blocks contained between
the $IF and $ENDIF instruction.
• If the condition is false, the execution continues at the block after
$ENDIF.
The $IF instruction always ends with a $ENDIF, except when adding
a $GOTO instruction, in which case, it must NOT be programmed.
As an option, the $ELSE and $ELSEIF instructions may be inserted
between $IF and $ENDIF.
<condition> It may be a comparison between two numbers,
parameters or arithmetic expressions whose result is a
number.
...
N20 $IF P1==1
N30...
N40...
N50 $ENDIF
N60 ...
If P1 is equal to 1, it will execute blocks N30 through N40.
If P1 is other than 1, the execution continues at N60.
...
N20 $IF P1==1 $GOTO N40
N30...
N40: ...
N50...
If P1 is equal to 1, the execution continues at block N40.
If P1 is other than 1, the execution continues at N30.