Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 43

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Programming Concepts
Operand
Specifying
DR offset
an indirect
address
using a reg-
ister
Auto Incre-
ment
Auto Dec-
rement
10
Description
The bit or word with the PLC memory
address in IR@ + the contents of DR@ is
specified.
Specify DR@ ,IR@. DR (data register)
contents are treated as signed-binary
data. The contents of IR@ will be given a
negative offset if the signed binary value
is negative.
The contents of IR@ is incremented by
+1 or +2 after referencing the value as
an PLC memory address.
+1: Specify ,IR@+
+2: Specify ,IR@ + +
Note The auto increment operation will
not be executed for a CP1L CPU
Unit if a P_ER or P_AER error
occurs during instruction execu-
tion.
The contents of IR@ is decremented by
–1 or –2 after referencing the value as
an PLC memory address.
–1: Specify ,–IR@
–2: Specify ,– –IR@
Note The auto decrement operation will
not be executed for a CP1L CPU
Unit if a P_ER or P_AER error
occurs during instruction execu-
tion.
Notation
Application examples
DR0 ,IR0
DR0,IR0
Loads the bit with the PLC memory
address in IR0 + the value in DR0.
DR0 ,IR1
MOV(021)
#1
DR0 ,IR1
Stores #0001 in the word with the PLC
memory address in IR1 + the value in
DR0.
,IR0 ++
,IR0 ++
Increments the contents of IR0 by 2
after the bit with the PLC memory
address in IR0 is loaded.
,IR1 +
MOV(021)
#1
,IR1 +
Increments the contents of IR1 by 1
after #0001 is stored in the word with
the PLC memory address in IR1.
,– –IR0
,
IR
After decrementing the contents of IR0
by 2, the bit with the PLC memory
,–IR1
address in IR0 is loaded.
MOV(021)
#1
, IR1
After decrementing the contents of IR1
by 1, #0001 is stored in the word with
the PLC memory address in IR1.
Section 1-1

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CP - PROGRAMMING MANUAL 05-2007 and is the answer not in the manual?

Questions and answers

Table of Contents