EasyManuals Logo
Home>Allen-Bradley>Controller>PLC-2/30

Allen-Bradley PLC-2/30 User Manual

Allen-Bradley PLC-2/30
348 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #216 background imageLoading...
Page #216 background image
Jump Instructions and
Subroutine Programming
Chapter 11
1114
The Return instruction is an output instruction (Figure 11.11). It is used
only in the subroutine area to terminate a subroutine and to return program
execution to the main program (Figure 11.8) or, in the case of nested
subroutines, to return program execution to the preceding subroutine
(Figure 11.11). It returns program execution to the instruction immediately
following the JSR that initiated the subroutine. Program execution
continues from that point.
CAUTION: Every subroutine must have a Return instruction.
If not, the processor will scan the subsequent subroutine(s) until
a Return instruction is found. For this reason, it is recommended
that Return instructions be programmed unconditionally.
The return instruction does not have a user-assigned identification number
because it may be paired by the processor with any one of several JSR
instructions as the result of multiple jumps to the subroutine area. This is
illustrated by Figure 11.3.
Instruction overview:
Output instruction
Every subroutine must have a return instruction.
Should be used in an unconditional rung.
Processor is returned to the instruction after the JSR that initiated the
subroutine
Uses 1 word of memory.
Does not have a 2-digit identification number
Causes of run-time errors:
NOTE: Do not misuse the Return instruction. Misuse generally results in
a run-time error which causes the processor to fault. Misuse will cause the
following run-time errors:
Processor finds no return from the subroutine area.
Using a return instruction outside the subroutine area
Figure 11.11
RETURN
Format
(
RET )
11.4
Return Instruction
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley PLC-2/30 and is the answer not in the manual?

Allen-Bradley PLC-2/30 Specifications

General IconGeneral
BrandAllen-Bradley
ModelPLC-2/30
CategoryController
LanguageEnglish

Related product manuals