Learn how a PLC Count Up (CTU) instruction works: its accumulator rises as conditions occur, while the preset stays fixed. The DONE bit turns on when ACC reaches or passes PRE, and the count remains across scans until a reset clears it.

Multiple Choice

In CTU, which statement is true?

Count Up (CTU) counts how many times a condition occurs, using an accumulator (ACC) and a fixed preset (PRE). Each time the rung condition is true, the ACC increases by one. The PRE value stays constant and does not change by itself. The DONE bit goes high when the accumulated value has reached or passed the preset, i.e., ACC >= PRE. This is why the statement about the DONE bit being set when ACC is greater than or equal to the Preset is the correct one. The accumulated value does not reset automatically on a new scan unless a separate reset action is used, so it can carry its value across scans until you reset it. The other points either miss that the preset is fixed, or that the DONE bit is tied to reaching or exceeding the preset, or that resets aren’t automatic with each scan.

A Count Up (CTU) instruction keeps track of events in a programmable logic controller. It might count bottles passing a sensor, parts reaching a station, or cycles completed by a machine. Each time the count condition occurs, the instruction adds one to its accumulated value, often shown as ACC. The preset value, or PRE, sets the target. Once ACC reaches or passes PRE, the instruction’s Done status turns on.

That last point matters: the Done bit is set when ACC is greater than or equal to PRE. The counter doesn’t need to stop at the exact preset. If ACC is 12 and PRE is 10, the Done bit is still on.

Meet the counter: ACC, PRE, and Done

Think of a CTU as a running tally with a target attached. The accumulator is the tally. It changes as the counter registers events. The preset is the target number, entered by a programmer or supplied by other logic. It stays fixed unless the program changes it.

For example, a packaging line may need to gather 24 cartons before moving a full batch to the next station. The CTU’s PRE could be set to 24. As cartons pass a sensor, ACC rises: 1, 2, 3, and so on. When ACC reaches 24, the counter’s Done bit becomes true. Other logic can then use that status to stop a conveyor, signal a transfer, or begin another step.

The Done bit is a status flag, not the count itself. In many PLC environments, it appears as DN or Done in the counter’s data. Exact labels and behavior can vary by controller family, so it’s worth checking the relevant manufacturer documentation—especially when moving between platforms.

How does the count go up?

A CTU adds to ACC when its count condition occurs. In many common PLC systems, including Rockwell Automation’s Logix controllers, the instruction responds to a false-to-true transition at its rung input. In plain terms, the condition must go from off to on for the counter to register a count. If the condition stays on across several scans, that sustained signal normally does not add one on every scan.

This transition-based behavior helps prevent a single long sensor signal from being counted again and again. Still, the signal needs to be clean. A bouncing mechanical switch, noisy sensor, or poorly timed input can create several quick on-off transitions and lead to extra counts. Designers may address that with input filtering, debounce logic, a one-shot instruction, or suitable sensor setup. The best choice depends on the device and the controller.

A PLC runs its program in repeated cycles, often called scans. It reads inputs, evaluates logic, and updates outputs as part of that cycle. A counter’s value can carry from one scan to the next; it is not wiped just because a new scan begins. That persistence is what makes a running count possible. Without it, the tally would start over so often that it would never reach its target.

The preset is a target, not a second counter

It’s easy to mix up ACC and PRE because both are numeric values stored with the counter. Their jobs, however, are different.

  • ACC records the current count.

  • PRE defines the target for the count.

  • Done indicates that ACC has reached or exceeded PRE.

If a counter has PRE set to 50, the CTU does not increase PRE each time an event occurs. It increases ACC. The preset remains at 50 unless program logic or a person changes it. This separation lets the program compare a changing measurement with a stable target.

The comparison is typically ACC ≥ PRE, rather than only ACC = PRE. That distinction is useful in real systems. A count may pass its target if inputs arrive close together, if the program updates the preset, or if the counter already sits above a newly assigned preset. With a greater-than-or-equal comparison, the Done status still reflects that the target has been met or exceeded.

Resetting means using reset logic

A CTU generally retains its accumulated value until the program resets it or another defined action changes it. It does not automatically clear ACC at the start of every scan. That would defeat the purpose of keeping a count over time.

In Allen-Bradley-style ladder logic, a separate RES instruction is commonly used to reset a counter. When the reset instruction acts on the counter, it clears the accumulated value and resets associated status bits. Other PLC families may use different instructions or data structures, so the details depend on the platform.

Returning to the carton line, the machine might reset the counter after transferring a batch of 24 cartons. The sequence could be: the CTU counts cartons, Done turns on at the target, transfer logic moves the batch, and reset logic clears the counter for the next group. The reset should happen at the intended point in the sequence. If it occurs too early, cartons may be missed; if it never occurs, the count can carry into the next batch.

A small example, step by step

Imagine a sensor that detects items on a belt. The counter has a preset of 10.

  1. The sensor signal changes from off to on, and ACC increases from 0 to 1.

  2. The signal returns to off.

  3. Another item passes; the signal changes from off to on, and ACC increases to 2.

  4. The same pattern continues until ACC reaches 10.

  5. The Done bit turns on because ACC is now greater than or equal to PRE.

If one more item arrives before reset, ACC may rise to 11. The Done bit remains on, since 11 is still greater than or equal to 10. That’s normal; the counter is not necessarily a limiter that prevents further counts. If the system must stop counting at a certain point, the program needs logic to control what happens after Done becomes true.

Why counters need context

A counter instruction is only one piece of a control system. The surrounding logic decides what counts as an event, what happens when the target is met, and when the value clears. A sensor signal might need filtering. A machine may need an interlock before its conveyor can move. A counter could also need to retain its value through a machine pause, or reset only after an operator confirms a completed batch.

Those details are where good PLC design shows its value. The CTU provides a clear tally, but the program gives that tally meaning. Is it counting one item, one machine cycle, or one full group? Should the counter keep counting after Done turns on? What event starts a fresh count? Answering those questions helps prevent surprises on the factory floor.

The core behavior is simple: ACC increases when the count event occurs, PRE provides the target, and Done turns on when ACC is at least PRE. ACC can persist across scans, while PRE stays unchanged unless the program changes it. A separate reset action clears the count when the process calls for a fresh start. Done well, that small set of rules makes CTU instructions a dependable part of everyday automation.