Omron CJ2 CPU UNIT SOFTWARE User Manual page 351

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

Programming Example 2
This example shows background execution when index register output is specified, as is possible for
MAX(182), MIN(183), and SRCH(181).
Programming without Background Execution
As shown below, the PLC memory map address of the word containing the maximum or minimum
value is output to an index register.
Execution condition
a
Programming with Background Execution
With background execution, the PLC memory map address of the word containing the maximum or
minimum value is output to A595 and A596. MOVL(498) is then used to move the PLC memory map
address to the index register.
Communications
Port Enabled
Execution
Flag
condition
a
A202.00
Communications
Execution
Port Enabled
condition
Flag
b
A202.00
CJ2 CPU Unit Software User's Manual
MAX
MAX(182) is executed completely as
soon as the execution condition "a" turns
D0
ON, and the actual memory map address
D100
of the word containing the maximum
D200
value is output to IR0
MOV
The contents of the I/O memory word
indicated by the memory map
,IR0
address in IR0 is copied to D300.
D300
MAX(182) execution is started if execution
MAX
condition "a" is ON and the Communications
D0
Port Enabled Flag is ON. The actual memory
D100
map address of the word containing the
D200
maximum value is output to A595 and A596.
Execution condition "b" is turned ON to
SET
execute MOVL(498).
b
"a" is turned OFF so that MAX(182) will not
RSET
be executed in the next cycle.
a
When execution condition "b" is ON
MOVL
and the Communications Port
A595
Enabled Flag is ON, MOVL(498)
IR0
copies the actual memory map
address in A595 and A596 to IR0.
MOV
The contents of the I/O memory word
indicated by the memory map
,IR0
address in IR0 is copied to D300.
D300
RSET
b
10 CPU Unit Functions
Extra
processing
required to
move
address.
10-17
10

Advertisement

Table of Contents
loading

Table of Contents