Omron CX-PROGRAMMER V9 - REV 12-2009 Operation Manual page 175

Table of Contents

Advertisement

OMRON
after the address being offset. The offset can be an integer or an address or symbol that specifies integer data.
Offsets can be set be set for bit addresses and word addresses.
The format to specify an offset is as follows:
A[B]
Offset
Address being offset
The above example specifies that address (A) is offset by the value specified by the offset (B) (see note). If the
address being offset is a bit address, then the offset specifies the number of bits. If the address being offset is a
word address, then the offset specifies the number of words.
An array variable that uses a word address or symbol to specify the subscript cannot be used as an operand in an
instruction for which immediate refreshing is specified.
Note:
Address Incremental Copying
Overview
Address Incremental Copying makes it easy to make multiple copies of a ladder program section when the only
differences between multiple program sections are the addresses. By specifying the offsets for the addresses in
the copied program section, the specified number of program sections can be created with the addresses
incremented.
Symbol names and I/O comments will be created automatically.
Operation
In Ladder View, select the program section that is to be copied. Select Address Incremental Copy from the Edit
Menu to display the dialog box. Input the data in the dialog box, and press the Paste Button. A program section
will be created with the addresses incremented automatically, and it will be inserted in the next program
location.
Example
In this example, two copies are made of the following program section, bit offset is set to 16, the word (CH)
offset is set to 10, and then the program section is pasted.
1, 2, 3...
Observe the following precaution when specifying a symbol or word address for an offset in a
ladder program.
When using a symbol or address to indirectly specify an offset for a memory address, be sure
that the resulting address is not outside the memory area that contains original address. For
example, use a symbol comparison instruction to ensure that processing is performed only
when the memory area is not exceeded. If the final address (i.e., the original address plus the
specified offset) exceeds the memory area, data in another memory area will be read or
written, possibly resulting in unexpected operation.
1. Select the program section to be copied.
2. Select Address Incremental Copy from the Edit Menu.
The Address Incremental Copy Dialog Box will be displayed.
3. In the Offset Field, input 16 in the Bit Box and 10 in the CH Box.
PART 1: CX-Programmer
CHAPTER 4 – Reference
CX-Programmer _Page 95

Advertisement

Table of Contents
loading

Table of Contents