Omron SYSMAC CV Series Operation Manual page 83

Ladder diagrams
Hide thumbs Also See for SYSMAC CV Series:
Table of Contents

Advertisement

Index and Data Registers (IR and DR)
Offset Indirect Addressing
Auto-increments and
Auto-decrements
of the hexadecimal address and adding the bit number as the rightmost digit.
For example, the CIO bit 190000 is designated by $76CA where 76C is the
rightmost three digits of the memory address (CIO word 1900 is $076C) and
A is bit 10.
The PC memory address indicated in an Index Register can be offset by a
specified constant or by the content of a Data Register (DR0, DR1, or DR2)
by inputting the constant or the Data Register before the "," prefix. The
constant must be in BCD between –2047 and +2047. To offset the indirect
addressing by +31 words, simply input +31, before the "," prefix, as shown.
(030)
MOV
D00000 +31,IR0
Indirect
address
If a Data Register is input before the "," prefix, the content of the Data Register
will be added to the content of the Index Register, and the result is the PC
memory address that is indirectly addressed. If the result exceeds $FFFF, the
carry to the fifth digit is truncated (effectively subtracting $10000 (65,536, deci-
mal) from the result). In the following example, DR1 is added to IR0. The content
of DR1 is $FFE1, so adding $FFE1 is equivalent to subtracting 1F ($0FFE1 –
$10000 = –1F), for all IR0 values greater than or equal to $001F.
(030)
MOV
D00000 DR1,IR0
Indirect
address
An auto-increment increases the contents of an Index Register by 1 or 2 after
executing the instruction. A "+" suffix indicates an auto-increment of 1, and a
"++" suffix indicates an auto-increment of 2.
An auto-decrement decreases the contents of an Index Register by 1 or 2 before
executing the instruction. A"–" prefix indicates an auto-decrement of 1, and a
"––" prefix indicates an auto-decrement of 2. The notation for auto-increments
and auto-decrements is as follows:
,IRn+: After execution, increase the contents of IRn by 1.
,IRn++: After execution, increase the contents of IRn by 2.
,–IRn: Decrease the contents of IRn by 1 before execution.
,––IRn: Decrease the contents of IRn by 2 before execution.
Both an auto-increment and an auto-decrement are used in the following exam-
ple. The data movement for the first execution is shown. The second execution
Word
Content
D00000
08FC
08FC moved
to CIO 1931.
Register
Content
IR0
076C
+31
1F
078B
Word
Content
D00000
08FC
08FC moved
to CIO 1869.
Register
Content
DR1
FFE1
IR0
076C
1074D
Section 3-12
Word
Content
CIO 1931
08FC
Indicates 078B
(CIO 1931)
Word
Content
CIO 1869
08FC
Indicates 074D
(CIO 1869)
71

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cv2000Cvm1Cv500Cv1000

Table of Contents