A numeric entry that stops at four digits is tagged as a 16-bit BCD value on one register, and one BCD register tops out at 9999. Change the panel tag to match the PLC: 32-bit BCD across two consecutive registers for up to eight digits, or Unsigned 16 for five digits up to 65,535 when the PLC stores binary.
When a numeric entry refuses a fifth digit, the limit is not the keypad and not the field width. It is the tag's data type. The entry writes a 16-bit BCD value into one V-memory register, and one BCD register holds four decimal digits, 9,999 at most. The fix lives in the panel project, not in PLC logic: match the entry tag to the way the PLC stores the number, then give the field the digits it needs. If the PLC keeps the register in BCD, the default format on many legacy PLCs, change the tag to the 32-bit BCD type, which occupies the register and the next consecutive register and accepts up to eight digits. If the PLC treats the register as plain binary, change the tag to Unsigned 16 or Signed 16, which carry five digits. The sections below pick the type, work a five-digit example and verify the value at both ends.
Why one register stops at four digits
BCD spends 4 bits on every decimal digit, so a 16-bit register stores 16 / 4 = 4 digits and nothing above 9,999. Many legacy PLC families run BCD as their default data format, and a numeric entry tagged to a single register inherits that ceiling. Five digits need 20 bits of BCD, so they cannot fit one 16-bit register; they need a wider BCD value on two registers, or a binary format that packs more number into the same 16 bits.
A value spread over two registers is a familiar layout in panel work: it is the same pattern as a PLC float stored in two word registers on an HMI. The panel reads the pair as one number.
What each symptom points to
- The keypad refuses or swallows the fifth digit. The tag is a 16-bit type on one register, and a 16-bit BCD register caps the entry at 9,999.
- You widened the field and the cap stayed. Field width changes the drawing; the register still stores four BCD digits.
- After a type change, the panel or the PLC shows a huge or nonsense value. The two ends now read the same bits as different formats, the mismatch behind nonsense numbers from a PLC BCD or analog register and large positive values that call for the signed decimal data format.
- Saving the wider tag raises an invalid address error. The second consecutive register is outside the addressable range or already in use; the checks in fixing HMI invalid address errors when tagging PLC memory apply.
- The panel accepts the entry but the PLC register never changes. That is a write fault, not a digit cap; a separate walkthrough covers a numeric entry that never writes to the PLC register.
Pick the tag type from the PLC's number format
| PLC stores the register as | Panel tag type | Registers used | Range |
|---|---|---|---|
| BCD, the legacy default | 32-bit BCD | Two consecutive | 8 digits, 0 to 99,999,999 |
| Binary, never negative | Unsigned 16 | One | 5 digits, 0 to 65,535 |
| Binary, may go negative | Signed 16 | One | 5 digits, -32,768 to 32,767 |
Keep BCD on a legacy PLC whose default instructions read the register as BCD, and take the two-register 32-bit BCD tag: eight digits with no PLC code. Use Unsigned 16 when the logic treats the register as a plain binary number and every value stays at or below 65,535; a five-digit value above 65,535 needs the wider paths in the checks below. Use Signed 16 for values that can go negative and stay within its range. If the PLC stores binary and values can pass 65,535, widen the value to 32-bit binary on the PLC side first, then tag the panel to the wider value.
Example: entering 45,210 into a BCD register capped at 9,999
The inputs: the entry must take a five-digit batch count, with 45,210 as the worked value; the PLC keeps its default data format, BCD; the current entry tag is 16-bit BCD on one register, shown here at V1400 with its neighbor V1401 as example addresses, so substitute the ones your project assigns; the field is set to four digits.
The rule in words: BCD stores one decimal digit per 4 bits, so capacity in digits equals bits divided by 4, and the largest value is 10^digits - 1.
The arithmetic:
- 16 / 4 = 4 digits, so the cap is 10^4 - 1 = 9,999. The entry 45,210 is a five-digit value above 9,999, so the one-register tag cannot hold it.
- 32 / 4 = 8 digits, so a 32-bit BCD tag reaches 10^8 - 1 = 99,999,999. The pair V1400 and V1401 holds 45,210 with room to spare.
- Binary cross-check: Unsigned 16 spans 0 to 65,535, so 45,210 fits; Signed 16 tops out at 32,767, so 45,210 sits above it.
The result: change the tag to 32-bit BCD at V1400, confirm V1401 is unused, set the field to five digits and download. Entering 45210 stores 5210 in V1400 and 4 in V1401, and the panel displays 45,210.
The decision: above 9,999 in a BCD-format register, fit the 32-bit BCD tag across the register and its consecutive neighbor; it carries any entry up to 99,999,999. In a binary-format register above 32,767, use Unsigned 16 and stay at or below 65,535.
Checks before you change the tag
- Read the format from the PLC side. Open the rungs that consume the register: legacy default instructions mean BCD, plain binary or decimal operations mean binary. If the rungs also do math on the value in BCD, the pitfalls in a PLC BCD conversion that loses digits in division apply to them too.
- Fix the largest value first, because it picks the type. At 9,999 or below, change nothing. From 10,000 to 32,767, Signed 16, Unsigned 16 or 32-bit BCD all hold it. From 32,768 to 65,535, use Unsigned 16 or 32-bit BCD. From 65,536 to 99,999,999, use 32-bit BCD on BCD storage, or widen the PLC value to 32-bit binary first.
- Reserve the second register. For a 32-bit tag, the next consecutive register must be free of other tags and PLC functions before you assign it.
- Check register alignment. Some PLC families place 32-bit values only on even-numbered registers or other fixed boundaries; confirm your addressing rules before claiming the pair.
- Record the starting point. Back up the panel project and note the current tag type, address and field digit count, so the project can go back if a test fails.
Make the change and verify it
Do not bring a changed entry live on a running process: test with the machine in a safe state, where a wrong entry cannot drive motion or set an out-of-range setpoint.
- Back up the panel project and note the current tag type, address and digit setting.
- Change the tag's data type: 32-bit BCD for BCD storage, Unsigned 16 or Signed 16 for binary. Change it on the tag itself so every object sharing the tag follows, the move in changing an HMI tag data type without rebuilding every object.
- Assign the address. For 32-bit BCD, claim the register and the next consecutive one and clear any other use of the second.
- Set the field to the digits the value needs, five in this case, and to a signed display if you chose Signed 16.
- Download the project to the panel.
- Enter a known value, 45210 in the worked case, and read the PLC: in BCD the pair reads 5210 in the first register and 4 in the second; in binary the single register reads 45,210. Panel and PLC agree after a screen refresh.
- Enter the largest value operators will use, then hand the entry back to the line.
Recommendation: If the PLC keeps the register in BCD, change the entry tag to the 32-bit BCD type on the register and its next consecutive neighbor, set the field to the digits you need and test a known value at both ends; it accepts up to eight digits with no PLC code. Use Unsigned 16 when the PLC stores plain binary and every value stays at or below 65,535, and Signed 16 when values can go negative within -32,768 to 32,767.
More fixes for screens and panels on the plant floor sit under shop-floor screens and andon-style boards.
Questions
Why does the value go wild after switching the tag to Unsigned 16 while the PLC still expects BCD?
The same 16 bits mean different numbers in the two formats. As binary, 45,210 is hex B09A; a BCD reader splits those bits into four-bit groups and meets B and A, which are not decimal digits, so it has no valid value to display. The reverse mismatch turns BCD 12,345 into a much larger binary number. Match the tag type to the format the PLC logic actually uses.
Can I keep one register and combine two entries in the PLC?
You can. Enter the thousands into one register and the remaining digits into another, then multiply and add in the PLC to rebuild the value. It works, but it costs conversion rungs and two operator fields on every entry, and each extra step is one more place for a format error. The 32-bit BCD tag reaches the same result with one field and no PLC code.
How do I tell whether the PLC register is BCD or binary?
Read the rungs that consume the register. Many legacy PLC families keep BCD as their default data format, so a register written and read with those default instructions is BCD. If the logic applies plain binary or decimal operations to the same address, treat it as binary and tag it Unsigned 16 or Signed 16. Judge it from the PLC logic, not from the number currently on screen.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.