Omron CS1G/H-CPUxxH Instructions Manual page 745

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Subroutines
Main program
Subroutines
724
Program end
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
CIO 000000 ON
3
CIO 000001 ON
5
2
4
Section 3-19
Order of execution
A→S1→B→S2→C
A→S1→B→C
A→B→S2→C
A→B→C

Advertisement

Table of Contents
loading

Table of Contents