164
Index Registers
Section 4-11
Setting Index Registers
Always set the required value in an index register before using it. The contents
of an index register will be unpredictable if it is not set in advance.
The contents of an index register is also unpredictable after an interrupt task
is started. When using index registers inside an interrupt task, use
MOVR(560) (for anything but timer/counter PVs) or MOVRW(561) (for
timer/counter PVs) to set the required value.
Direct Addressing
When an Index Register is used as an operand without a “,” prefix, the instruc-
tion will operate on the contents of the Index Register itself (a two-word or
“double” value). Index Registers can be directly addressed only in the instruc-
tions shown in the following table. Use these instructions to operate on the
Index Registers as pointers.
The Index Registers cannot be directly addressed in any other instructions,
although they can usually be used for indirect addressing.
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.
Instruction group
Instruction name
Mnemonic
Data Movement
Instructions
MOVE TO REGISTER
MOVR(560)
MOVE TIMER/COUNTER PV TO REG-
ISTER
MOVRW(561)
DOUBLE MOVE
MOVL(498)
DOUBLE DATA EXCHANGE
XCGL(562)
Table Data Processing
Instructions
SET RECORD LOCATION
SETR(635)
GET RECORD NUMBER
GETR(636)
Increment/Decrement
Instructions
DOUBLE INCREMENT BINARY
++L(591)
DOUBLE DECREMENT BINARY
– –L(593)
Comparison Instructions
DOUBLE EQUAL
=L(301)
DOUBLE NOT EQUAL
< >
L(306)
DOUBLE LESS THAN
<
L(311)
DOUBLE LESS THAN OR EQUAL
<
=L(316)
DOUBLE GREATER THAN
>
L(321)
DOUBLE GREATER THAN OR EQUAL
>
=L(326)
DOUBLE COMPARE
CMPL(060)
Symbol Math Instructions DOUBLE SIGNED BINARY ADD WITH-
OUT CARRY
+L(401)
DOUBLE SIGNED BINARY SUBTRACT
WITHOUT CARRY
–L(411)
Summary of Contents for CP1L CPU UNIT - 03-2009
Page 1: ...Cat No W462 E1 06 CP1L CPU Unit SYSMAC CP Series CP1L L_0D_ CP1L M_0D_ OPERATION MANUAL...
Page 2: ......
Page 4: ...iv...
Page 10: ...x...
Page 22: ...xxii...
Page 34: ...xxxiv Conformance to EC Directives 6...
Page 70: ...36 Function Blocks Section 1 5...
Page 584: ...550 Trouble Shooting Section 8 7...
Page 627: ...593 Sample Application Section 9 12 Network Settings Network Tab Network Settings Driver Tab...
Page 630: ...596 Sample Application Section 9 12...
Page 654: ...620 Troubleshooting Unit Errors Section 11 4...
Page 662: ...628 Replacing User serviceable Parts Section 12 2...
Page 668: ...634 Standard Models Appendix A...
Page 698: ...664 Auxiliary Area Allocations by Function Appendix C...
Page 746: ...712 Auxiliary Area Allocations by Address Appendix D...
Page 773: ...739 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 774: ...740 Connections to Serial Communications Option Boards Appendix F...
Page 806: ...772 Index...
Page 808: ...774 Revision History...