736
Subroutines
Section 3-19
from OFF to ON. If CIO 000001 is ON in the same cycle, global subroutine
0001 will be executed again but this time DIFU(013) will not detect the rising
edge of CIO 000001 and CIO 000100 will be turned OFF.
In contrast, the output of a differentiated instruction (DIFU(013) or DIFD(014))
would remain ON if the instruction was executed and the output was turned
ON but the same global subroutine wasn’t called a second time.
In the following example, global subroutine 0001 is executed if CIO 000000 is
ON. Output CIO 000100 is turned ON by DIFU(013) when CIO 000001 has
gone from OFF to ON. If CIO 000000 is OFF in the following cycle, subrou-
tine 0001 won’t be executed again and output CIO 000100 will remain ON.
GSBS
1
000000
GSBS
1
000001
GSBN
1
DIFU
000100
000001
GRET
Cyclic task 1
Cyclic task 2
Interrupt task 0
Executed
again
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...