Change a PLC comparison setpoint from an HMI panel

7 min read · Published November 12, 2026

Put the comparison threshold in a floating-point data register instead of a constant, seed it on first scan, and write it from a numeric entry object on the HMI. Entering 55.2 on the panel then becomes the value the greater-than instruction compares against, and the output follows the new threshold immediately.

You have the thermostat value showing on the panel and a greater-than instruction in the PLC switching an output past a fixed number, and the number you want operators to change is buried inside that instruction. The fix takes one rung edit and one screen object: move the threshold out of the instruction and into a floating-point data register, seed the register with the old constant on first scan, then write it from a numeric entry object whose tag points at that same register. From then on, a new threshold typed on the panel is the value the comparison reads on the next scan, with no program edit and no download. This article walks through the register change, the panel object, a worked example with the arithmetic, and the checks that prove the write landed before the screen goes to operators.

Can you change a PLC comparison setpoint from an HMI?

Yes: replace the hard-coded number inside the greater-than instruction with an unused floating-point data register, then write that register from a numeric entry object on the panel, and every entry, such as 55.2 °F, becomes the value the comparison actually uses.

The comparison instruction holds two operands: the live process value and the threshold. The live value belongs to the analog channel and changes on its own. The threshold is the setting you want operators to own, and as a hard-coded constant it belongs to whoever last edited the program. Held in a data register, it belongs to the panel: the HMI writes a new value when the operator confirms the entry, and the logic keeps running. The same swap turns other PLC constants into panel settings; pointing an HMI numeric object at a PLC timer preset address is the identical idea applied to a timer.

Why does changing the number on the screen do nothing?

A numeric display object only reads: it reports the live process value and never writes the threshold, so adjusting the thermostat or re-scaling the analog input moves the measurement while the greater-than comparison keeps comparing against its fixed constant.

Two objects look alike on a panel and behave differently. A numeric display reads a tag and shows it; it can even change color from an alarm tag, and that is the full extent of what it does. A numeric entry object writes. Point the display at the analog value tag and the entry at the threshold register tag, and the two never collide, because they hold the two different operands of one comparison. The one wiring mistake that matters is binding the entry object to the analog input or the display-only tag: that edits the measurement being compared, and the number used as the limit stays where it was.

What do you need before you start?

You need the PLC program with the comparison rung, one unused floating-point data register, the HMI project already communicating with the PLC, and agreement on the engineering units, because the panel entry and the compared value must share one scale, one decimal place in this example.

  • The PLC program open at the comparison rung, with both operands of the greater-than instruction identified.
  • One free floating-point data register. This example uses DF5; search the whole project for the address before you commit, because a register with a second reader turns your setpoint into someone else's data.
  • The HMI project, already communicating with the PLC, showing the live value in a numeric display.
  • Agreed units: the panel writes the same engineering units the compare reads, one decimal place, 0.1 °F of resolution in this example.

How do you move the setpoint into a PLC data register?

Edit the comparison rung so the greater-than instruction reads its threshold from a data register instead of a constant, seed that register with the old constant on first scan, and transfer the program before anyone touches the panel.

  1. Note the constant in the threshold operand. The example rung compares the analog value with a fixed 50.0 °F.
  2. Pick the register. Search the program for DF5 and confirm no other instruction reads or writes it; if the address is in use, take the next free floating-point register.
  3. Replace the constant with DF5 in the greater-than instruction.
  4. Add a first-scan rung that moves 50.0 into DF5, so the logic behaves exactly as before until someone enters a new value.
  5. Save and transfer the program under your site's change procedure, and leave the output's interlocks untouched.

Swapping a literal for a value written from a supervisory screen is standard practice well beyond small PLCs; replacing a literal constant with a written value documents the same move in a larger control system.

How do you write that register from the panel?

Create one floating-point tag in the HMI pointed at the same register the comparison reads, drop a numeric entry object on the screen bound to that tag, and set its decimal places and limits to match the units, so an entry of 52.0 lands in the register as 52.0.

  1. Create one floating-point tag in the HMI, addressed to DF5, with read and write access.
  2. Insert a numeric entry object on the screen and bind it to that tag; in most HMI editors it sits in the object menu under an entry heading.
  3. Set the entry format to one decimal place, so the keypad steps in 0.1. The keypad layout follows the tag data type; why the tag data type picks the numeric entry keypad explains that selection.
  4. Set the entry limits to the safe span of the channel, 0.0 to 100.0 °F here; setting a temperature setpoint with HMI numeric entry limits covers the limit setup.
  5. Save and download the HMI project.

