IEC 1131-3 Instructions
10-16
S7-200 Programmable Controller System Manual
A5E00066097-02
Down Counter
The Down Counter function block counts down from the
preset value (PV) on the rising edges of the Count Down
(CD) input. When the current value (CV) is equal to zero,
the counter output bit (Q) turns on. The counter resets
and loads the current value (CV) with the preset value
(PV) when the load input (LD) is enabled. The Down
Counter stops counting when it reaches zero.
Note
Since there is one current value for each counter, do not assign the same number
to more than one counter. (Up Counters, Down Counters, and Up/Down Counters
access the same current value.)
Inputs/Outputs Operands Data Types
CD, LD (LAD) Power Flow BOOL
CD, LD (FBD) I, Q, M, SM, V, S, L, T, C, Power Flow BOOL
PV (LAD, FBD) VW, IW, QW, MW, SMW, LW, SW, AIW, AC, Constant, *VD, *AC,
*LD
INT
Q (LAD & FBD) I, Q, M, SM, V, S, L BOOL
CV (LAD & FBD) VW, IW, QW, MW, SW, LW, AC, *VD, *AC, *LD INT
Cxxx Constant CTD
Up/Down Counter
The Up/Down Counter function block counts up or down
from the preset value on the rising edges of the Count Up
(CU) or Count Down (CD) input. When the current value
(CV) is equal to preset, the output (QU) turns on. When
the current value (CV) is equal to zero, the output (QD)
turns on. The counter loads the current value (CV) with
the preset value (PV) when the load (LD) input is
enabled. Similarly, the counter resets and loads the
current value (CV) with zero when the reset (R) is
enabled. The counter stops counting when it reaches
preset or zero.
L
A
D
F
B
D
Cxxx
CTD
CD
LD
PV
Q
CV
222 224
✓✓✓
221 226
✓
L
A
D
F
B
D
CTUD
CD
CU
R
LD
PV QU
CV
QD
Cxxx
222 224
✓✓✓
221 226
✓