5 I/O Memory
5-20
CP2E CPU Unit Software User’s Manual(W614)
Precautions for Correct Use
Precautions for Correct Use
• Always set the value of an index register (IR) before using the index register. Operation will not
be dependable if an index register is used without first setting its value.
• The value of an index register will not be dependable after an interrupt task is started. When
using an index register in an interrupt task, set the value using MOVR or MOVRW before using
the index register. (MOVRW is used for timer/counter PVs and MOVR is used for other values.)
Additional Information
• When an Index Register is used as an operand without a “,” prefix, the instruction 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 instructions shown in the following table. Use these instruc-
tions 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.
z
Direct Addressing
z
Precautions
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 pos-
sible 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-Pro-
grammer.
Additional Information
The contents of an index register used inside a function block may be corrupted when the func-
tion block is called. Always save the contents of the index register before calling the function
block and then restore the contents after leaving the function block. Set the required contents in
the index register inside the function block.
Instruction group
Instruction name
Mnemonic
Data Movement
Instructions
MOVE TO REGISTER
MOVR(560)
MOVE TIMER/COUNTER PV TO REGISTER
MOVRW(561)
DOUBLE MOVE
MOVL(49
8
)
Increment/Decrement
Instructions
DOUBLE INCREMENT BINARY
++L(591)
DOUBLE DECREMENT BINARY
– –L(59
3
)
Comparison Instructions
DOUBLE EQUAL
=L(
3
01)
DOUBLE NOT EQUAL
< >
L(
3
06)
DOUBLE LESS THAN
<
L(
3
11)
DOUBLE LESS THAN OR EQUAL
<
=L(
3
16)
DOUBLE GREATER THAN
>
L(
3
21)
DOUBLE GREATER THAN OR EQUAL
>
=L(
3
26)
DOUBLE COMPARE
CMPL(060)
Symbol Math Instructions
DOUBLE SIGNED BINARY ADD WITHOUT CARRY
+L(401)
DOUBLE SIGNED BINARY SUBTRACT WITHOUT CARRY –L(411)
Sa
ve
Re
s
tore
In
s
tr
u
ction
s
us
ing the index
regi
s
ter
F
u
nction
b
lock
In
s
tr
u
ction
s
us
ing the index
regi
s
ter
[MOVL IR0 Tempor
a
ry intern
a
l
a
ddre
ss
]
P_On
P_On
[MOVL Tempor
a
ry intern
a
l
a
ddre
ss
IR0]
S
et the re
qu
ired content
s
in the
index regi
s
ter in
s
ide the f
u
nction
b
lock definition.
Содержание SYSMAC CP Series
Страница 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...
Страница 3: ......
Страница 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Страница 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Страница 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Страница 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Страница 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Страница 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Страница 577: ......