Skip to main content

CTU — Count Up

CTU

Counter

counter

(CU)

Preset

?

(DN)

Accum

?

Increments .ACC by 1 on each rising edge of the rung. Sets .DN when .ACC reaches .PRE; keeps counting past the preset.

Operands

NameType
counterCOUNTER

How It Works

Event.ACC.CU.DN
Rising edge of rung+111 when .ACC.PRE
Rung stays trueunchanged1unchanged
Rung falseunchanged0unchanged
RES on the tag000

CTU counts on the transition from false to true. Holding the input true does not keep counting.

Example — Parts Counter

Count boxes passing a sensor. Signal "full" at 10 boxes.

Tag setup: Boxes is a COUNTER with .PRE = 10.

XIC(BoxSensor)CTU(Boxes);XIC(Boxes.DN)OTE(BinFull);XIC(ResetBtn)RES(Boxes)

Common Mistakes

  • Adding ONS before a CTU — unnecessary. CTU already counts on the rising edge.
  • Expecting .DN to block further counting — it does not. .ACC keeps climbing. Add a RES or an interlock if you need to stop.
  • Counters overview — members, units, shared behaviour
  • CTD — count-down counterpart
  • RES — clears the accumulator