Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 736

Table of Contents

Advertisement

3. Instructions
Precautions
The regular SUBROUTINE CALL instruction, SBS(091), cannot call a global subroutine region
(GSBN(751) to GRET(752)).
GSBS(750) will not be executed when it is within a program section interlocked by IL(002) and
ILC(003), so interlocks are not allowed within global subroutine regions.
• Observe the following precautions when using differentiated instructions (UP, DOWN, DIFU(013),
DIFD(014), or up/down differentiated instructions) in subroutines.
The operation of differentiated instructions in a global subroutine is unpredictable if a subroutine is
executed more than once in the same cycle. In the following example, global subroutine 1 is executed
when CIO 0.00 is ON and CIO 1.00 is turned ON by DIFU(013) when CIO 0.01 has gone from OFF
to ON. If CIO 0.01 is ON in the same cycle, global subroutine 1 will be executed again but this time
DIFU(013) will not detect the rising edge of CIO 0.01 and CIO 1.00 will be turned OFF.
700
Cyclic task 1
0.00
GSBS
1
Cyclic task 2
0.01
GSBS
1
Interrupt task 0
GSBN
1
0.01
DIFU
100
GRET
Executed
again
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents