3. Instructions
690
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Example Programming
z 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.
Subroutines
Program end
Main program
1
3
5
2
4
B→S2→C
B→C
S2→C
C
CIO 0.00 ON
CIO 0.01 ON
0.01
0.00
A→S1→
A→S1→
A→B→
A→B→
0.010.00
Order of execution