CNC Z32 - Programming guide (
Milling machines manufacturer) The --IF instruction indicates the first checked condition. If {condition 1} is verified, the blocks from N10 and N20 are executed, then the execution passes to N70. If {condition 1} is not verified, the condition --ELSE IF is checked. If {condition 2} is verified, the blocks from N30 and N40 are executed, then the execution passes to N70. If neither {condition 1} nor {condition 2} are verified, the execution passes to the --ELSE block, and the blocks from N50 to N60 are executed, then the execution passes to N70. In lines containing --IF, --ELSE IF, --ELSE and --END IF it is possible to insert a comment after the character “;”. In synthesis: The --IF instruction is the first checked condition. The blocks --ELSE IF specify the conditions checked if the preceding conditions are not true. It is possible to have more than one block --ELSE IF. In this case the conditions are checked in sequence. --IF {condition 1} … (executed if condition 1 is true) --ELSE IF {condition 2} … (executed if condition 1 is false and condition 2 is true) --ELSE IF {condition 3} … (executed if condition 1 is false, condition 1 is false and condition 3 is true) --ELSE… (executed if condition 1 is false, condition 1 is false and condition 3 is false) --END IF N70 The instruction --ELSE identifies the block of instructions executed if all other conditions are not true. The --END IF instruction identifies the end of an IF block. It is possible to nest IF instructions up to 31 levels. Example: --IF {condition 1} --IF {condition 2} --IF {condition 3} N30 … (executed if condition 1 is true, condition 1 is true and condition 3 is true) N40 --END IF --END IF --END IF >
61