Omron SYSMAC CS Series Instruction & Reference Manual page 49

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Operand
Specifying a
An index register (IR) or a data register (DR) is
register directly
specified directly by specifying IR@ (@: 0 to 15) or
(See note.)
DR@ (@: 0 to 15).
Specifying an
Indirect address
indirect address
(No offset)
using a register
(See note.)
Constant
offset
DR offset
Auto-increment
Auto-decrement The contents of IR@ is decre-
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Description
The bit or word with the PLC
memory address contained in
IR@ will be specified. Specify
,IR@ to specify bits and words for
instruction operands.
The bit or word with the PLC
memory address in IR@ + or − the
constant is specified. Specify +/−
constant ,IR@. Constant offsets
range from −2048 to +2047 (deci-
mal). The offset is converted to
binary data when the instruction is
executed.
The bit or word with the PLC
memory address in IR@ + the
contents of DR@ is specified.
Specify DR@ ,IR@. DR (data reg-
ister) 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 incre-
mented by +1 or +2 after refer-
encing the value as an PLC
memory address.
+1: Specify ,IR@+
+2: Specify ,IR@ + +
mented by −1 or −2 after referenc-
ing the value as an PLC memory
address.
−1: Specify ,−IR@
−2: Specify ,−−IR@
Note For specific application methods, refer to the SYSMAC CS/CJ/NSJ-series
Programmable Controllers Programming Manual (Cat. No. W394) and the
SYSMAC CJ-series CJ2 CPU Unit Software User's Manual (Cat. No. W473).
1. Basic Understanding of Instructions
Notation
Application examples
IR0
MOVR 1.02 IR0
Stores the PLC memory address for
CIO 0010 in IR0.
IR1
MOVR 10 IR1
Stores the PLC memory address for
CIO 0010 in IR1.
,IR0
LD ,IR0
Loads the bit with the PLC memory
address in IR0.
,IR1
MOV #0001 ,IR1
Stores #0001 in the word with the
PLC memory in IR1.
+5 ,IR0
LD +5 ,IR0
Loads the bit with the PLC memory
address in IR0 + 5.
31 ,IR1
MOV #0001 +31 ,IR1
Stores #0001 in the word with the
PLC memory address in IR1 + 31
DR0 ,IR0 LD DR0 ,IR0
Loads the bit with the PLC memory
address in IR0 + the value in DR0.
DR0 ,IR1 MOV #0001 DR0 ,IR1
Stores #0001 in the word with the
PLC memory address in IR1 + the
value in DR0.
,IR0++
LD ,IR0 ++
Increments the contents of IR0 by 2
after the bit with the PLC memory
address in IR0 is loaded.
,IR1+
MOV #0001 ,IR1 +
Increments the contents of IR1 by 1
after #0001 is stored in the word
with the PLC memory address in
IR1.
,−−IR0
LD ,−−IR0
After decrementing the contents of
IR0 by 2, the bit with the PLC mem-
ory address in IR0 is loaded.
,IR1
MOV #0001 ,−IR1
After decrementing the contents of
IR1 by 1, #0001 is stored in the
word with the PLC memory address
in IR1.
1
15

Advertisement

Table of Contents
loading

Table of Contents