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.

5 Understanding Programming5-8 Specifying Address Offsets5-8-1 OverviewWhen an address is specified in an instruction operand, it is possible to change the specified addressby specifying an offset for in brackets after the specified address.When the start address isD0.0 and W0 is &2, 2 isadded, resulting in D0.2.Examples of SpecifyingBit Address OffsetsWhen the start address isD100 and W1 is &3, 3 isadded, resulting in D103.An offset of 4 is added tothe start address of 10.0,resulting in 10.4.An offset of 12 is addedto start address of D100,resulting in D112.Examples of SpecifyingWord Address Offsets Bit AddressesThe bit address is offset by the amount specified by n (number of bits) from A (start bit address).A[n]Offset (number of bits)Start bit addressWordBitOffset (number of bits): n15 14 13 12 11 10 9 8 7 6 5 4 3 2 10Start bit address: AStart Bit AddressIt is possible to specify the start bit address with a bit address or with a symbol (except for STRINGor NUMBER data types). Offsetting is possible only for addresses in the H, W, DM, and EM Areas.I/O comments indicate the I/O comments for this start bit address.OffsetThe offset can be specified as a decimal constant, word address (but CIO Area addresses cannotbe specified), or one-word symbol (i.e., symbols with the following data types: INT, UINT, WORD,CHANNEL). If a word address is specified, the contents of the specified word is used as the offset.If the offset exceeds bit 15 in the specified word, offsetting will continue from bit 00 in the next word.If the offset is specified indirectly, make sure that the final bit address does not exceed the upperlimit by using input comparison or other instruction.If the number of offset bits exceeds the memory area of the start bit address, the final bit address willbe in the next memory area in the order determined by the actual PLC memory addresses. (Forinformation on the arrangement of area in the memory map, refer to A-4 Memory Map of PLC MemoryAddresses.5-92 <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!