Contador Rápido
Contador Rápido
Contador Rápido
Pr o g r am m i ng Conc e pts
Contacts Y0, C0
M relays M1200~M1254 are used to set the up/down counting direction for C200~C254
respectively. Setting the corresponding M relay ON will set the counter to count down.
Example:
LD X10
X10
OUT M1200
M1200
LD X11
X11
RST C200 RST C200
LD X12 X12
CNT C200 K-5 DCNT C200 K-5
LD C200 C200
Y0
OUT Y0
a) X10 drives M1200 to
determine counting direction
(up / down) of C200
b) When X11 goes from OFF to
ON, RST instsruction will be Accumulatively Accumulatively
executed and the PV (present X10 increasing Progressively increasing
value) in C200 will be cleared decreasing
X11
and contact C200 is OFF.
c) When X12 goes from Off to
On, PV of C200 will count up X12
(plus 1) or count down (minus 5
1). 4 4
3 3
d) When PV in C200 changes 2 2
PV in
from K-6 to K-5, the contact C200
1 1
C200 will be energized. When 0 0 0
-1
PV in C200 changes from K-5 -2
to K-6, the contact of C200 -3 -3
-4 -4
will be reset. -5 -5
e) If MOV instruction is applied When the output contact -6 -6
was On. -7 -7
through WPLSoft or HPP to -8
Contacts
designate a value bigger than Y0, C0
SV to the PV register of C0,
next time when X1 goes from
OFF to ON, the contact C0
will be ON and PV of C0 will
equal SV.
2.12 High-speed Counters
There are two types of high speed counters provided including Software High Speed Counter
(SHSC) and Hardware High Speed Counter (HHSC). The same Input point (X) can be designated
with only one high speed counter. Double designation on the same input or the same counter will
2 - 25
DVP- ES 2/ EX 2/ SS2 / SA2/ SX2 / SE&TP O p er a t i o n Man u a l - Pr o gr am m i n g
Note:
1. SHSC supports max 10kHz input pulse on single point. Max 8 counters are applicable in the
same time.
2. An SS2/SA2/SE model does not support a two-phase two-input counter (C232 with the input
points X0 and X2).
3. For 2-phase 2-input conuting, (X4, X5) (C233) and (X6, X7) (C234), max 5kHz. (X0,X2) (C232),
max 15kHz.
4. 2-phase 2-input counting supports double and quadruple frequency, which is selected in D1022
as the table shown below.
5. R/F (Rising edge trigger/ Falling edge trigger) can also be specified by special M. OFF = Rising;
ON = Falling.
6. U/D (Count up/Count down) can be specified by special M. OFF = count up; ON = count down.
Applicable Hardware High Speed Counters:
C 1-phase
1-phase 2-input 2-phase 2-input
input
#2 #2
X C243 C244 C245 C246 C247 C248 C249 C250 C251 C252 C253 C254
X0 U U/D U/D U U A A
X1 R Dir Dir D D B B
X2 U U/D U/D A A
X3 R Dir Dir B B
X4 R R R
X5 R R
U: Count up A: Phase A input Dir: Directoin signal input
D: Count down B: Phase B input R: Reset signal input
Note:
1. The max frequency of the 1-phase input counters X0 (C243) and X2 (C244) is 100kHz on
ES2/EX2/SA2/SX2 model and 20kHz on SS2 model.
2. An SE model does not support the counters C249 and C250.
3. The max frequency of the 1-phase 2-input counters (X0, X1) (C245, C246) and (X2, X3) (C249,
C250) is 100kHz on ES2/EX2/SA2/SX2 model and 20kHz on SS2 model.
4. The max frequency of the 1-phase 2-input counters (X0, X1) (C247, C248) is 10kHz on
ES2/EX2/SS2/SX2 model and 100kHz on 32ES211T and SA2 model.
5. The max frequency of the 2-phase 2-input counter (X0, X1) (C251, C252) is 5kHz on ES2/EX2
model, 10kHz on SS2/SX2 model and 30kHz on 32ES211T, 12SA2 and 12SE model. For ES2
series released after the year of 2013, the max frequency for 28SA2 and 26SE are up to 50kHz.
6. The max frequency of the 2-phase 2-input counter (X2, X3) (C253, C254) is 5kHz on
ES2/EX2/SA2 model, 10 kHz on SS2/SX2 model and 30kHz on 32ES211T. For ES2 series
released after the year of 2013, the max frequency for 28SA2 and 26SE are up to 50kHz.
7. 2-phase 2-input counting supports double and 4 times frequency, which is selected in D1022
as the table in next page. Please refer to the below table for detailed counting wave form.
2 - 26
2 . Pr o g r am m i ng Conc e pts
K1
K2
(Double Frequency)
K4 or other value
(Quadruple frequency)
(Default)
8. DVP-ES2/DVP-SS2 series PLCs whose firmware version is 2.80 or above support the single
frequency mode. DVP-SA2/DVP-SX2 series PLCs whose firmware version is 2.00 support the
single frequency mode. The other PLCs support the three modes.
9. C243 and C244 support count-up mode only and occupy the associate input points X1 and X3
as reset function. If users do not need to apply reset function, set ON the associated
special M relays (M1243 and M1244) to disable the reset function.
10. Dir refers to direction control function. OFF indicates counting up; ON indicates counting
down.
11. When X1, X3, X4 and X5 is applied for reset function and associated external interrupts are
disabled, users can define the reset function as Rising/Falling-edge triggered by special M
relays
Reset Function X1 X3 X4 X5
R/F M1271 M1273 M1274 M1275
12. When X1, X3, X4 and X5 is applied for reset function and external interrupts are applied, the
interrupt instructions have the priority in using the input points. In addition, PLC will move the
current data in the counters to the associated data registers below then reset the counters.
Special D D1241, D1240 D1243, D1242
Counter C243 C246 C248 C252 C244 C250 C254
X1 X3
External Interrupt X4(I400/I401) X5(I500/I501)
(I100/I101) (I300/I301)
2 - 27
DVP- ES 2/ EX 2/ SS2 / SA2/ SX2 / SE&TP O p er a t i o n Man u a l - Pr o gr am m i n g
Example:
EI
M1000
DCNT C243 K100
FEND
M1000
I101 DMOV D1240 D0
IRET
END
When C243 is counting and external interrupt is triggerred from X1(I101), counted value in C243
will be move to (D1241, D1240) immediately then C243 is reset. After this interrupt I101 executes.
1-phase 1 input high-speed counter:
Example:
LD X20 X20
RST C235 RST C235
LD X21 X21
OUT M1235 M1235
LD X22 X22
DCNT C235 K5
DCNT C235 K5
C235
LD C235
Y0
OUT Y0
1. X21 drives M1235 to determine counting direction (Up/Down) of C235.
2. When X20 = ON, RST instsruction executes and the current value in C235 will be cleared.
Contact C235 will be OFF
3. When X22 = ON, C235 receives signals from X0 and counter will count up (+1) or count down
(-1).
4. When counter C235 reaches K5, contact C235 will be ON. If there is still input signal input for
X0, it will keep on counting.
counting down
X21,M1243 contact counting up
X20
X22
X0
C243
present 7
value 6 6
5 5
4 4
3 3
2
1
0
2 - 28
2 . Pr o g r am m i ng Conc e pts
LD X21
DCNT C247 K5
LD C247
OUT Y0
1. When X20 is ON, RST instsruction executes and the current value in C247 will be cleared.
Contact C247 will be OFF.
2. When X21=ON, C247 receives count signals from X0 and counter counts up (+1), or C247
receives count signal from X1 and counter counts down (-1)
3. When C247 reaches K5, contact C247 will be ON. If there is still input signal from X0 or X1,
C247 will keep on counting
X20
X21
X0
count up
X1
count down
C247
present 7
value 6 6
5 5
4 4
3 3
2
1
0
Y0, C247 contact
2 - 29