338
5
5 High-speed Input5.1.1 High-speed Counter
By enabling quadruplicated frequency with the special M element, A/B phase counters can count at a
fundamental or quadruplicated frequency.
A/B Phase Counter
C251 C252 C253 C254 C255
Enabling
quadruplicated
frequency
M8195 M8196 M8197 M8198 M8199
Counting up at a doubled frequency
B
A
Counting down at a doubled frequency
+1
+1
+1 -1
-1
-1
B
A
Counting up at a quadruplicated frequency
+1
+1
+1
+1
+1
+1
+1
+1
B
A
Counting down at a quadruplicated frequency
-1
-1
-1
-1
-1
-1
-1
-1
B
A
Counting up at a quadruplicated frequency
+1
+1
+1
+1
+1
+1
+1
+1
B
A
Counting down at a quadruplicated frequency
-1
-1
-1
-1
-1
-1
-1
-1
• The number of a high-speed counter used corresponds to X port. That is, when a high-speed counter Cxxx is
specied, the corresponding X input port is specied. Therefore, X port cannot be reused; otherwise, an error will
be reported. For example, when C252 uses X0 and X1 input ports, such ports cannot be reused by C235, C236,
C243, C246, and C251. The interrupt or pulse capture corresponding to such input ports cannot be used.
4
)
Instructions for use of counters
●
High-speed counters use hardware for counting based on the transition edge of relevant signals, and provide real-
time responses, independent of the scan duration of the PLC.
●
When the present value of a high-speed counter reaches the set value, for immediate output and processing,
execute high-speed pulse comparison instructions, such as HSCS, HSCR, and HSZ. For details, see the
description of instructions.
●
When the present value of a high-speed counter reaches the set value, for immediate logical processing, execute
the high-speed pulse comparison instruction HSCS, and specify the instruction operation as I0 x 0 interrupt
(x = interrupt numbers 1–8), provided that subprograms corresponding to interrupt numbers must have been
programmed.
●
The software lter time of high-speed input signals can be set by setting element to D8021 and the time unit to
250 ns. The default value of D8021 is 1, so the default high-speed lter time is 250 ns. The value range of D8021
is 1 to 100, so the high-speed lter time range is 0.25 to 25 us.