Fix an HMI numeric entry writing wrong values to a BCD analog output

7 min read · Published November 9, 2026

The four-instruction chain fails because it is built for 32-bit real data: LDD loads two words, RTOB treats both as one floating-point number, and OUTD writes a second register. A signed int 16 tag is already 16-bit binary, so the rung needs only LD V675, BCD, OUT V600, an unsigned tag, and entries limited to 0 through 9999.

A numeric entry that feeds a BCD analog output fails when the ladder converts data that is already in the format both ends want. The panel tag holds a signed int 16, which is plain 16-bit binary. The output register expects binary-coded decimal. The chain LDD, RTOB, BCD, OUTD was built for 32-bit real data. LDD loads a second register, RTOB treats both words as one floating-point number, and OUTD writes a second register on the output side. The working rung is three 16-bit instructions: LD V675, BCD, OUT V600. Set the panel tag unsigned and limit the entry to 0 through 9999. Work through the checks below in order; each one clears a section of the path before you touch the ladder.

What each symptom points to

Sort the fault by what the registers show during an entry:

  • V675 never changes when the operator types. The problem is on the panel side: the tag address is wrong, the panel-to-PLC link is down, or the numeric entry object is bound to another tag. Ladder changes will not help until the register follows the entry.
  • V675 changes but not to the value typed. The tag data type is wrong. A 32-bit integer or float type writes V675 and V676 together, so the entry lands across two registers and neither one holds the typed number.
  • V675 is correct but the output stays dead, even when you write V600 by hand. The fault is module configuration or hardware: output range, data format setting, wiring, or module supply.
  • The output moves but at the wrong magnitude. The conversion path is at fault: 32-bit or real-number instructions applied to 16-bit binary data.
  • V600 shows hex digits A through F. The value reached the register without a BCD conversion, or another rung overwrote it.
  • Only negative entries come out wrong. BCD carries no sign, so a negative binary word has no valid BCD pattern.

A nonsense number on a panel display that reads a BCD register is this same format mismatch in the read direction; an article on nonsense numbers from a PLC BCD analog register covers that side.

Check 1: does V675 follow the entry?

Open the data watch window in your programming software, watch V675, and type a value on the panel's numeric entry object.

  • V675 does not change: fix the tag address, the communication link, or the object binding first. Nothing in the ladder matters yet.
  • V675 changes but shows the wrong number: set the tag to a 16-bit integer type. Confirm it is not a 32-bit or float type that spans V675 and V676. Then repeat the check.
  • V675 follows the entry: go to the output check.

Check 2: does the output channel respond on its own?

Bypass the panel and the rung. Display V600 as hex in the watch window, write a known BCD pattern such as 0x0500, which the module reads as decimal 500 counts, and watch the analog channel with a meter or at the receiving device. Before you force the register, make sure the process can tolerate the resulting signal; if the output drives a drive or an actuator, put the machine in a safe state first.

The mapping of V600 to a physical channel comes from the CPU and analog module manuals, because the output register depends on the slot and the module.

  • The channel does not respond: the fault is configuration or hardware. Confirm the module is recognized, the output range and the BCD data format are set as intended, and the module supply and wiring are sound. Rung changes will not help, so stop here.
  • The channel responds: the output path works and the conversion is at fault. Rewrite the rung.

Check 3: does the tag type match what BCD can carry?

A 16-bit BCD word packs four decimal digits, 0 through 9999. Four bits hold one digit, and two digits sit in each byte. That is the range one 16-bit register carries in BCD. A signed int 16 spans -32768 to +32767 in two's complement, and every negative value in that range has no BCD form.

Set the panel tag to unsigned int 16 and limit the numeric entry to the smaller of 9999 and the module's maximum usable count. The analog module manual gives that count together with its count-to-signal scaling.

Panel entry limits stop the operator's finger; clamping the value in PLC ladder logic is the backstop for writes that bypass the panel. Some panel tag lists also offer a 16-bit BCD data type, which lets the panel write the register directly with no conversion rung. Use that only after the forced-register check passes, so both ends are known to agree on the format.

