In an Omron PLC system, each unit occupies a different address in the CIO area depending on its position or the specific characteristics of the unit. Understanding the address allocation and knowing the specific storage locations of input and output data allows for correct data processing through programming.
Lecture 1: Address Allocation for Omron PLCs
In the I/O memory, the input address of the CPU unit and the CP1W expansion unit occupies channels 000~016, and the output address occupies channels 100~116. One channel is what we call one word, which is also equal to 16 bits. In this article, we will take CP1H as an example to illustrate the rules of PLC address allocation.
1. CPU Unit Address Allocation
X and XA type CPUs
The X and XA type CPU units have 40 I/O points, including 24 inputs and 16 outputs. The input portion of the CIO area occupies channels 0 to 1, with a total of 24 input bits allocated:
① Among them, 12 bits are bits 00 to 11 of channel 0.
② The other 12 bits are bits 00 to 11 of channel 1.
③ Bits 12 to 15 that are not used in channels 0 and 1 will always be cleared and cannot be used as internal auxiliary working bits.
The X and XA type CPU units have 16 output points, occupying channels 100-101 in the CIO area output section, for a total of 16 output bits:
① Of these, 8 bits are bits 00 to 07 of channel 100.
② The other 8 bits are bits 00 to 07 of channel 101.
③ Bits 08 to 15 of channels 100 and 101 can be used as internal auxiliary working bits.
The CP1H-XA CPU has built-in analog inputs and outputs, with 4 analog inputs occupying channels 200-203 and 2 analog outputs occupying channels 210-211.
Y-type CPU
The CP1H-Y CPU has 20 built-in I/O points, including 12 inputs and 8 outputs. Due to the dedicated pulse input/output terminals, the inputs and outputs are assigned to non-contiguous addresses.
①Therefore, the inputs of the Y-type CPU unit occupy a total of 12 points in the CIO area, including channels 0 and 1.
② Bits 12 to 15 that are not used in channels 0 and 1 will always be cleared and cannot be used as internal auxiliary working bits.
The 8 output points of the Y-type CPU unit are also due to the dedicated pulse input/output terminals being occupied.
① The CPU unit's output occupies a total of 8 points in CIO areas, specifically channels 100 and 101.
② Bits 08 to 15, which are not used in channels 100 and 101, can be used as internal auxiliary working bits.
2. Extended Unit Address Allocation
The function of the expansion unit is to expand the input and output. The expansion unit starts from the next channel after the allocation channel of the CPU unit and allocates addresses sequentially.
CP1W expansion unit
If the CPU unit itself occupies input channels 0 and 1, and output channels 100 and 101, then the CP1W expansion unit connected later:
① Its inputs are allocated sequentially starting from channel 2, up to a maximum of 16 channels.
② Outputs are allocated sequentially starting from channel 102, up to a maximum of channel 116.
The basic I/O expansion unit of CP1W allocates different numbers of input/output channels depending on the number of input/output points. The bit allocation principle is the same as that of the CPU unit's input/output. For example, in an expansion unit with 12 inputs and 8 outputs, each input and output occupies one channel.
① Its input bits occupy bits 00 to 11 of the allocated channel. Unused bits 12 to 15 will always be cleared and cannot be used as internal auxiliary working bits.
② The output bits occupy bits 00 to 07 of the allocated channel, and the unused bits 08 to 15 can be used as internal auxiliary working bits.
For expansion units such as analog signals and temperature sensors, the addresses of their input and output channels are allocated according to the number of channels they occupy. For example, the CP1W-MAD11 is allocated 2 input channels and 1 output channel.
CJ Series High-Function Expansion Unit
The address allocation of the CJ series high-function expansion units is related to their unit number, which is a hardware switch on the module. Special I/O units occupy address channels 2000~2959 according to their arrangement, as shown in the figure below:
The CPU bus units occupy address channels 1500 to 1899 according to their arrangement, as shown in the following diagram:
3. Application Examples
As shown in the figure, the CP1HPLC is configured with one Ethernet module, two basic I/O expansion units, two analog expansion units and one temperature sensor unit. So how are the addresses of each input and output allocated?
The correct answer is as follows: