Handling Of High Speed Counters - Mitsubishi Electric MELSEC-Q Structured Programming Manual

Hide thumbs Also See for MELSEC-Q:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
[Device & Common]
2.7.3

Handling of high speed counters

1. 1-phase 1-counting input
X010
X011
X012
CC235
K-5
X010
X011
X012
CC244
Operation example
The counter C235 shown above operates as follows:
X010
Up-counting
X011
Reset input
X012
Start input
X000
Counting
input
3
C235
2
Current
1
value
0
When output has been
already turned ON
C235 output contact
When the counting input X000 is given, C235 executes up-counting or down-counting as interrupt processing.
• When the current value of the counter increases from "-6" to "-5", the output contact is set (turned ON).
When the current value decreases from "-5" to "-6", the output contact is reset (turned OFF).
• The current value increases or decreases without regard to the operation of the output contact.
When the counter executes up-counting from "+2,147,483,647", the count value becomes "-
2,147,483,648". In the same way, when the counter executes down-counting from "-2,147,483,648", the
count value becomes "+2,147,483,647". (This type of operation is called ring counter.)
• When the reset input X011 turns ON and then the RST instruction is executed, the current value of the
counter is reset to "0" and the output contact is turned OFF.
• In a latched type high speed counter, the current value, output contact operation status and reset status of
the counter are latched (backed up) even if the power is interrupted.
74
Down-counting
M8235
or up-counting
RST
EN
ENO
d
CC235
OUT_C_32
EN
ENO
CCoil
CValue
Down-counting
M8244
or up-counting
RST
EN
ENO
d
CC244
OUT_C_32
EN
ENO
CCoil
D0
CValue
Down-counting
5
4
4
3
2
1
0
-1
-2
-3
-4
-5
·
While X012 is ON, C235 counts "OFF
of the input X000.
·
When X011 turns ON and then the RST instruction
is executed, C235 is reset.
·
The counting direction of counters C235 to C245
is switched to down-counting or up-counting
when M8235 to M8245 turns ON or OFF.
·
While X012 is ON, C244 immediately starts counting
when the input X006 turns ON. The counting input
is X000.
In this example, the set value is indirectly
specified as the contents of data registers (D1, D0).
·
The high speed counter C244 can be reset using X011
in a sequence as shown in the figure, but it is
immediately reset without any program when X001
is closed.In this case, any program including X011
is not necessary.
·
The counting direction of counters C235 to C245
is switched to down-counting or up-counting
when M8235 to M8245 turns ON or OFF.
Up-counting
0
-3
-4
-5
-6
-6
-7
-7
-8
2 Devices in Detail
2.7 High Speed Counter [C]
ON"

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents