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 #213 background imageLoading...
Page #213 background image
Jump Instructions and
Subroutine Programming
Chapter 11
1111
Figure 11.9
Representative
Subroutine Area
()
()
|| || | / |
|| | / |LBL
XX
( RET )
()||LBL
XX
( RET )
()||LBL
XX
( RET )
Main Program
Subroutine Area
(Subroutine #1)
(Subroutine #2)
(Subroutine #8)
End
The label is the first
instruction in each
subroutine.
Up to sixtyfour (64)
subroutines can
be programmed
if no jumps are
programmed.
The return is the
last instruction in its
subroutine.
Subroutine boundary serves
as end statement for main
program.
A subroutine may call another subroutine (Figure 11.10a) which, in turn,
may call another subroutine. This nesting process can continue until eight
levels of calls are involved.
Figure 11.10 (a) shows three levels of nested subroutines. The main
program calls Level 1 at label 01 (a). Level 1, in turn, calls Level 2 at label
02 (b). Note that Level 1 subroutine issued the command to jump to label
02 before all the steps in Level 1 were completed. Likewise, Level-2
subroutine issued the command to jump to label 03 (c) before completing
all Level-2 steps.
Level-3 subroutine, the last subroutine in the next, is executed to its return
instruction (d). Each return instruction returns processor execution to the
instruction immediately following the JSR that initiated the subroutine (e
and f). Execution continues from that point.
11.3.2
Nested Subroutines
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