Up/Down Counter Counters

Inputs/Outputs Operands Data Types
CU (LAD) Power Flow BOOL
CU (FBD) I, Q, M, SM, V, S, L, T, C, Power Flow BOOL
CD (LAD) Power Flow BOOL
CD (FBD) I, Q, M, SM, V, S, L, T, C, Power Flow BOOL
R (LAD) Power Flow BOOL
R (FBD) I, Q, M, SM, V, S, L, T, C, Power Flow BOOL
LD (LAD) Power Flow BOOL
LD (FBD) I, Q, M, SM, V, S, L, T, C, Power Flow BOOL
PV VW, IW, QW, MW, SMW, LW, SW, AIW, AC, Constant, *VD, *AC, *LD INT
QU I, Q, M, SM, V, S, L BOOL
QD I, Q, M, SM, V, S, L BOOL
CV VW, IW, QW, MW, SW, LW, AC, *VD, *AC, *LD INT
xxxx (LAD & FBD) Constant (C0 C255) CTUD

Memory Ranges ENO Errors Instruction Support for S7-200 CPUs SIMATIC/International Mnemonics
The Up/Down Counter (CTUD) 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.

Counter ranges:xxx=C0 through C255

Note:

Because 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.)


Example