673
Subroutines Section 3-18
Example 2: Sequential (Non-nested) Subroutines
When CIO 0.00 is ON in the following example, subroutine 1 is executed and
program execution returns to the next instruction after SBS(091) 1. When
CIO 0.01 is ON, subroutine 2 is executed and program execution returns to
the next instruction after SBS(091) 2.
1
3
5
2
4
A→S1→B→S2→C
A→S1→B→C
A→B →S2→C
A→B →C
CIO 0.00 ON
CIO 0.01 ON
0.00
0.00
0.01
0.01
Subroutines
Pro