Arithmetic Parameters and Program Jumps
10.3 Conditional program jumps (IF, GOTOB, GOTOF, GOTO, GOTOC)
Fundamentals
10-6 Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
Parameters
IF Keyword for condition
GOTOB "Jump instruction" with jump destination backward (toward
the beginning of program)
GOTOF Jump instruction with forward jump destination (toward
program end)
GOTO Jump instruction with destination search first forward then
backward (first toward end of program and then toward
beginning of program)
GOTOC Suppress Alarm 14080 "Destination not found". Jump
instruction with destination search first forward then
backward (first toward end of program and then toward
beginning of program)
<destination> Destination parameters for label, block number, or string
variable
Label Destination for a jump command
Label: Labeling of destination within the program
Block number Jump destination as main block or subblock number (e.g.,
200, N300)
String variable Variable of type string containing a label or block number
Comparison and logical operands
The jump condition can be programmed with any comparison or logic operation (result:
TRUE or FALSE). The program jump is executed if the result of the operation is TRUE.
The jump destination can only be a block with a label or block number that appears within
the program.
Note
Several conditional jumps can be formulated in the same block.
== Equal to
<> Not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to