
10-4
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
Table 10-2 Up-Down Counter Box and Parameters, with SIMATIC Short Name
LAD Box Parameter Data Type Memory Area Description
no. COUNTER C
Counter identification number. The range
depends on the CPU.
ZV BOOL I, Q, M, D, L Count up input ZV
Z no.
ZR BOOL I, Q, M, D, L Count down input ZR
QZV
S BOOL I, Q, M, D, L Set input for presetting counter
DUAL
ZR
S
ZW
ZW WORD I, Q, M, D, L Value in the range of 0 to 999 for
presetting counter (entered as
C#<value> to indicate BCD format)
DEZ
R BOOL I, Q, M, D, L Reset input
Q BOOL I, Q, M, D, L Status of the counter
DUAL WORD I, Q, M, D, L Current counter value (integer format)
DEZ WORD I, Q, M, D, L Current counter value (BCD format)
A change in signal state from 0 to 1 at input
I 0.2 sets counter C 10 with the value 55 in
binary coded decimal format. If the signal state
of input I 0.0 changes from 0 to 1, the value of
counter C 10 is increased by 1, except when
the value of counter C 10 is equal to 999. If
input I 0.1 changes from 0 to 1, counter C 10 is
decreased by 1, except when the value of
counter C 10 is equal to 0. If I 0.3 changes from
0 to 1, the value of C 10 is set to 0.
Q 4.0 is 1, when C 10 is not equal to “0”.
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write – – – – – x x x 1
C 10
S_CUD
CV
Q
CU
CD
CV_BCD
S
PV
R
I 0.0
Q 4.0
I 0.1
I 0.2
C#55
I 0.3
Figure 10-2 Up-Down Counter
Counter Instructions
Comentarios a estos manuales