EasyManuals Logo
Home>Omron>Controller>CQM1H - PROGRAM

Omron CQM1H - PROGRAM User Manual

Omron CQM1H - PROGRAM
602 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 #403 background imageLoading...
Page #403 background image
378
Subroutine Instructions Section 5-27
SBS(91) may also be placed into a subroutine to shift program execution from
one subroutine to another, i.e., subroutines may be nested. When the second
subroutine has been completed (i.e., RET(93) has been reached), program
execution returns to the original subroutine which is then completed before
returning to the main program. Nesting is possible to up to sixteen levels. A
subroutine cannot call itself (e.g., SBS(91) 000 cannot be programmed within
the subroutine defined with SBN(92) 000). The following diagram illustrates
two levels of nesting.
The following diagram illustrates program execution flow for various execution
conditions for two SBS(91).
Flags ER: A subroutine does not exist for the specified subroutine number.
A subroutine has called itself.
An active subroutine has been called.
!Caution SBS(91) will not be executed and the subroutine will not be called when ER is
ON.
SBN(92) 010 SBN(92) 011 SBN(92) 012
SBS(91) 011
RET(93)
SBS(91) 010
SBS(91) 012
RET(93) RET(93)
SBS(91) 000
SBS(91) 001
SBN(92) 000
RET(93)
SBN(92) 001
RET(93)
END(01)
Main
program
Subroutines
A
B
C
D
E
A
A
A
A
B
B
B
B
C
C
C
C
D
D
E
E
OFF execution conditions for
subroutines 000 and 001
ON execution condition for
subroutine 000 only
ON execution condition for
subroutine 001 only
ON execution conditions for
subroutines 000 and 001

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CQM1H - PROGRAM and is the answer not in the manual?

Omron CQM1H - PROGRAM Specifications

General IconGeneral
BrandOmron
ModelCQM1H - PROGRAM
CategoryController
LanguageEnglish

Related product manuals