Acu-Rite CNC 3500i User Manual

Page of 472
422
11 G-Code Edit, Help, & Advanced Features
1
1
.4 A
d
v
a
nced Pr
ogr
a
mming
If the expression is true, the program continues at N410, then to N440, 
where a jump is made to N480.
If the expression is false, the 3500i skips Blocks N410 to N440 and 
executes Blocks N450 to N470. In place of an expression, you can use 
a variable that while not zero is treated as a true expression. (Zero 
equals false. Any other value equals true). 
IF - GOTO
N500 IF (expression) ) GOTO nnnn
N510 ------------
If the expression is true, the program jumps to the block number 
specified (nnn). If the expression is false, the program continues at 
Block N510. In place of an expression a variable can be used which 
while not zero is treated as a true expression. (Zero equals false. Any 
other value equals true).
WHILE - DO - END
N550 IF (expression) DO nnnn
N560 ------------
-- --
-- --
-- --
-- --
N590 ENDIF
N600 ------------
If the expression is true, the program repeats between N550 and 
N590 until the expression becomes false. Similarly, if the expression 
is false when Block N550 is executed, the 3500i jumps to Block N600. 
The number after DO is a label (identifier only) and the same number 
must be used to identify the END of the loop. 
When you program IF-GOTO statements do not precede 
the block number with the character "N".
For example, IF-GOTO 487 skips to block number N487.