5: S
PECIAL
F
UNCTIONS
5-22
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
Two-phase High-speed Counter Timing Chart
Example:
Two--phase high-speed counter HSC1
1-edge count, preset value 1 is 8.
I2 is designated as the reset input.
Q1 is designated as the comparison 1 output.
The current value is maintained when preset value 1 is reached.
Q2 is designated as the comparison 2 output.
The current value is not maintained when preset value 2 is reached.
Overflow and underflow actions are not used.
1 scan time
1 scan time
Reset Status M8130
8
9
10
Current Value D8210/D8211
Phase B I1
Gate Input M8031
Comparison 1 ON Status M8131
Comparison 1 Output Q1
Comparison Output Reset M8030
14
13
12
11
When reset input I2 is turned on, the D8210/D8211 current value is reset to the D8216/D8217 reset value, then the D8212/
D8213 preset value 1 and D8214/D8215 preset value 2 take effect for the next counting cycle.
While gate input M8031 is on, two-phase HSC1 counts pulse inputs to phase B input I1 because of the 1-edge count mode.
While phase A input I0 is leading phase B input I1, the current value increments. While phase A input I0 is trailing phase B
input I1, the current value decrements.
The current value is updated every scan.
When the current value reaches the preset value 1, comparison 1 ON status M8131 goes on for one scan. At the same time,
comparison 1 output Q1 turns on and remains on until comparison output reset M8030 is turned on. The current value is
maintained and the high-speed couner continues to count input pulses.
When the current value reaches the preset value 2, comparison 2 ON status M8132 goes on for one scan. At the same time,
comparison 2 output Q2 turns on and remains on until comparison output reset M8030 is turned on. The current value is
reset to the reset value and the high-speed couner continues to count input pulses.
8
0
1
2
7
6
5
4
3
Reset Input I2
Preset Value 1 D8212/D8213
Reset Value D8216/D8217
4
Phase A I0
Preset Value 2 D8214/D8215
14
1 scan time
Comparison 2 ON Status M8132
Comparison 2 Output Q2
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]