11 Use of High-speed Counters
11.5 Handling of High-speed Counters
165
FX3G Series Programmable Controllers
User's Manual - Hardware Edition
11
High-Speed
Counters
12
Output Wiring
13
Wiring for
Various Uses
14
Test Run,
Maintenance,
Troubleshooting
15
Input/Output
Powered
Extension Units
16
Input/Output
Extension
Blocks
17
Extension
Power Supply
Unit
18
Other Extension
Units and
Options
19
Display Module
20
Terminal Block
11.5.3 2-phase 2-count input
These counters are 32-bit up-count/down-count binary counters.
The operations of the output contact according to the current value are the same as those of the above-
mentioned 1-phase 1-count input high-speed counters.
Examples of program
1) For C251
• While X012 is on, C251 counts the operation of the input
terminals X000 (A-phase) and X001 (B-phase) through
interruption.
• While X011 is turned on, the counter is reset when RST
instruction is executed.
• When the current value exceeds the setting, Y002 turns on, and
when the current value becomes lower than the setting, Y002
turns off.
• Y003 turns on (down-count) or off (up-count) according to the
counting direction.
2) For C254
• C254 starts counting immediately when the input terminal
X006 is turned on while X012 is on.
The count input terminals are X000 (A-phase) and X001
(B-phase).
• C254 is reset by X011 on the sequence, and it is reset
immediately when X002 is turned on.
• When the current value exceeds the setting (D1,D0), Y004
operates, and when the current value becomes lower than
the setting, Y004 turns off.
• Y005 turns on (down-count) or off (up-count) according to
the counting direction.
• A 2-phase encoder generates A-phase output and B-phase output between which there is a 90 phase
difference. The high-speed counter automatically counts up or down according to the output as shown
below.
• The down-count/up-count operations of C251 to C255 can be monitored through the ON/OFF operations
of M8251 to M8255.
ON: Down-counting
OFF: Up-counting
X011
X012
C251
K1234
RST C251
C251
Y002
M8251
Y003
Main unit
A-phase input
B-phase input
X001X000
X011
X012
C254
D0(D1)
C254
Y004
M8254
Y005
RST C254
X000
Main unit
A-phase input
X001
B-phase input
X002 X006
External reset
input
External start input
The setting is (D1,D0).
Phase A
Phase B
+1
+1
Up-counting
-1
-1
Down-counting