![Omron CJ1G-CPU series Programming Manual Download Page 270](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489270.webp)
249
Cycle Time/High-speed Processing
Section 6-1
Programming Example 1
■
Traditional Programming without Background Execution
As shown below, processing is completed when the instruction is executed.
■
Programming with Background Execution
With background execution, the program is changed so that MAX(182) is exe-
cuted only when the specified Communications Port Enabled Flag is ON (i.e.,
only when the port is not already being used for background execution or net-
work communications). Also, input conditions are controlled with SET and
RESET instructions to ensure that processing is performed in the correct
order. (Communications port 0 is used for background execution in the follow-
ing example.)
MAX
D00000
D00100
D00200
a
SUM
D00002
D00100
D00201
Execution condition
MAX(182) is executed completely as soon
as the execution condition “a” turns ON.
SUM(184) can be executed immediately
after MAX(182).
RSET
a
SET
b
MAX
D00000
D00100
D00200
a A20200
RSET
b
SUM
D00002
D00100
D00201
b A20200
SET
c
c
A20200
Execution
condition
Execution condition “b” is turned ON to
enable the next background instructions
(here, SUM(184)).
SUM(184) execution is started if
execution condition “b” is ON and the
Communications Port Enabled Flag is ON
(i.e., when MAX(182) execution has been
completed).
MAX(182) execution is started if execution
condition “a” is ON and the Communications
Port Enabled Flag is ON.
“a” is turned OFF so that MAX(182) will not
be executed the next cycle.
“b” is turned OFF so that SUM(184) will not
be executed the next cycle.
Execution of SUM(184) has been completed
when “c” is ON and the Communications
Port Enabled Flag is ON.
“c” is turned ON to enable confirming the
completion of SUM(184).
Confirmation of
completion of
background
execution
Communications
Port Enabled Flag
Execution
condition
Communications
Port Enabled Flag
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...