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

Скачать
Страница из 382
FX Series Programmable Controllers
Devices in Detail 4
4-21
4.10.2
General/ Latched 32bit Bi-directional Counters
The counter shown in the example below, activates when its coil is driven, i.e. the C200 coil is
driven. On every occasion the input X14 is turned from OFF to ON the current value or current
count of C200 is incremented.
The output coil of C200 is set ON when the current value increases from “-6” to “-5”. However,
if the counters value decreases from “-5” to “-6” the counter coil will reset. The counters current
value increases or decreases independently of the output contact state (ON/OFF). Yet, if a
counter counts beyond +2,147,483,647 the current value will automatically change to
-2,147,483,648. Similarly, counting below -2,147,483,648 will result in the current value
changing to +2,147,483,647. This type of counting technique is typical for “ring counters”. The
current value of the active counter can be rest to "0" (zero) by forcibly resetting the counter
coil; in the example program by switching the input X13 ON which drives the RST instruction.
The counting direction is designated with special auxiliary relays M8200 to M8234.
Battery backed/ latched counters:
Counters which are battery backed/ latched are able to retain their status information, 
even after the PLC has been powered down. This means on re-powering up, the latched 
counters can immediately resume from where they were at the time of the original PLC 
power down.
Available devices:
Please see the information table on page 4-19.
Selecting the counting direction:
If  M8
 for C
 is turned ON, the counter will be a down counter. Conversely,
the counter is an up counter when M8
 is OFF.
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
X13
X14
0
1
2
3
4
5
0
1
2
3
4
-6
-5
-4
-3
-2
-1
-7
-8
-6
-5
-4
-3
-7
0
Y1
X12
X14
K-5
X13
C200
RST
C200
X12
M8200
C200
Y1
If output is already
turned ON
Counters
present
value
Up counting
Down counting
Up counting