Data Registers - Omron CJ2 CPU UNIT SOFTWARE User Manual

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

6-20 Data Registers

The sixteen Data Registers (DR0 to DR15) are used to offset the PLC memory addresses in Index Reg-
isters when addressing words indirectly. The Data Registers can be used to specify an offset to add to
an Index Register when addressing words indirectly.
Data registers can be used independently for each task or shared between tasks.
The value in a Data Register can be added to the PLC memory address in an Index Register to specify
the absolute memory address of a bit or word in I/O memory. Data Registers contain signed binary
data, so the content of an Index Register can be offset to a lower or higher address.
Normal instructions can be use to store data in Data Registers.
Data Registers cannot be force-set or force-reset.
Set to a base value
with MOVR(560) or
MOVRW(561).
Examples
The following examples show how Data Registers are used to offset the PLC memory addresses in
Index Registers.
LD DR0 ,IR0
Adds the contents of DR0 to the contents of IR0 and loads the bit at that PLC memory address.
MOV(021) #1 DR0 ,IR1
Adds the contents of DR0 to the contents of IR1 and writes #1 to that PLC memory address.
Range of Values
The contents of data registers are treated as signed binary data and thus have a range of –32,768 to
32,767. (Negative values are given as the two's complement.)
Hexadecimal content
8000 to FFFF
0000 to 7FFF
Data Register Initialization
The Data Registers will be cleared in the following cases:
• The operating mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa
and the IOM Hold Bit is OFF.
• The PLC's power supply is cycled and the IOM Hold Bit is OFF or not set to be held in the PLC
Setup.
• A fatal error occurs (except for one created with FALS(007)).
CJ2 CPU Unit Software User's Manual
Pointer
IR0
Set with a
regular
instruction.
DR0
Decimal equivalent
−32,768 to −1
0 to 32,767
6 I/O Memory Areas
I/O Memory
6
6-41

Advertisement

Table of Contents
loading

Table of Contents