You are on page 1of 5

Section 3-2

IR Area

3-2

IR Area
The functions of the IR area are explained below.

3-2-1

Input and Output Areas


IR area bits are allocated to terminals on I/O Output Units and Dedicated I/O
Units. They reflect the ON/OFF status of input and output signals. Input bits
begin at IR 00000, and output bits begin at IR 10000. With the CQM1H, only
IR 00000 through IR 01515 can be used as input bits and only IR 10000
through IR 11515 can be used as output bits.
Note Input bits cannot be used in output instructions. Do not use the same output
bit in more than one OUT and/or OUT NOT instruction, or the program will not
execute properly.

3-2-2

Work Areas
The work bits can be used freely within the program. They can only be used
within the program, however, and not for direct external I/O. Work bits are
reset (i.e., turned OFF) when the CQM1H power supply is turned OFF or
when operation begins or stops. The following table shows the parts of the IR
area that have been set aside for use as work areas.
Words
IR 016 to IR 089 (74 words)
IR 116 to IR 189 (74 words)
IR 216 to IR 219 (4 words)
IR 224 to IR 229 (6 words)

Bits
IR 01600 to IR 08915 (1,184 bits)
IR 11600 to IR 18915 (1,184 bits)
IR 21600 to IR 21915 (64 bits)
IR 22400 to IR 22915 (96 bits)

The bits in the ranges shown below have specific functions, but can still be
used as work bits when their specific functions are not being used.
Range
IR 001 to IR 015
IR 090 to IR 095
IR 096 to IR 099
IR 100 to IR 115
IR 190 to IR 195
IR 196 to IR 199
IR 200 to IR 215
IR 220 to IR 223
IR 230 to IR 231
IR 232 to IR 243

3-2-3

Function
When allocated to Input Units, these bits serve as input bits.
When a Controller Link Unit is mounted to the PC, these bits
indicate the status of the Data Link.
When the MACRO instruction is used, these bits serve as
operand input bits.
When allocated to Output Units, these bits serve as output bits.
When a Controller Link Unit is mounted to the PC, these bits
indicate information on errors and nodes in the network.
When the MACRO instruction is used, these bits serve as
operand output bits.
These bits are used by an Inner Board mounted in slot 1.
These bits serve to store the analog settings when an Analog
Setting Board is installed.
When high-speed counter 0 is used, these bits are used to store
its present value.
These bits are used by an Inner Board mounted in slot 2.

I/O Allocation
I/O words are allocated to I/O Units and Dedicated I/O Units in order from the
left, beginning with IR 001 for inputs and IR 100 for outputs. The CPU Units
16 input points are allocated to IR 000. I/O bits are allocated in one-word
units, even for I/O Units that require only 8 bits.
Note Input and output bits are not allocated to Inner Boards or Communications
Units.

148

Section 3-2

IR Area

There isnt a registered I/O table in CQM1H PCs, so it isnt necessary to register an I/O table from a Programming Device. Just mount the desired Units in
the PC and I/O is allocated automatically.
CPU Unit

Input area

16 built-in
inputs (1 word)

Other Units
(I/O Units and Dedicated I/O Units)

(CPU Unit inputs)

From
here

16 words max.
(256 bits)

Inputs and outputs are allocated separately from the left in the order that the
Units are connected.

Inputs Outputs Inputs


only
only
only

Inputs and outputs

Output area
From
here
16 words max.
(256 bits)

8-point I/O Units

I/O bits are allocated in one-word units, even for I/O Units that require only 8
bits.
8-point Units
One word allocated

These bits are allocated.

The unused input bits (08 to 15) cannot be used as work bits, but unused output bits (08 to 15) can be used as work bits.
16-point I/O Units

One input word is allocated to each 16-point Input Unit and one output word is
allocated to each 16-point Output Unit. Input or output points 0 to 15 correspond to bits 00 to 15 of the allocated word.
16-point Units
One word allocated

149

Section 3-2

IR Area
32-point I/O Units

Two input words are allocated to each 32-point Input Unit and two output
words are allocated to each 32-point Output Unit. I/O points 0 to 15 of connector pin A correspond to bits 00 to 15 of the first allocated word (n) and I/O
points 0 to 15 of connector pin B correspond to bits 00 to 15 of the next allocated word (n+1).
32-point Units
Two words allocated

Dedicated I/O Units

Dedicated I/O Units require a predetermined number of input bits, output bits,
or both input and output bits. In some Dedicated I/O Units, the number of
words required may depend on the Units DIP switch settings.
For example, a CQM1-AD041 Analog Input Unit requires either 4 input words
or 2 input words. (The Analog Input Unit requires 4 input words when 4 analog
inputs are being used and 2 input words when 2 analog inputs are being
used.)
Analog inputs
Four words allocated

