Omron CJ2 CPU UNIT SOFTWARE User Manual page 245

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

Advertisement

Direct Addressing
Instruction group
Data Movement Instruc-
tions
Table Data Processing
Instructions
Tracking Instructions
Increment/Decrement
Instructions
Comparison Instructions
Symbol Math Instructions
The SRCH(181), MAX(182), and MIN(183) instructions can output the PLC memory address of the
word with the desired value (search value, maximum, or minimum) to IR0. In this case, IR0 can be
used in later instructions to access the contents of that word.
Precautions
• Do not use Index Registers until a PLC memory address has been set in the register. The pointer
operation will be unreliable if the registers are used without setting their values.
• The values in Index Registers are unpredictable at the start of an interrupt task. When an Index
Register will be used in an interrupt task, always set a PLC memory address in the Index Register
with MOVR(560) or MOVRW(561) before using the register in that task.
• Index Registers are processed independently in each task, so they do not affect each other. For
example, IR0 used in Task 1 and IR0 used in Task 2 are different. Consequently, each Index Reg-
ister task has 16 Index Registers.
• It is possible to read the Index Register for only the last task executed within the cycle from the
CX-Programmer. If using Index Registers with the same number to perform multiple tasks, it is
only possible with the CX-Programmer to read the Index Register value for the last task performed
within the cycle from the multiple tasks. Nor is it possible to write the Index Register value from the
CX-Programmer.
Sharing Index Registers
The following setting can be made from the PLC Properties Dialog Box in the CX-Programmer to
control sharing index and data registers between tasks.
To share index registers between all tasks, clear the selection of the Use IR/DRs independently per
task Check Box in the PLC Properties Dialog Box.
CJ2 CPU Unit Software User's Manual
Instruction name
MOVE TO REGISTER
MOVE TIMER/COUNTER PV TO REGISTER
DOUBLE MOVE
DOUBLE DATA EXCHANGE
SET RECORD LOCATION
GET RECORD NUMBER
Unsigned One-word Record Search Instructions
UNSIGNED ONE-WORD RECORD SORT
DOUBLE INCREMENT BINARY
DOUBLE DECREMENT BINARY
DOUBLE EQUAL
DOUBLE NOT EQUAL
DOUBLE LESS THAN
DOUBLE LESS THAN OR EQUAL
DOUBLE GREATER THAN
DOUBLE GREATER THAN OR EQUAL
DOUBLE COMPARE
DOUBLE SIGNED BINARY ADD WITHOUT CARRY
DOUBLE SIGNED BINARY SUBTRACT WITHOUT
CARRY
6 I/O Memory Areas
Mnemonic
MOVR(560)
MOVRW(561)
MOVL(498)
XCGL(562)
SETR(635)
GETR(636)
RSRCH
(360 to 364)
RSORT(203)
++L(591)
− −L(593)
=L(301)
< >L(306)
< L(311)
< =L(316)
> L(321)
> =L(326)
CMPL(060)
+L(401)
−L(411)
6-39
6

Advertisement

Table of Contents
loading

Table of Contents