The Notice About to Reset the Software High-Speed Counter
Usually to reset the Software High-Speed Counter, we use the following program. The counter stops counting
when the RST instruction is activated in the example.
There are two important factors in determining the frequency of SHSC counting:
The Counting Frequency of SHSC
(1) Limit of hardware circuit: the reaction speed of the photo couplers at high-speed input points X0~X7 and the
filter time of input filter circuits, those are limited the maximum pulse frequency can be fed into the PLC.
According to the controller series, the pulse frequency is listed in the following table.
(2) Limit of total interruption frequency that PLC system can accept:
The VS series PLC can accept about 200kHz of total interruption frequency.
(The sum of 1-phase counting frequencies) + (The sum of 2-phase counting frequencies) + (The sum of
A/B-phase counting frequencies) × 2
= The total of the interrupt frequencies that occur by the Software High-Speed Counter
A lot of applications need to use interrupt at the PLC, those including the software HSC, external interrupt,
frequency meter, pulse measurement, pulse output instruction, timer interrupt and so on. When considering
the total interrupt frequency, these factors should be taken into an overall assessment.
When these input points are combined for an A/B phase counter, the counting frequency is reduced to half.
X20
RST C 2 35
To avoid above situations, please use the following program.
X20
M9001
RST C 2 35
RST C 2 35
1
2
3
1
2
3
Although the pulse persistent,
it won't count during this period.
Count signal X0
Current value of C235
Reset signal X20
RST C235
C235 is continuously being reset
Counting signal X0
Present value of C235
Reset signal X20
RST C235
- - - -
A
- - - -
B
1
2
3
1
2
3
4
Because RST instruction was released,
it's ready to count.
A
Part enables the RST
Part releases the RST
B
Series
VS1
VS2
VSM
VS3
X0
10KHz 10KHz 10KHz 10KHz 10KHz 10KHz 10KHz
X1 X2
X3
X4
X5 X6
X7
10KHz
200KHz 50KHz 200KHz 200KHz 50KHz 50KHz 50KHz200KHz
200KHz 50KHz 200KHz 200KHz 50KHz 50KHz 50KHz200KHz
1MHz
50KHz 50KHz 50KHz 50KHz
50KHz 50KHz 50KHz 50KHz 50KHz 50KHz 50KHz50KHz
VSM-28ML
1MHz 1MHz 1MHz
30