Can you walk through an example with real numbers?

Take a 4-20 mA thermostat into a 0 to 4095 count channel spanning 0 to 100 °F: 2392 counts reads 2392 × 100 ÷ 4095 = 58.4 °F, so after the operator enters 55.2 the comparison sees 58.4 > 55.2 and holds the output on.

The channel is scaled so that 0 to 4095 counts span 0 to 100 °F, a factor of 100 ÷ 4095 = 0.0244 °F per count. The first-scan move seeds DF5 with the old constant, 50.0. At 13:45 an operator types 55.2 on the panel and DF5 reads 55.2 from the next scan. The channel reports 2392 counts, and 2392 × 100 ÷ 4095 = 58.4 °F. The comparison evaluates 58.4 > 55.2 as true and the fan output stays on. At 14:00 the supervisor types 60.0; DF5 becomes 60.0, 58.4 > 60.0 evaluates false, and the fan drops out while the temperature has not moved a tenth of a degree. The entered number is now the comparison value, and that is the entire change in behavior.

How do you prove the write landed before you trust the output?

Watch the register in the PLC monitor while you type the entry on the panel: the register must step to the entered value, the comparison operand list must show that same register, and the output must follow the comparison only after both of those check out.

  • Open the PLC monitor on DF5, type 47.5 on the panel and watch DF5 step to 47.5.
  • Confirm the compare instruction's operand list shows DF5, not the old constant.
  • Run a both-sides test under an approved condition: with the live value at 58.4 °F, entering 57.0 keeps the output on, entering 59.0 drops it, and entering 56.0 brings it back.
  • Watch the interlocks through the same test; the output must still respect every permissive that guarded it before the edit.

If the output drives a heater, a motor starter or a pressure device, run that test with the load safe to switch, and keep the hard interlocks in the PLC program.

What if the panel entry never reaches the register?

When the register holds its old value after an entry, the fault sits in the write path: the tag address, the data format or the PLC communications, checked in that order, because a floating-point value written into an integer register arrives wrong long before it arrives not at all.

  1. Address. The tag must point at DF5, the same register the compare instruction reads.
  2. Data format. The tag must be floating point because DF5 is a floating-point register; an integer-format tag on a floating-point register delivers a scrambled value, and a tag that ignores PLC register writes is the usual carrier of this fault.
  3. Communications and PLC mode. If the panel reads values correctly and every write is refused, the PLC key switch is the first suspect; fixing HMI write errors when PLC reads still work starts there, and proving why an HMI reads but cannot write gives the full test sequence.

Recommendation: Give each operator-set threshold its own floating-point register, seed it with the previous constant on first scan, and write it from one numeric entry object with its limits set to the safe span of the channel; hand the panel to operators only after the register has moved on the PLC monitor and the output has been tested on both sides of the threshold.

Questions

Will an operator's entry survive a PLC power cycle?

Two things decide it. The register itself keeps or loses its value through power loss depending on the PLC model, so check the retentive behavior of that register family in the PLC manual. The first-scan seed move always wins at start-up: it writes the old constant over whatever the operator entered. Once the panel is in service, either remove the seed move or gate it behind a bit, because otherwise every restart erases the operator's setting.

Can I use an integer register instead of a floating-point one?

Yes, when the whole comparison works in whole numbers. Use an integer data register, give the HMI tag a matching integer data type, and enter 55 for 55.0 °F. The rule that never changes is that the tag data type, the register type and the compare operand must all describe the same format; a floating-point tag writing an integer register, or the reverse, is the most common way a correct-looking entry lands in the register garbled.

Should every PLC constant move onto the panel?

No. A panel entry suits settings an operator legitimately owns: a comfort threshold, a batch count, an alarm delay. Limits that protect people or equipment belong in the PLC as program constants or hard interlocks, where a change needs an edit, a review and a download. The panel changes the setpoint; the PLC still refuses to run the output outside its guarded envelope.

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