Omron SYSMAC CP Series Instruction & Reference Manual page 330

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions
Nested Subroutines
A
0.00
B
S1-1
0.01
S1-2
S2
When CIO 0.00 is ON in the following example, subroutine 1 is executed. If CIO 0.01 is ON, subroutine
2 is executed from within subroutine 1 and program execution returns to the next instruction after
SBS(091) 2 when subroutine 2 is completed. Execution of subroutine 1 continues and program execu-
tion returns to the next instruction after SBS(091) 1 when subroutine 1 is completed.
2-294
1
CIO 0.00 ON
SBS
1
5
SBN
1
2
CIO 0.00 ON
SBS
2
4
RET
SBN
2
3
RET
END
0.00
0.01
ON
ON
Subroutine 1
ON
OFF
OFF
ON
OFF
OFF
Subroutine 2
CP1E CPU Unit Instructions Reference Manual(W483)
Order of execution
A → S1-1 → S2 → S1-2 → B
A → S1-1 → S1-2 → B
A → B
A → B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents