Mitsubishi Electronics FX2C Home Theater Server User Manual


 
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 ever
y
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 independentl
y
of the output contact state (ON/OFF). Yet, if a
counter counts be
y
ond +2,147,483,647 the current value will automaticall
y
chan
g
e to
-2,147,483,648. Similarl
y
, countin
g
below -2,147,483,648 will result in the current value
chan
g
in
g
to +2,147,483,647. This t
y
pe of countin
g
technique is t
y
pical for “rin
g
counters”. The
current value of the active counter can be rest to "0" (zero) b
y
forcibl
y
resettin
g
the counter
coil; in the example pro
g
ram b
y
switchin
g
the input X13 ON which drives the RST instruction.
The countin
g
direction is desi
g
nated with special auxiliar
y
rela
y
s M8200 to M8234.
Battery backed/ latched counters:
Counters which are batter
y
backed/ latched are able to retain their status information,
even after the PLC has been powered down. This means on re-powerin
g
up, the latched
counters can immediatel
y
resume from where the
y
were at the time of the ori
g
inal PLC
power down.
Available devices:
Please see the information table on pa
g
e 4-19.
Selecting the counting direction:
•If M8 for C is turned ON, the counter will be a down counter. Conversel
y
,
the counter is an up counter when M8 is OFF.
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
C200RST
C200
X12
M8200
C200
Y1
If output is already
turned ON
Counters
present
value
Up countin
g
Down countin
g
Up countin
g