13.07.2015 Views

CJ2 CPU Unit Software User's Manual - CIP ETI

CJ2 CPU Unit Software User's Manual - CIP ETI

CJ2 CPU Unit Software User's Manual - CIP ETI

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6 I/O Memory Areas6-19 Data RegistersThe sixteen Data Registers (DR0 to DR15) are used to offset the PLC memory addresses in Index Registerswhen addressing words indirectly. The Data Registers can be used to specify an offset to add toan 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 specifythe absolute memory address of a bit or word in I/O memory. Data Registers contain signed binarydata, 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 valuewith MOVR(560) orMOVRW(561).PointerI/O MemorySet with aregularinstruction.IR0DR0 ExamplesThe following examples show how Data Registers are used to offset the PLC memory addresses inIndex Registers.LD DR0 ,IR0Adds the contents of DR0 to the contents of IR0 and loads the bit at that PLC memory address.MOV(021) #1 DR0 ,IR1Adds the contents of DR0 to the contents of IR1 and writes #1 to that PLC memory address. Range of ValuesThe contents of data registers are treated as signed binary data and thus have a range of –32,768 to32,767. (Negative values are given as the two’s complement.)Hexadecimal content Decimal equivalent8000 to FFFF −32,768 to −10000 to 7FFF 0 to 32,767 Data Register InitializationThe Data Registers will be cleared in the following cases:• The operating mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versaand 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 PLCSetup.• A fatal error occurs (except for one created with FALS(007)).6-40 <strong>CJ2</strong> <strong>CPU</strong> <strong>Unit</strong> <strong>Software</strong> User’s <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!