Range- And Comparison Data - Omron CJ1W-CT021 Operation Manual

High-speed counter units
Hide thumbs Also See for CJ1W-CT021:
Table of Contents

Advertisement

Supported IOWR/IORD-Instructions
4-5-2

Range- and Comparison data

Item
Data Range 00 – Data Range 31
Data Comparison Value 00 – Data Comparison
Value 31
122
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 High-speed Counter Unit is assigned Machine Number 6. You want to change
the Maximum 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
IOWR(223)
#2C03
D0050
#00020006
Example:
The High-speed 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.
IORD(222)
#2B03
#00020003
D1800
The Unit can be in Range or Comparison Mode (refer to 3-5-1 "Range Mode" and
3-5-2 "Comparison Mode"). IOWR- and IORD-instructions can be used respec-
tively to change Range/Comparison Data inside the Unit or to read Range/Com-
parison 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 High-speed Counter Unit.
c = Counter Number (1 or 2)
1
M = Number of Ranges, 1 ≤ M ≤ 21
*
2
M = Number of Comparison Values, 1 ≤ M ≤ 12
*
(=10,000 decimal).
H
CC1= 2C (= Counter 2), CC2= 03
S= D0050 (first word with new Maximum Count Value)
D= #0006 (Machine Number) and D+1= #0002 (# words)
CC1= 2B (= Counter 2), CC2= 03
S= #0003 (Machine Number) and S+1= #0002 (# words)
D= D1800 (write Range Enable Data to D1800 and D1801)
IOWR
IORD
Y
Y
Y
Y
Control Code
CC1
CC2
cA
00-31
cA
00-31
Section 4-5
No. of
Words
1
6 x M*
2
10 x M*

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents