![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268853.webp)
814
Subroutines
Section 3-19
Note
A subroutine can be called more than once in a program.
Subroutines and
Differentiation
Observe the following precautions when using differentiated instructions
(DIFU(013), DIFU(014), or up/down differentiated instructions) in subroutines.
The operation of differentiated instructions in a subroutine is unpredictable if a
subroutine is executed more than once in the same cycle. In the following
example, subroutine 0001 is executed when CIO 000000 is ON and
CIO 000100 is turned ON by DIFU(013) when CIO 000001 has gone from
OFF to ON. If CIO 000001 is ON in the same cycle, subroutine 0001 will be
executed again but this time DIFU(013) will turn CIO 000100 OFF without
checking the status of CIO 000001.
Execution condition ON
Main program
Execution condition ON
Subroutine
program n
Two-level
nesting
Subroutine
program m
Program end
1
3
2
4
5
1
1
1
Subroutine
0001
The subroutine is
executed again.
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...