A PLC timer's accumulated value counts up from zero, so an object bound to it shows elapsed time and counts the wrong way for operators. Compute preset minus accumulated into a spare register in ladder logic, condition the subtraction so the result clamps at zero, and point the screen object at that register.
The current value of a PLC timer counts up from zero toward its preset, and the timer's done contact turns on when the accumulated value reaches the preset. An object pointed straight at the timer therefore shows elapsed time. On a typical 0.1 s time base, an operator watching a 25.0 s step sees the count climb from 0 to 250 instead of falling, which reads backwards to them.
Fix it in the ladder, not on the panel. Add a rung that subtracts the accumulated value from the preset, stores the result in a spare register, and clamps the result at zero. Then point one numeric object on the panel at that register. The timer rungs themselves stay untouched.
Why the panel counts the wrong way
Three documented behaviors decide the job:
- The accumulated value counts up from zero while the input rung is on.
- The done contact turns on when the accumulated value reaches the preset.
- Past the preset, behavior depends on the instruction: some stop the accumulated value there, others keep counting while the rung stays energized. The manual entry for your timer instruction states which one you have.
So the accumulated register is an elapsed-time meter, and the value operators want is preset minus accumulated. Two ordinary situations drive that subtraction negative: an instruction that keeps counting past the preset, and an operator who edits the preset below the accumulated value while the step runs. The rung has to survive both, which is what the clamp below is for.
If your project already holds a register that falls toward zero, the ladder work is done; the article on displaying a PLC countdown timer on an HMI panel covers the panel side of pointing at an existing countdown value.
What you need
Back up the program and make the edit with the machine in a safe stopped state.
- The PLC project open, with the timer identified. If the timers carry no descriptors, trace from the output the step energizes back to the timer instruction, and write down its preset address, its accumulated address and the output it drives.
- The time base of that timer instruction, from its manual entry. Small-PLC timer instructions commonly run at 0.1 s per count; your entry states the number you have.
- One spare data register per timer, for example a spare V register. Never share one register between two timers, or one display will show the other timer's result.
- If the manual entry says the accumulated value is a double word, note the address of its low register.
- Access to the panel project, to add one numeric display object per timer.
Add the subtraction rung
-
Pick one spare register for this timer. Write the address into the timer's descriptor and the register comment so the next person can follow it.
-
Add the subtraction rung. Condition it with a comparison of accumulated less than or equal to preset. On that condition, compute preset minus accumulated and move the result into the spare register. Both operands are counts of the same time base, so the result is in those counts too.
-
Add the clamp branch. When the comparison fails, accumulated greater than preset, move 0 into the same spare register. On most instruction sets this is a compare contact driving a move on a second branch, both branches writing the one register.
-
Repeat per timer. Each timer gets its own register and its own pair of rungs.
-
Point a numeric object at the spare register. The address entry works exactly like pointing a numeric object at the timer preset address; only the address differs. Set the object's number format to what the PLC stores, unsigned; setting the correct HMI data format for a PLC timer preset walks through that choice.
-
Set the decimal point from the time base. On a 0.1 s timer, one decimal place turns a register value of 160 into 16.0 on the panel. If the object cannot place a decimal, show whole counts and carry the unit in the label.
-
Label the object with the real unit. Time left, seconds, under the step name. A right number under a wrong unit is still an operator error.
Clamp the result at zero
Timer registers on small PLCs are unsigned counts. An unsigned 16-bit value has no sign bit, so a subtraction that goes negative wraps: a result of −150 is stored and displayed as 65536 − 150 = 65386. That is the five-digit number operators report as a broken panel.
The comparison plus the zero move removes both routes to a negative result. While accumulated is at or below preset, the panel shows the true remainder. The moment accumulated passes preset, or the preset is edited below the accumulated value, the second branch writes 0 and the panel holds at zero until the numbers agree again.
One format trap sits next to this: some timer instructions store their registers in BCD. A binary object reading a BCD register shows a different number, because the BCD pattern for 160 read as hexadecimal is 0x0160, which is 352. If values look right up to 9 and then go strange, it is this mismatch, and the binary vs BCD timer preset multiply fix shows how to sort the pair out.
Worked example: a 25.0 second step timer
A machine step is timed by a 0.1 s timer with the preset at 250, which is 25.0 s. The spare register holds preset minus accumulated while accumulated is at or below preset, and 0 otherwise.
- Cycle start: accumulated 0, so remaining = 250 − 0 = 250. Panel: 25.0.
- Mid step: accumulated 90, so remaining = 250 − 90 = 160. Panel: 16.0.
- Step done: accumulated 250, so remaining = 250 − 250 = 0, done contact on. Panel: 0.0.
- Instruction that keeps counting, rung still energized, accumulated 400: without the clamp, 250 − 400 = −150, shown unsigned as 65386. With the clamp, the over branch writes 0. Panel: 0.0.
- Operator drops the preset to 120 while accumulated sits at 150: 120 − 150 = −30, unsigned 65506. The clamp writes 0, and the panel holds 0.0 until the cycle restarts at accumulated 0, when it shows 12.0.
Every case ends with a panel the operator can read, and the timer's own rungs never changed.
How to check it worked
-
Watch three values in the PLC monitor while the step runs: preset, accumulated, and the spare register. The spare register falls as the accumulated value rises and reads 0 when the done contact sets.
-
Hold the input rung on past the preset if your instruction keeps counting, and confirm the spare register stays 0 instead of rolling over to a five-digit number.
-
Press the operator's preset button mid step and watch the spare register follow the new preset. If it follows a stale number, the button and the subtraction rung are reading different preset addresses; trace which register the button writes.
-
Put the panel next to the PLC monitor and compare numbers: register 160 with panel 16.0 is correct; register 160 with panel 352 is BCD stored and binary read, so fix the object's format.
-
Start the step the normal way and watch the panel from the operator's position, about 3 ft away. The value should fall to 0.0 with no jump when the done contact sets.
| What you see | What it points to |
|---|---|
| Panel shows 352 when the PLC monitor shows 160 | The register stores BCD and the object reads binary; set the object's format to match |
| Panel shows 65386 near the end of a step | The clamp branch is missing or its comparison is reversed |
| Panel counts up instead of down | The object is pointed at the accumulated register, not the spare register |
| Panel holds 0 for the whole step | The comparison never passes; check that its two operands are the preset and accumulated registers |
Recommendation: compute the time-remaining value in the ladder, one spare register per timer, conditioned on accumulated at or below preset with a move of 0 on the over branch, whenever operators need to read time left on a timer that counts up. Point the panel object at that register, set the object's format to what the PLC stores, give it one decimal place on a 0.1 s time base, and leave the timer rungs untouched.
Questions
Why does the time left jump back to the full preset when the step ends?
A standard on-delay timer resets its accumulated value to zero the moment its input rung drops out, so preset minus accumulated returns to the full preset. On a repeating cycle that is correct: the timer is armed again and the next cycle starts from full time. If you need the last value to stay on the panel after the step ends, use a retentive timer instruction and control its reset from the step logic.
Can the panel show minutes and seconds instead of a raw count?
Yes, and the cleanest place to do it is the PLC. Take an integer divide of the remaining count by 600 for minutes, divide the remainder by 10 for seconds, store each in its own spare register, and give the panel two objects. A remaining value of 1300 on a 0.1 s time base is 2 min 10 s; a value of 160 is 16 s.
The instruction's manual says the accumulated value is a double word. Does that change anything?
Yes. The accumulated value then occupies two consecutive registers, and the panel object must read 32 bits starting at the low register. A 16-bit read sees only half the value, so the countdown goes wrong at large presets. Make the spare register double width too if you match it to the accumulated value.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.