Flexible NC programming
1.10 Program jumps and branches
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
85
1.10 Program jumps and branches
1.10.1 Return jump to the start of the program (GOTOS)
Function
The GOTOS command can be used to jump back to the beginning of a main or sub program in
order to repeat the program.
Machine data can be used to set that for every return jump to the beginning of the program:
● The program runtime is set to "0".
● Workpiece counting is incremented by the value "1".
Syntax
GOTOS
Significance
Jump instruction where the destination is the beginning of the program.
The execution is controlled via the NC/PLC interface signal:
DB21, to DBX384.0 (control program branching)
Value: Significance:
0 No return jump to the beginning of the program. Program
execution is resumed with the next part program block after
GOTOS.
GOTOS:
1 Return jump to the beginning of the program. The part program is
repeated.
Supplementary conditions
● GOTOS internally initiates a STOPRE (pre-processing stop).
● For a subprogram with data definitions (LUD variables) with the
GOTOS a jump is made to
the first program block after the definition section, i.e. data definitions are not executed
again. This is the reason that the defined variables retain the value reached in the
GOTOS
block and are not reset to the standard values programmed in the definition section.
● The
GOTOS command is not available in synchronized actions and technology cycles.
Example
Program code Comments
N10 ... ; Beginning of the program
...
N90 GOTOS ; Jump to beginning of the program
...