Show a pump last-run time stamp on an HMI panel

6 min read · Published November 13, 2026

A clock object cannot show when a pump last ran, because it always shows the current time. Detect the pump's off-to-on start, copy the PLC real-time clock fields into six retain registers on that edge, and point HMI numeric display objects at them in 24-hour time and mm/dd/yy format. If a scrolling banner or alarm box is acceptable, the panel's event manager can stamp the event without PLC edits.

A pump's last-run stamp is a record, not a clock. The clock object on an HMI panel shows the current time and nothing older, so it can never answer 'when did this pump last start'. The value you want is the PLC's real-time clock, captured once at the pump's off-to-on transition and held in registers until the next start overwrites it. Show those registers as fixed numeric fields in 24-hour time and mm/dd/yy, and the stamp stays visible through the viewing window with no touch needed. There is a quicker path too: the panel's event manager can timestamp the event and show it in a scrolling banner or an alarm box. This article builds both routes and gives the checks that tell you which one you actually have.

Why a clock object cannot be the stamp

A clock object reads the panel or PLC clock and redraws the current time every second. It has no memory of the second before, so it cannot freeze on a past event. Two other panel features look closer and still miss:

  • A trend of the running bit shows runs as blocks on a chart, but a chart is something to interpret, and the operator at the window needs one readable value.
  • The event manager records an event with its date and time, but the message surfaces only where active events surface: scrolling in the banner along the bottom of the screen, or in an alarm message box. Newer events push it along and out. Dedicating a box to this event is its own build; showing an alarm as a pop-up message box on an HMI screen covers it.

If the screen also needs the live clock itself, that is a separate object: showing a digital clock on an HMI panel from PLC RTC values covers that build.

The two routes at a glance

Event manager message PLC-captured registers
Where it shows scrolling bottom banner or an alarm message box fixed numeric fields you place and label
One fixed spot on the glass no yes
Held until the next start only while the event stays listed yes
Survives a panel power cycle depends on the panel's event history yes, the values live in the PLC
PLC program changes none one edge pulse and six copy instructions

The event route needs no PLC edits, so it is the fastest way to test the idea on the glass. The register route is the one that meets a written last-run requirement.

What you need

  • The PLC bit that is on only while the pump runs. Confirm it in the program and at the pump: 0 with the pump stopped, 1 while it runs. An auxiliary contact works when it matches the physical pump.
  • From the controller manual: where the real-time clock fields live (fixed system registers, or a block a clock-read instruction fills), whether each field has its own register or two fields pack into one word, and whether values are plain integers or BCD, a format where each decimal digit takes 4 bits.
  • Six free registers in the controller's retain range, one each for hour, minute, second, month, day, year.
  • In the panel software: tags pointed at the registers, and numeric display objects.
  • For the event route: the panel's event manager, in many packages under a Database section, plus the built-in banner or an alarm message box object.

Steps: capture the stamp and show it

  1. Verify the running bit: pump stopped, the bit reads 0; pump running, it reads 1. A contact that is on for the whole run cannot be the trigger; you need the transition.
  2. Read the manual for the clock: register addresses, packing, and integer or BCD format. Set the clock itself from a trusted time source while you are there.
  3. Pick six retain registers, one each for hour, minute, second, month, day, year.
  4. Add a one-shot (off-to-on edge) instruction on the running bit, and on that pulse copy the six clock fields into the six registers. Nothing else in the program writes them, so they hold until the next start edge.
  5. If the record also needs the last stop, add a second one-shot on the on-to-off transition into a different register set, and label the two readouts separately so a stop time cannot be read as a start.
  6. In the panel software, create one tag per register and set each tag's number format to match the register: integer or BCD.
  7. Add numeric display objects, two digits each, zero-filled: HH:MM:SS in 24-hour time and mm/dd/yy. Label the group LAST RUN and place it where the window view reaches.
  8. Size the characters for the glance distance: the FHWA highway lettering rule of 30 ft of viewing distance per inch of capital height gives 0.2 in capitals at 6 ft; the safer 20 ft per inch figure gives 0.3 in.

