![Omron CJ1G-CPUxx Instructions Manual Download Page 745](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491745.webp)
724
Subroutines
Section 3-19
Example 3: Nested Subroutines
When CIO 000000 is ON in the following example, subroutine 1 is executed.
If CIO 000001 is ON, subroutine 2 is executed from within subroutine 1 and
program execution returns to the next instruction after SBS(091) 2 when sub-
routine 2 is completed. Execution of subroutine 1 continues and program exe-
cution returns to the next instruction after SBS(091) 1 when subroutine 1 is
completed.
1
3
5
2
4
A
→
S1
→
B
→
S2
→
C
A
→
S1
→
B
→
C
A
→
B
→
S2
→
C
A
→
B
→
C
Main program
Subroutines
CIO 000000 ON
CIO 000001 ON
Order of execution
Program end
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...