One HMI field can show hours and minutes with a colon if the PLC builds the text: convert the captured hour and minute, pad minutes below 10 to two digits, join them with a literal colon, and bind one dynamic text object to the string tag. Refresh every second or right after each capture and size the object for 5 characters so 23:59 fits.
Yes, one field can carry it. A numeric display object formats a single number, so two captured members and a colon have to become text before they reach the screen. Build that text in the PLC: convert the hour, convert the minute with a pad to two digits below 10, join the pieces around a literal colon, and bind one dynamic text object to the resulting string tag. Trigger the build after each capture or once a second. The whole job is one rung of logic and one object on the screen, and the operator reads 8:04 in a single field.
Why one numeric display will not join two fields
A numeric display object takes one numeric value and applies a formatting rule to it. It has no input for a second value and none for punctuation, so an hour and a minute held in two members can only appear as two objects, which is the arrangement you are replacing. The colon and the leading zero are text characters, so the join belongs where text lives: in the PLC, as a string.
A numeric object can still serve a clock in one field if your HMI renders separator masks over a packed value, the hour multiplied by 100 plus the minute. That route suits a live HH:MM:SS readout and is covered in display HH:MM:SS time on an HMI numeric object. For a captured previous time the string route is the direct one: the panel shows exactly the text the PLC last built.
What you need
- The two captured members, hour (0 to 23) and minute (0 to 59), as separate values in the PLC. Read their exact tag names and data types from your project tree. The steps below use the illustrative tags
HourNowandMinNow, integer members, so you can map them onto yours. - A string tag in the PLC to hold the finished text.
- A number-to-string conversion in the PLC instruction set. Most platforms carry one, and some turn a time-of-day type into text in a single instruction; these steps assume number-to-string plus a literal colon.
- A trigger: the capture-done condition, or a periodic bit.
- One dynamic text object on the screen, the object type that binds to a string tag and prints the text as it stands.
If the hours you capture are machine run hours, the capture side is covered in show motor run hours on an HMI from a PLC counter.
Build the string and bind one object
- Confirm the two members and their types in the project tree. Everything downstream uses them, and a mistyped member name fails here as an unresolved reference, before the panel enters the picture.
- Convert
MinNowto text and pad it. Minutes 0 through 9 convert to one character, and a clock reads 8:04, so the minute field is always two characters. Use the fixed-width option of the conversion, width 2 with pad character0, if your instruction offers one. The same padding question on a numeric route is covered in display leading zeros on a split HMI numeric display. - Convert
HourNowto text unpadded. Hours run 0 to 23, one or two characters; pad to two only if your convention wants a fixed 08:04 style. - Join the pieces into the string tag: hour text, the literal
:, the padded minute text, in that order. Keep the value a string end to end; a numeric hop between the conversions would drop the colon. - Trigger the build. Fire it once after each capture writes both members, or periodically every 1 s. The basis: a minute lasts 60 s, the pair changes at most once every 60 s, and a 1 s period shows each new minute within 1 s of the rollover. Keep any periodic period under 60 s; at 60 s or more a finished minute can stay on screen past the rollover. Sequence the rung so the build runs after both writes, because a build landing between them can print a mixed pair such as 9:59 for a 9:00 event.
- Bind one dynamic text object to the string tag and set its visible width to 5 characters, the longest value the field can hold, 23:59.
- Take the two numeric displays off the screen once the string reads correctly at the panel. Keep the numeric members themselves; the machine logic still uses them.
Keep this rung display-only: the string exists for the operator's eyes, and any decision the machine makes reads HourNow and MinNow directly.
Example: build 8:04 from hour 8 and minute 4
Inputs. Hour 8 and minute 4, the captured previous time held in the two members, clock values on the ranges 0 to 23 and 0 to 59. Padding rule: minute always two digits, hour unpadded, the clock convention this display serves. Trigger period 1 s, chosen here as a comfortable default; any period under 60 s preserves the arithmetic below.
Rule in words. Display text equals the text of the hour, then a colon, then the text of the minute always written as two characters.
Arithmetic. Minute 4 sits in the range 0 to 9, so the pad branch fires and 0 joined to 4 gives 04. Hour 8 converts to 8, one character. The join gives 8 + : + 04 = 8:04, and the length is 1 + 1 + 2 = 4 characters. The longest string a day can produce is hour 23 with minute 59: 2 + 1 + 2 = 5 characters, which is what sets the object width. On the next refresh after minute 4 becomes 5, the string turns into 8:05, within 1 s of the rollover.
Result. The string tag reads 8:04 and the dynamic text object prints 8:04 in one field, colon and leading zero intact.
Decision. If the panel shows 8:4, the pad branch is missing: add the test minute below 10 that prepends 0, or set that conversion to fixed width 2. If the field holds 8:04 more than one trigger period after a known change, the trigger is not firing, and the fix is to move the build onto the capture-done condition.
Check it worked
- With the PLC online, watch the string tag for hour 8, minute 4: it must read 8:04, four characters, colon included. A tag reading 8:4 or 84 points at the pad or the join, and you correct the logic before touching the screen.
- Push a single-digit minute and a double-digit minute through the members, 4 then 45, and confirm both strings.
- Force or wait for a change and time the panel: the new minute appears within one trigger period, 1 s in the example.
- When a value reads wrong, compare in order: the members, then the string tag, then the object binding. That order separates a capture problem from a formatting problem and a binding problem.
- An object that clips the text or shows a single character has a width or capacity problem; the repair is covered in fix a dynamic text object that shows one character.
- Text that stays stale across a screen change is a separate fault; that behavior is covered in HMI numeric displays show old values after a screen change.
If the project editor cannot resolve the time members, or the object refuses a string binding, take the project file, the tag definitions and the observed strings to the vendor's support channel.
The decision
Recommendation: Build the time string in the PLC, hour text, literal :, minute padded to two digits whenever the minute is below 10, and bind one dynamic text object sized for 5 characters. Trigger the build after each capture, or periodically at 1 s with any chosen period kept under 60 s. Keep the two numeric displays on the screen only while you commission the string; once 8:04 reads correctly at the panel, remove them and leave the numeric members in the control logic. Pick the packed numeric route only when the goal is a live HH:MM:SS clock and your numeric objects support separator masks.
Questions
How many characters should the string tag reserve?
Reserve 5. The hour runs 0 to 23, so two digits at most, the colon is one, and the padded minute is two, which makes 23:59 the longest value at 5 characters. If you later add seconds in the same style, the longest string grows to 8 characters for 23:59:59, and the object width grows with it.
How far behind the capture can the displayed minute be?
With the build triggered by the capture-done condition, the text is rebuilt at the moment of capture, so the display holds the captured values until the next one. With a periodic build the display lags by up to one full trigger period: 1 s at a 1 s period, 5 s at 5 s. Keep the period under 60 s so a finished minute cannot outlive its rollover.
What if the PLC has no number-to-string instruction?
Look first for a conversion aimed at the time-of-day type; some platforms turn that type into display text in one instruction. If your instruction set has neither conversion, the fallback is the packed numeric route, hour multiplied by 100 plus the minute, shown through whatever separator mask the panel's numeric objects provide, with two separate numeric displays as the last resort.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.