Input words and output words that were not allocated to Units can be used as
work words.
I/O Allocation Example

CPU Block Only


This example shows the I/O allocation for a PC with two DC Input Units, two
Transistor Output Units, and a Sensor Unit.

I
N
16

Input area
IR 000
IR 001
IR 002
IR 003
IR 004

(CPU Unit inputs)

16 inputs
8 inputs

Sensor Unit

Output area
IR 100
IR 101
IR 102

150

16 outputs
32 outputs

O
U
T
16

I
N
8

O
U
T
32

S
E
N

IN:
Input Unit
OUT: Output Unit
SEN: Sensor Unit

Section 3-2

IR Area

Order
in PC

1
2
3
4
5

Unit

Specifications

CPU Unit
CQM1-ID111
CQM1-OD212
CQM1-ID211
CQM1-OD213
CQM1-SEN01

Number of
words
1 input word
1 input word
1 output word
1 input word
2 output words
2 input words

16 inputs
16 inputs
16 outputs
8 inputs
32 outputs
1 sensor input

Allocated word(s)
IR 000
IR 001
IR 100
IR 002
IR 101 and IR 102
IR 003 and IR 004

CPU Block and Expansion I/O Block


When an Expansion I/O Block is connected, words are allocated started with
the CPU Block and then continuing in order to the Expansion I/O Block. Input
words are allocated from IR 001 and output words are allocated from IR 100.
I/O Control Unit

CPU Block

I
N

I
N

16

32

O
U
T
32

I/O Interface Unit

I
N

I
N

16

32

Expansion I/O Block

O
U
T
16

Input area
IR 000
IR 001
IR 002
IR 003
IR 004
IR 005
IR 006
IR 007
IR 008

(CPU Unit inputs)

16 inputs
32 inputs
16 inputs
32 inputs
2 input words

IN:
OUT:
AD:
IPS:
DA:

Output area
IR 100
IR 101
IR 102
IR 103
IR 104

Input Unit
Output Unit
Analog Input Unit
Analog Power Supply Unit
Analog Output Unit

32 outputs
16 outputs
2 output words

Order
in PC

1
2
3
4
5
6
7
8
9

Unit
CPU Unit
CQM1-ID111
CQM1-ID112
CQM1-OD213
CQM1-ID111
CQM1-ID112
CQM1-OC222
CQM1-AD041
CQM1-IPS01
CQM1-DA021

Specifications
16 inputs
16 inputs
32 inputs
32 outputs
16 inputs
32 inputs
16 outputs
2 input words
--2 output words

Number of
words
1 input word
1 input word
2 input words
2 output words
1 input word
2 input words
1 output word
2 input words
--2 output words

Allocated word(s)
IR 000
IR 001
IR 002 and IR 003
IR 100 and IR 101
IR 004
IR 005 and IR 006
IR 102
IR 007 and IR 008
--IR 103 and IR 104

151

Section 3-2

IR Area
Note

1. I/O words are not allocated to the I/O Control Unit or I/O Interface Unit.
2. I/O words are not allocated to the Analog Power Supply Unit, but it is counted as one of the mounted Units.

I/O Capacity and


Requirements

The number of I/O bits that can be allocated depends on the CQM1H CPU
Unit being used, as shown in the following table. Be sure to take into account
the one input word (IR 000) that is automatically allocated to inputs on the
CPU Unit. If the number of words allocated exceeds the capacity of the CPU
Unit, a fatal I/O UNIT OVER error (error code E1) will occur.
CPU Unit

Max. number of I/O bits

CQM1H-CPU61 512 bits (256 inputs and


256 outputs)
CQM1H-CPU51 (32 words: 16 input and
16 output words)
CQM1H-CPU21 256 bits
CQM1H-CPU11

Number of I/O words available to


Units other than the CPU Unit
31 (15 input words, 16 output words)

15

Refer to page 153 for a table showing how many I/O words are required by
each I/O Unit and page 154 for a table showing how many I/O words are
required by each Dedicated I/O Unit.
AR 22 indicates the number of input words and output words that have been
allocated, as shown in the following diagram.
Word
AR 22

Bits
Function
Data range
00 to 07 The number of input words that 01 to 16 (2-digit BCD)
have been allocated.
08 to 15 The number of output words
00 to 16 (2-digit BCD)
that have been allocated.

The CQM1H does not have a Backplane, so it isnt necessary to deal with
empty slots when allocating I/O words. The lowest available I/O word
addresses are allocated automatically.
Inputs are automatically allocated to input words and outputs are automatically allocated to output words regardless of the order in which the Input Units
and Output Units are mounted. Even though I/O allocation is not affected, it is
recommended that the Input Units be mounted together and Output Units be
mounted together to make the word allocation easier to understand and help
eliminate problems with noise.

152

You might also like