CLM01.4-LAP-01VRS
Writing the User Program
5-31
DOK-CONTRL-CLM01.4LAP1-FK01-EN-P
JMP – Jump Unconditional
or
Target instruction
When it reaches this user command, the program jumps to the specified
target location.
This allows the programmer to jump directly to another part of the
program. This enables the main program to be divided up into fixed
program blocks, which can be of great help when making changes or
additions.
An unconditional jump from the end of the program to the beginning
produces an endless loop. Such a program continues to run without
interruption.
A valid command must be present in the target location, otherwise the
error message ‘Illegal command’ will be generated.
The program proceeds to the target location following the time period of
one cycle.
JSR – Jump to Subroutine
or
Start instruction of the subroutine
In programs containing several identical functions, the programming can
be simplified by entering repeat functions into a subroutine.
A program structure is thus clearer and shorter.
The return from a subroutine is always automatically to the instruction with
the next sequential number following the instruction which initiated the
jump to the subroutine.
A maximum of 127 subroutine levels are possible. At more than 127
levels, the error message ‘JSR nesting’ is generated.
Note:
The last instruction in each subroutine must be an 'RTS'
(Return From Subroutine) command. If this command is
invoked without first jumping to a subroutine, the error
message ‘RTS nesting’ is generated.
The program proceeds to the start instruction following the time period of
one cycle.
JMP V601
JMP 0123
JSR V601
JSR 0123
Содержание CLM1.4
Страница 117: ...7 20 Functions CLM01 4 LAP 01VRS DOK CONTRL CLM01 4LAP1 FK01 EN P Notes...
Страница 205: ...9 42 Interfaces CLM01 4 LAP 01VRS DOK CONTRL CLM01 4LAP1 FK01 EN P Notes...
Страница 213: ...10 8 Command Communications CLM01 4 LAP 01VRS DOK CONTRL CLM01 4LAP1 FK01 EN P Notes...
Страница 233: ...11 20 Diagnostic Messages CLM01 4 LAP 01VRS DOK CONTRL CLM01 4LAP1 FK01 EN P Notes...
Страница 272: ......
Страница 273: ...Printed in the U S A Barcode...