Two numeric display objects can show one long integer only if the low object keeps its full width. Set the least-significant object's number format from leading spaces to leading zeros, leave the PLC value unchanged, and verify the join with a short low value, a full-width value and the rollover before the screen goes back in service.
Yes. Two numeric display objects can show one integer that neither object can hold alone. A joined reading that looks broken is almost always one format setting: the least-significant object is drawing leading spaces. Give that object a leading-zeros format and a digit width that matches the divisor used to split the value, and the joined reading stays correct at every count. The PLC tag stays exactly as it is. This page walks through the setting, the arithmetic that fixes the width, and the three test values that verify the join before the screen goes back in front of operators.
Why the joined number reads wrong
The split is simple arithmetic in the PLC: divide the count by 10,000 with integer division for the high portion, and keep the remainder for the low portion. Each numeric display object formats only its own tag. The default format draws unused digit positions as spaces. A low portion of 37 then draws as two characters in a four-position field, the boundary between the portions slides left, and the joined string loses its place value. The value on the wire is right the whole time; the drawing is wrong.
The object's number format controls this. HMI software presents it either as a leading zeros choice in the numeric format settings or as a format pattern built from digit placeholders. The convention is documented: a zero placeholder forces a digit at that position, so unused positions draw as zeros. The same format dialog usually carries the digit count and the decimal places; showing more decimal places on an HMI numeric display is its own question with its own article.
What you need
- Access to the HMI project editor for the screen.
- The two tags and the split math: the divisor, and which portion each object reads.
- Three test values the line can produce safely: one that leaves low positions unused, one that fills them, and one at the rollover.
- A short window in which a briefly wrong number on the screen cannot cause a wrong operator action. Make the change and run the tests inside that window, or hold the screen out of service until the tests pass.
Set the least-significant object to leading zeros
- Open the properties of the numeric display object that reads the low portion. Leave the high object unselected; the format change belongs to the low object only.
- Find the number format controls in that object's properties and set every position of the low portion to the zero placeholder, or switch the leading zeros option on.
- Set the digit count in the same format dialog to exactly the width of the low portion: four digit positions for a 10,000 divisor, three for a 1,000 divisor.
- Leave the PLC math and the stored tag untouched. Writing zeros into the value to fill the display multiplies the number by 10,000, and every screen, trend and log that reads the tag inherits the wrong number.
- Right-align the high object to the join and match the font of the two objects, so a short high value still ends flush at the boundary and the joined string has even character spacing.
- Save and download the project, then run the three tests below.
Worked example: a nine digit production count
A line counter lives in a 32 bit signed integer, which holds up to 2,147,483,647. The project gives the high object five digit positions and the low object four, so the pair displays 0 through 999,999,999; counts above that need a wider high object.
The split runs as:
- High tag = Count / 10,000, integer division
- Low tag = Count - (High × 10,000)
Check the arithmetic by hand with Count = 1,230,037: High = 1,230,037 / 10,000 = 123, and Low = 1,230,037 - (123 × 10,000) = 37. With leading spaces, the low object draws two blank positions and then 37, so the board reads 123 37 and the count on the wall is 123,037 while the true count is 1,230,037. With leading zeros the low object draws 0037 and the board reads 1230037.
Size the digits for where the board hangs. The common legibility planning figure is 30 ft of viewing distance per inch of capital letter height (FHWA), so a count read from 15 ft needs capitals at least 0.5 in tall; at 60 ft, use 2 in digits or move the board closer.
Three tests, with the drawing each must produce:
| Count | High object | Low object | Joined reading |
|---|---|---|---|
| 1,230,037 | 123 | 0037 | 1230037 |
| 1,234,567 | 123 | 4567 | 1234567 |
| 999,999 | 99 | 9999 | 999999 |
| 1,000,000 | 100 | 0000 | 1000000 |
The last two rows are one rollover test: the low tag runs 9,999 to 0 while the high tag steps 99 to 100, and the joined string must go from 999999 to 1000000 with no blank position anywhere.
Width errors show just as clearly. A low object three positions wide cannot draw 6,000 to 9,999 at all. A low object five wide with leading zeros turns Count = 1,234,567 into 12304567, which reads as 12,304,567. The width equals the number of digits in the divisor, no more and no fewer.
If the line also needs a separate notice or status screen for the count, an Android panel-mount display such as the 15.6 inch all-in-one plays the board content offline; sizing for viewing distance is covered in choosing a display size.
Recommendation: set the least-significant numeric display object to a zero placeholder in every position, with a digit width equal to the digit count of the divisor, keep the stored tag untouched, and hold the screen out of service until a short low value, a full-width low value and the rollover each read as one correct number.
If the zeros still do not show
Work the faults in this order:
- Spaces are still drawn. The format edit landed somewhere else. Reopen the properties of the low object itself and check that every low position shows the zero placeholder; some packages keep a separate format for entry objects, so the display object's own format is the one to change.
- A digit is missing or an extra digit appears. The width disagrees with the divisor. Recount the digits in the divisor and set the object's digit count to match.
- The joined string is wrong before any question of formatting. That is a value fault. Read the low tag's live value in the project editor's watch or diagnostic view and compare it with the drawing; the basics live in how to display a PLC counter value where operators can see it. A count that reads as a huge positive number points at the data format, and set the signed decimal data format is the usual fix.
- The join still fails after all that. Take the object configuration, the divisor and the three test values to the HMI project owner or the manufacturer's official support channel; the project file tells the story.
Questions
Do numeric entry fields need the same setting?
Entry objects are separate objects with their own format settings, and some of them drop zeros as the operator types. If the same project uses an entry field for a fixed-width code, open that entry object's own properties and set its leading-zeros format there too. The steps on this page are for numeric display objects, and a change to a display object's format never carries over to an entry object.
Can the value be split across three numeric objects?
Yes. Chain the same division. For a count up to 9,999,999,999, divide by 100,000,000 for the first object, which needs two digit positions, divide the remainder by 10,000 for the middle object at four positions, and keep the final remainder, always under 10,000, in the low object at four positions. The middle and low objects both need leading zeros at full width, and the first object only has to sit flush against the join.
Does the high object ever need leading zeros?
Usually no. A short high value can be right-aligned against the join, so 99 with a low portion of 0037 still reads 990037. Leading zeros on the high object add a fixed digit count and produce 000990037, which most operators will misread. Right-align the high object and match the font instead, and only consider zeros there if your plant standard requires a fixed total width on the board.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.