Make the edit and download with the pump in a safe, locked-out state; the new edge pulse executes on the first scan after the program lands. If the pump station also needs a wider notice board for the same wall, our shop-floor screens are built for that job; this stamp stays on the HMI.

Worked example: a start at 14:37:05 on 03/21/25

The running bit rises at 14:37:05 on March 21, 2025, and the clock supplies one register per field.

  • One-shot pulse, one scan long.
  • Copies: hour 14, minute 37, second 5, month 3, day 21, year 25.
  • Tags: 2-digit zero-filled integers, so second 5 shows 05 and month 3 shows 03.
  • Screen, through the glass: LAST RUN 14:37:05 03/21/25. It sits still while the pump runs, after it stops, and through panel power cycles, until the next start replaces it.

Format trap, with the arithmetic: some clocks pack hour and minute into one BCD word, 0x1437 for 14:37. Read that word as a plain integer and the field shows 5175, because 1x4096 + 4x256 + 3x16 + 7 = 5175. Set the tag format to BCD and the same word shows 1437. One register per field, as in step 3, avoids the trap.

Resolution: the stamp is only as fine as the clock's seconds field, so 1 second is the sharpest stamp this design can produce. Two starts within the same second read the same.

How to check it worked

  • Pump stopped: the fields hold the previous start, and a live clock on the same screen shows now. The two differ.
  • Start the pump: the fields step once to the new time and then hold while it runs. They record the start; duration is a different display, built the same way with a counter on the running bit.
  • Stop the pump and power-cycle the panel: values unchanged, because they live in the PLC.
  • Power-cycle the PLC: values still there if the registers sit in the retain range. If they return as zeros, move them; the same move keeps run-hour counts alive through a power loss.
  • Event route: trigger one start and watch the banner or alarm box carry the start text and its timestamp. If the timestamp column is missing in an event or alarm list, look for its occurrence-time setting in the object's properties and switch it on.
  • If any field shows 13.0 for the hour, the tag format is float for a register that holds an integer; set the tag's number format to integer and the decimal disappears.
  • Drift: at a working figure of 50 ppm for an unadjusted quartz clock, the clock loses 129.6 s in 30 days: 30 d x 86,400 s x 50 / 1,000,000 = 129.6 s, about 2.2 minutes. The loss grows in proportion to days and to ppm, so correct the clock from your time source monthly if a minute of accuracy matters to the record.

Recommendation

Recommendation: capture the clock into PLC retain registers on the start edge and show fixed numeric fields whenever the stamp must hold one spot on the glass, survive newer events, or live through panel power cycles. Use the event manager route when a scrolling banner or alarm box is acceptable and you want no changes to the PLC program. When both are cheap to build, build the register route: it is the one that satisfies the requirement as written, and the event banner stays useful as a companion for starts and stops as they happen.

Questions

Does the stamp survive a power outage?

It survives if the six registers sit in the controller's retain or battery-backed range. Ordinary holding registers reset to zero, and the screen would read 00:00:00 and 00/00/00 after a power cut. Panel power cycles do not touch the values either way, because the stamp lives in the PLC. If the controller holds retains with a battery, note the battery's replacement date at commissioning and check it yearly.

Can I show the year with four digits?

Yes, in two ways. If the controller's clock supplies a four-digit year field, copy it into its own register and display four digits. If it supplies only two digits, copy the two-digit value and put the century as fixed text, 20, in front of it. Avoid adding 2000 inside the PLC unless every other user of that register expects a four-digit year; alarms and logs that compare or sort years will otherwise mis-sort.

Why does the event banner disappear when the pump stops?

A banner shows active events. What stays after the pump stops depends on the panel's event list settings, so check whether past events remain listed and displayed. The dependable route for a value that never clears is the PLC capture: the registers keep the last start until the next one overwrites them, and the screen keeps showing them whether the event is active or not.

How accurate is the stamp?

The stamp is as accurate as the PLC's clock. Set the clock from a trusted source before commissioning, and re-set it after any controller battery change. Some controllers can take their time from an NTP server on the plant network, which removes the monthly manual correction; if yours cannot, use the drift check in this article to decide when to re-set. Two starts inside the same second read the same, because the finest field is 1 second.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote