Split each 16-bit status word into four hex digits, one digit per group of four inputs. Check the numeric display object for a hex or binary format before writing PLC code; if only decimal and BCD exist, build the digits in the PLC, and keep every status object display-only.
Show each 16-bit input word as four hex digits, one digit per group of four inputs, and the bit pattern becomes readable at a glance. Before you write PLC code, open the numeric display object's properties and look for a format list: many HMI editors put Binary, Hex or Octal next to Decimal right there. If the panel offers only decimal and BCD, have the controller build the digits as text. One rule outranks the rest: never bind a write-capable object such as a radio button to a status register, because a single touch rewrites the data you are watching.
Why BCD hides the input bits
BCD packs one decimal digit into each 4-bit group. Valid digits run from 0 to 9, so six of the sixteen possible nibble values, 10 through 15, have no BCD digit at all. Raw input status puts any of the sixteen values in every nibble, so a BCD-formatted field garbles the word or drops characters as inputs change. A BCD field also answers a different question: it shows the number stored in the word, and the operator still has to work out which input is on.
Hex covers every nibble with one character. Values 0 to 9 print as digits and 10 to 15 print as A through F, so four hex digits describe all 16 bits of a word. The same mix-up between a word's value and its bit pattern is behind an HMI showing nonsense numbers from a PLC BCD analog register.
Symptoms and what each points to
- The screen shows a sensible decimal number and operators still ask which input tripped: the object is decimal or BCD formatted, so switch its format to Hex or build the digits.
- Characters turn to garbage or blanks while inputs change: a BCD field has met a nibble from 10 to 15, which has no digit.
- Touching the status display changes the values: a write-capable object such as a radio button or an entry field is bound to the status word.
- The bits read right to left against your labels: the object prints the least significant bit on the left in the horizontal layout, a convention some bit displays use.
- The screen ran out of object slots: 64 separate indicator objects filled the object budget of a 6-inch panel before the outputs were even placed.
Check the numeric object's format list first
Formats live in the object, and they differ between editors and between models from the same editor. Open the status display object in the software that programs this panel and read its properties. Look for a format or number-style list. Published references for several HMI lines show the same pattern: an object property with Integer, Decimal, String, Hex and Binary selections. If Hex is there, select it, set a fixed width of four characters so leading zeros stay visible, and confirm the object type is display-only with no write action listed. Binary shows all 16 digits and needs about four times the width of hex. Octal needs six digits for a 16-bit word, because each octal digit covers 3 bits and 16 leaves one bit over.
Never put a write-capable object on a status word
A radio-button style object can show every bit set in a word, including bits the PLC set, which is why it looks like a free status display. The write behavior is the problem: a touch writes a selection into the register, so one operator at a 6-inch panel can alter the input-status data the controller reads. If that word feeds a permissive or an interlock, treat any touches as real changes and compare the register with the actual input states before trusting the screen again. Take the object off the word and replace it with a display-only field or lamps.
Bit order needs one check of its own. Some bit-oriented objects print the least significant bit at the left in the horizontal arrangement, while numeric fields print the most significant character on the left, as every number does. Label bit 0 and bit 15 on the screen so both conventions read the same way to operators.
Worked example: one 16-bit input word as four hex digits
The inputs: a 16-bit input-status word reading 0101 1001 0110 1100, a mixed pattern of the kind a live machine produces; a numeric display object whose format list holds decimal and BCD only; the goal is one character per four inputs.
The rule: one hex digit per 4-bit group, and within each group the four bits carry place values 8, 4, 2 and 1 from left to right.
The arithmetic:
- 0101 = 0×8 + 1×4 + 0×2 + 1×1 = 5
- 1001 = 1×8 + 0×4 + 0×2 + 1×1 = 9
- 0110 = 0×8 + 1×4 + 1×2 + 0×1 = 6
- 1100 = 1×8 + 1×4 + 0×2 + 0×1 = 12, printed as C
- Display: 596C
Read as a binary number, the same word is 5×4096 + 9×256 + 6×16 + 12 = 20,480 + 2,304 + 96 + 12 = 22,892, so a decimal field shows 22892, five digits that match no input. Read as BCD, the nibbles are 5, 9, 6 and 12, and 12 has no BCD digit, so the field garbles the word. Counting the 1s: two per nibble across four nibbles, so the word shows 8 of the 16 inputs ON.
The decision: the word contains a nibble of 12, and any nibble from 10 to 15 has no BCD digit, so BCD is out for status words the moment one of those values appears. Hex covers every nibble from 0 to 15 at one digit per four inputs, four digits per 16-bit word. Use the object's hex format when it exists; when the list stops at decimal and BCD, build the digits in the PLC.
Build the digits in the PLC when the format list stops at decimal
Pick a string tag the panel can read, and have the controller turn each nibble into its ASCII character. The conversion is one comparison per nibble: add 48 to a nibble from 0 to 9 for characters 0 to 9, and add 55 to a nibble from 10 to 15 for characters A to F. Nibble 5 becomes character code 53, the digit 5; nibble 12 becomes 67, the letter C. Assemble four characters per word, keep a fixed width with leading zeros, and write the string to the tag the display reads.
All 64 inputs then take 16 characters, or 19 with a space between words, in one read-only text object or one small text object per word. Keep the display's access to that string tag read-only, keep the conversion in one routine, and note the bit order beside the routine so the next person reads it instead of rediscovering it.
Budget the screen when operators need lamps
Sixty-four separate indicator objects filled a 6-inch panel's object budget before the outputs were placed, and that is the trap with the per-input approach. Four hex fields replace 64 lamp objects: 64 ÷ 4 = 16, so the word view uses one sixteenth of the objects. When operators need a lamp for the handful of inputs they act on, give those inputs lamps and hex fields to the rest. Splitting the inputs across screens works too: 16 inputs per screen over 4 screens keeps every lamp within budget and leaves room for the word's four digits beside them. Display 16 PLC input and output bits on one screen shows that lamp layout in detail, and split 32-bit register bits into discrete HMI alarm tags covers the tag side when a bit also needs a named alarm state.
Checks before the screen goes back into service
Point the field at a spare word first and write known patterns. All bits off reads 0000. All bits on reads FFFF, which is 65,535 in decimal, so a field still on decimal format gives itself away at once. A walking bit, 0x0001, 0x0002, 0x0004, 0x0008 and on to 0x8000, walks a single 1 through every position and exposes reversed bit order at the first step. A word with letters, 1011 0110 1010 0011 = B6A3, proves A through F display correctly. After the patterns pass, compare the field with the controller's live word while inputs toggle, and touch the screen once to confirm nothing writes. Then label bit 0 and bit 15 on the face of the display.
The decision for each case
If the numeric object lists Hex or Binary, use it: four read-only hex digits per 16-bit word, sixteen characters for all 64 inputs, no PLC code. If it lists only decimal and BCD, build the hex characters in the PLC and show them as read-only text. Give lamps only to the inputs operators act on, 16 per screen at most, and keep hex fields for the rest.
Recommendation: Select Hex on the status numeric object when the format list offers it, and expect four digits per word and sixteen characters for 64 inputs. When the list stops at decimal and BCD, build the digits in the controller and display them as read-only text. Replace any radio button or entry field bound to a status register with a display-only object before the panel goes back on the wall.
Questions
Is octal an option for showing input words?
Each octal digit covers 3 bits, and a 16-bit word leaves one bit over, so the field needs six octal digits; all bits on reads 177777, which is 65,535 in decimal. The digit groups also split groups of inputs unevenly. Hex matches one digit to exactly four inputs, so take octal only when the format list offers it and hex is missing, and label the bit count per digit.
Which object types are safe on a status word?
Display-only objects are safe: numeric fields, text fields and indicator lamps, because they read the word and have no write action. Entry fields, radio buttons, toggle switches and push-button objects are unsafe on status data, because a touch writes a value or a selection into the register. If the properties screen lists a write, entry or input action for the object, keep that object off status words.
How should binary look if the editor offers it instead of hex?
Some commissioning data views print binary grouped by hex digit with an underscore between the groups, so a word holding F00D shows as 1111_0000_0000_1101. Grouping the 16 digits into four blocks of four keeps the nibble boundaries visible. Set a fixed width of 19 characters, keep the field display-only, and treat bit order the same as you would for hex.
Can operators keep a decimal readout too?
Yes, and both fields can read the same register. Keep the four-digit hex field for troubleshooting and add a five-digit decimal field beside it for anyone cross-checking a value against documentation; a full 16-bit word peaks at 65,535, which is five decimal digits. Both fields stay display-only, and the decimal one still says nothing about which input is on.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.