Rockwell Automation 1772-LV Mini-PLC - 2/15 Programmable Controller (Series B) Programming and Operations User Manual
Page 76

Advanced Instruction Set
Chapter 6
6Ć19
WARNING: Do not place a label instruction in a ZCL or MCR
zone. When jumping over a start fence, the processor will
execute the program from the label to the end fence as if the start
fence had been true, i.e. outputs controlled by the rungs. The
start fence may have been false intending that all outputs within
the zone be controlled by the output override instruction, i.e. off
for MCR or last state for ZCL instructions. Unpredictable
machine operation could occur with possible damage to
equipment and/or injury to personnel.
Jump to Subroutine
Symbol: -(JSR)-
Purpose: Used with label instruction to instruct the processor to jump from the
main program to the label instruction having the same identification number in
the subroutine area. Executes the subroutine.
Syntax: Programmed as an output instruction. This instruction must always
cause the processor to cross the boundary from the main program to the
subroutine area.
Function: Execution takes place only on true conditions.
Return
Symbol: -(RET)-
Purpose: Terminates a subroutine and returns the processor to the main
program.
Syntax: Programmed as an output instruction without an identification number
in the subroutine area. It is usually programmed unconditional. Refer to
Figure 6.9. Every subroutine must have a return instruction.
Function: Returns the processor to the instruction immediately following the
jump to subroutine instruction. The main program continues to operate.