Rewrite the rung with 16-bit instructions

  1. Delete LDD, RTOB, and OUTD.
  2. Build the replacement on a contact that is true in every scan, so the conversion runs every scan: LD V675, then BCD, then OUT V600. LD loads the entry, BCD converts binary to BCD, OUT writes the single output word.
  3. Confirm LD and OUT are the 16-bit forms. LDD pulls V676 in beside V675, and OUTD writes V601 beside V600, so the 32-bit forms touch registers the 16-bit output never reads and clobber whatever V601 holds. Use the 32-bit forms only when the module manual states a 32-bit output word.
  4. Search the program for every other write to V600. Two writers in the same scan leave the register holding whichever value ran last.
  5. Save, transfer to the PLC, and return it to run mode.

If a setpoint ever starts as a floating-point value on purpose, that is a different conversion with a different failure mode; a real to BCD conversion that writes nothing covers the case where that path stores nothing at all.

The permanent repair is three things written down next to the rung: V675 is binary, V600 is BCD, and the entry ceiling is the one set on the panel object.

Example scenario: entering 1234 on the panel for a 4 to 20 mA output at V600

Inputs: the entry register V675 and the analog output register V600, both 16-bit words, with V600 configured for BCD; the panel tag set unsigned with entry limits 0 through 9999, the four-digit capacity of a BCD word shown above; the module scaled so 0 counts gives 4 mA and 9999 counts gives 20 mA, the span printed in its manual.

The rule in words: the panel stores the typed number as a 16-bit binary integer. The BCD instruction maps each decimal digit into its own 4-bit nibble. The module reads the register's four nibbles as four decimal digits.

The arithmetic:

  1. 1234 as a binary word: 4 × 256 = 1024, 13 × 16 = 208, and 1024 + 208 + 2 = 1234, so V675 holds 0x04D2.
  2. BCD packing: the digits 1, 2, 3, 4 become the nibbles 0001, 0010, 0011, 0100, so V600 holds 0x1234.
  3. Module-side check: the four nibbles read as 1 × 1000 + 2 × 100 + 3 × 10 + 4 = 1234 counts. At 16 mA across 9999 counts, 1234 counts gives about 5.97 mA above the 4 mA floor, roughly 9.97 mA out.
  4. What the old chain delivered: LDD loaded V676 in beside V675, RTOB read those 32 bits as a floating-point number, so the conversion never started from 1234, and OUTD split its result across V600 and V601.

Result: V600 holds 0x1234, and the module outputs about 9.97 mA for an entry of 1234.

The decision: an entry anywhere from 0 to 9999 converts correctly. 10000 or any negative number has no four-digit BCD form, so the panel's 9999 limit is the working ceiling for this output.

Verify the entry end to end

  • Enter 100. V675 must read 0x0064 and V600 must read 0x0100: the BCD digits of the typed number are the hex digits of the register.
  • Enter 1234. V600 must read 0x1234.
  • Enter 0 and then the entry maximum. Both ends of the span must hold.
  • Step the entry up through the range and confirm the meter tracks it; the expected signal per count comes from the module manual.
  • Hex digits A through F appearing in V600 mean a value passed through without BCD or another rung wrote the register; rerun the search for writes to V600.

Recommendation: For a numeric entry feeding a 16-bit BCD analog output, delete the real-to-binary conversion, build the rung as LD V675, BCD, OUT V600 on a contact that is true in every scan, set the panel tag to unsigned int 16, and cap the entry at the smaller of 9999 and the module's maximum usable count. Keep LDD and OUTD for a module whose manual states a 32-bit output word, and treat RTOB anywhere in this path as a leftover from a float application.

Questions

What should V600 hold after an entry of 500?

V675 holds 0x01F4, because 500 is 1 × 256 + 15 × 16 + 4 in binary. After the BCD instruction, V600 holds 0x0500, and the module reads the four nibbles as the decimal digits 0, 5, 0 and 0. If V600 instead shows 0x01F4, the value skipped the BCD instruction; confirm the rung in the PLC is the new three-instruction one and that no other rung writes the register.

Why does a negative entry have no BCD form?

BCD encodes each decimal digit in four bits and carries no sign bit. The 16-bit two's-complement code for -1 is 0xFFFF, and its nibbles F, F, F and F are not decimal digits, so a BCD module cannot turn them into a current or voltage. That is why the panel tag must be unsigned and the entry floor is 0, not the -32768 a signed int 16 could otherwise hold.

What should you send when the channel stays dead after a forced write?

Collect the PLC model, its firmware revision, the analog output module part number, the register-to-channel mapping you verified in the module manual, the value you forced into V600, and the meter reading. Some module and CPU combinations need a minimum firmware revision before the card's features work, so the support desk checks that pair against the compatibility list before looking at your logic.

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