Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
FX Series Programmable Controllers
Devices in Detail 4
4-30
4.11.6
1 Phase Counters - Assigned Start and Reset (C241 to C245)
These counters have one countable input
and 1 reset input each. Counters C244 and
C245 also have a start input.
When the direction flag M8245 is ON, C245
counts down. When it is OFF C245 will count
up.
When X14 is ON, C245 resets in the same
manner as normal internal 32bit counters, but
C245 can also be reset by input X3. This is
assigned automatically when counter C245 is
used (see previous counter tables).
Counter C245 also has an external start contact, again automatically assigned. This is actually
input X7. Once again this data can be found on the previous counter tables.
When X7 is ON, C245 starts counting, conversely when X7 is OFF C245 stops counting. The
input X15 selects and reserves the assigned inputs for the selected counter, i.e. in this case
C245.
The reason why these counters use assigned start (X7) and reset (X3) inputs is because they
are not affected by the cycle (scan) time of the program. This means their operation is
immediate and direct.
In this example C245 actual counts the number of OFF to ON events of input X2.
Note: Because C245 is a 32bit counter, its setting data, specified here by a data register also
has to be of a 32bit format. This means that data registers D1 and D0 are used as a pair to
provide the 32bit data format required.
Device specification:
All of these counters are 32bit up/down ring counters. Their counting and contact 
operations are the same as normal 32bit up/down counters described on page 4-21.
When the counters current value reaches its maximum or setting value, the counters 
associated contacts are set and held when the counter is counting upwards.
However, when the counter is counting downwards the contacts are reset.
Setting range:
-2,147,483,648 to +2,147,483,647
Direction setting:
The counting direction for 1 phase counters is dependent on their corresponding flag 
M8
; where 
 is the number of the corresponding counter, (C241 to C245).
-
When M8
 is ON the counter counts down.
-
When M8
 is OFF the counter counts up.
X15
D0
C245
RST
X13
X14
M8245
C245