![background image](http://html1.mh-extra.com/html/omron/cj1w-ctl41-e/cj1w-ctl41-e_operation-manuals_741969079.webp)
Memory Allocation
Section 4-2
62
Note
The Range/Comparison Data blocks that are allocated to the Counters do not
necessarily have to be consecutive and can be in any area of DM/EM. In case
they overlap the Unit reports this in CIO as a warning, but does not generate an
error. This makes it possible to define only one block with Range/Comparison
data and to use this data for all Counters by using two identical indirect
addresses (k1=k2=k3=k4).
4-2-2
Indirect Addressing
The Counter Unit can be in Range Mode or Comparison Mode (refer to section 3-
5-1
for more information). The
Range or Comparison Data is allocated in the Extended Memory Area (EM) or in
the Data Memory Area (DM). An Indirect Address, that you can set for every Coun-
ter in the Special I/O Unit DM Area, points to the actual memory location in DM or
EM where the Range or Comparison Data of that Counter is stored.
Note
It is also possible to use the free DM, in the Special I/O Unit DM Area that is allo-
cated to the Counter Unit, to store the Range/Comparison Data. There are 309
free DM-words (=399-90).
Unit in Range Mode
In Range Mode Indirect Addressing can be used to define the Ranges per Counter
that you want to use. The number of Ranges (M) defines the size of the Range
Data block (size = M x 6 words). If you want to use multiple Ranges you are rec-
ommended to use consecutive Ranges starting from Range 0 (i.e. Range 0, 1, 2,
3
→
M - 1) in order to save memory occupation.
Note
If you do not want the Ranges to be consecutive and only intend to use two
Ranges (e.g. Range 0 and Range 3) then you still have to define the number of
Ranges (M) to be 4. In order to prevent configuration errors from happening you
should make sure that the data of Ranges 2 to 3 is also valid, although you do not
intend to use Range 2 and 3.
General Setting:
n+17
Range/Comparison Blocks overlap:
0 = No overlapping
1 = One or more blocks overlap
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
Counter 'c'
c = 1, 2, 3 or 4
# of Ranges M
(0
≤
M
≤
3)
EM (=0) / DM (=1)
Area
Indirect Address k(c)
(00000 to 32760)
Data Range 0
Data Range 1
Data Range 2
Data Range 3
k(c)
EM/DM:
Size of Range Data block:
Number of Ranges (=4) x 6 words
Special I/O Unit DM Area:
* Assumed that M
≠
0. By default M = 0 which means that no Ranges will be used