Programming instructions

9-16
Commands for Controlling Processes and Programs NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
9.7 Conditional Branches Upon the Results of Arithmetic
Operations
"Branches which are conditional upon the results of arithmetic operations"
relate to the results of the most recently performed arithmetic operation.
Branch If Equal to Zero ‘BEQ’
The command "BEQ" is used to continue program execution at the speci-
fied label if the result of the most recent mathematical operation was
equal to zero.
BEQ <label>
BEQ .ZERO
Branch If Not Equal to Zero ‘BNE’
The command "BNE" is used to continue program execution at the speci-
fied label if the result of the most recent mathematical operation was not
equal to zero.
BNE <label>
BNE .NZERO
Branch If Greater Than or Equal to Zero (If Minus) ‘BPL
The command "BPL" is used to continue program execution at the speci-
fied label if the result of the most recent mathematical operation was
greater than or equal to zero.
BPL <label>
BPL .GZERO
Branch If Less Than Zero (If Minus) ‘BMI
The command "BMI" is used to continue program execution at the speci-
fied label if the result of the most recent mathematical operation was less
than zero.
BMI <label>
BMI .LZERO
Overview:
@10=A-B @10=B-A
A = B BEQ BEQ
A <> B BNE BNE
A < B BMI ---
A <= B --- BPL
A > B --- BMI
A >= B BPL ---
Syntax
Syntax
Syntax
Syntax