Supported IOWR/IORD-Instructions
Section 4-5
83
Note
Data written with the IOWR instruction is valid only until the Unit is restarted or
the power supply is turned OFF. The settings in the DM and EM Area in the CPU
Unit will be used after the next time the Unit is restarted or power is turned ON. If
the settings made with IOWR instruction need to be used after the Unit is
restarted or power is cycled, write the same settings to the DM and EM Area in
the CPU Unit.
Example:
The Counter Unit is assigned Machine Number 6. You want to change the Maxi-
mum Count Value of Circular Counter 2. The new Maximum Count Limit consists
of 2 words, is located in Data-Memory at address D0050 and D0051 and is equal
to 2710
H
(=10,000 decimal).
Example:
The Counter Unit is in Range Mode and is assigned Machine Number 3. You want
to read the Range Enable Data of Counter 2 and write it to D1800 in the PLC
memory.
4-5-2
Range- and Comparison data
The Unit can be in Range or Comparison Mode (refer to section 3-5-1
). IOWR- and IORD-instructions can be
used respectively to change Range/Comparison Data inside the Unit or to read
Range/Comparison Data from the Unit, during actual operation. Depending on the
mode of the Unit (Range or Comparison mode) the Control Code is interpreted
accordingly by the Counter Unit.
c = Counter Number (1, 2, 3 or 4)
*
1
M = Number of Ranges, 1
≤
M
≤
4
*
2
M = Number of Comparison Values, 1
≤
M
≤
8
Note
When transferring new Comparison Values to the Unit, be sure that the same
Comparison Value is not used more than once in the same Counter. If the same
Comparison Value exists more than once in the same Counter, an error will
IOWR(223)
#2C03
CC1= 2C (= Counter 2), CC2= 03
D0050
S= D0050 (first word with new Maximum Count Value)
#00020006
D= #0006 (Machine Number) and D+1= #0002 (# words)
IORD(222)
#2B03
CC1= 2B (= Counter 2), CC2= 03
#00020003
S= #0003 (Machine Number) and S+1= #0002 (# words)
D1800
D= D1800 (write Range Enable Data to D1800 and D1801)
Item
IOWR
IORD
Control Code
No. of
Words
CC1
CC2
Data Range 00 – Data Range 03
Y
Y
cA
00-03
6 x M*
1
Data Comparison Value 00 – Data Comparison Value 07
Y
Y
cA
00-07
10 x M*
2