HMI setpoint validation: keep low below high before the PLC

8 min read · Published November 9, 2026

A numeric entry object's min and max are constants, so they catch out-of-span entries but cannot check one setpoint against the other. Set the absolute range on each object, stage both entries in PLC registers, and compare Low_Entry < High_Entry - Min_Gap on an Apply bit before the values reach the control loop.

A numeric entry object's min and max catch values that are out of span. They miss the rule this page is about: the low setpoint has to stay below the high setpoint, and both entries can sit inside their own ranges while breaking it. The range fields hold constants fixed when the screen was built, and a constant has no access to a live value the operator edits on the same screen. The fix has two halves. Set the absolute range on each entry object for the physical limits, then stage both entries in PLC registers and validate the pair on an Apply bit before anything reaches the control loop. The panel refuses what is out of span; the PLC refuses a pair that contradicts itself.

Symptoms and what each points to

Each symptom points at one layer:

  • The panel accepts a low setpoint above the high setpoint. Both entries sat inside their own ranges, so the range check passed. The pair rule lives nowhere yet; build it in the PLC.
  • An entry snaps back to the old number right after typing. The object's range refused the value. Re-read the min and max fields on that object; the panel is doing its job.
  • The loop follows a number the screen never showed. Something else wrote the active registers: PLC logic, a second panel or a communications master. Object ranges guard entries typed at that panel only.
  • The loop reads a wrong value after a valid entry. Scaling or data type mismatch between the object and the register, seen as a value ten times off or a sign flip. The faults list at the end covers both.

Set the absolute range on each numeric entry object

Open the entry object's properties. The min and max fields sit with the tag assignment. Enter the physical limits: the sensor span at the bottom, the equipment limit at the top. On a loop with a 0 to 100 °C sensor and equipment safe to 100 °C, that is 0.0 and 100.0 °C. From then on, the panel refuses any entry outside those numbers and writes nothing to the register.

The fields take minutes to set, so do this first; it removes out-of-span entries permanently. A walkthrough of configuring command input min and max value validation shows the fields and the refusal behavior.

Then reproduce the fault you are chasing: type a low setpoint above the high setpoint with both values in range. The panel accepts the pair. That is a range check doing exactly its job, and it is the signal to move the pair rule into the PLC.

Two panel-side workarounds exist, and neither survives as the permanent guard:

  • A fixed split point. Cap the low object where the high object starts, say low 0.0 to 60.0 °C and high 60.0 to 100.0 °C. This does keep low below high, and it deletes every combination on the wrong side of 60.0 °C. Use it only while the process genuinely never runs below the split.
  • Tag-based limits. Some programming packages accept a tag or variable in the min and max fields; the help for your version says which yours does. If yours does, point the low object's maximum at the high setpoint tag so the limit follows the live value. It still guards only entries typed at that one panel.

Move the pair check into the PLC

Stage the operator's entries in registers the control loop never reads, and let the PLC decide when they become active. Ladder and structured text are two of the IEC 61131-3 PLC programming languages, and this logic is one rung or a few lines in either. Seven example tags carry it; the names are examples, so use your own and match the types to your registers:

Example name Type Role
Low_Entry signed 16-bit integer Staging register for the low setpoint, fed from the entry object
High_Entry signed 16-bit integer Staging register for the high setpoint, fed from the entry object
Low_Active signed 16-bit integer Low setpoint the control loop reads
High_Active signed 16-bit integer High setpoint the control loop reads
Min_Gap signed 16-bit integer, constant Smallest allowed gap, same scaled units as the setpoints
Apply_PB boolean, momentary Set by an Apply push button on the screen
SP_Reject boolean Set by the PLC when a pair fails the compare

Point the two entry objects at the staging registers and keep their absolute ranges. Power-up values come from your retentive settings; the compare runs on whatever pair is stored. Letting the operator change a PLC value from a screen follows the same staging pattern as letting the HMI change a timer preset instead of a constant, and the Apply bit works like the handshake a numeric entry can raise when an entry lands, covered in numeric entry notification and handshake bits explained.

On the rising edge of Apply_PB, run one compare:

IF Low_Entry < High_Entry - Min_Gap THEN
  Low_Active  := Low_Entry;
  High_Active := High_Entry;
  SP_Reject   := FALSE;
ELSE
  SP_Reject   := TRUE;
  Low_Entry   := Low_Active;   (* fields refresh to the last good pair *)
  High_Entry  := High_Active;
END_IF;

A momentary button holds the bit for a few scans, and every line in both branches repeats safely, so no one-shot instruction is required. The failure branch copies the active pair back over the staging registers, so the entry fields display the last good numbers on the next read.

Validate on Apply, not per entry. Moving a whole band up forces the low entry through values above the current high, so a check on each entry refuses a change the operator has to make anyway. The pair check accepts any final combination that is valid. If you prefer to pull a bad entry back to the nearest legal value, clamping HMI numeric entry limits in PLC ladder logic shows that version.

Pick Min_Gap from the control action. Two-position control switches the output each time the process crosses a band edge, so a gap smaller than the measurement noise lets the output toggle on noise around the switching point. For on/off control, set Min_Gap at or above the swing the process shows between one switch-off and the next switch-on. For a modulating loop, leave Min_Gap at 0 and let the compare enforce only low below high.

Example: validating a 70.0 °C / 85.0 °C oven band

A drying oven holds a band: heating off above the high setpoint, on below the low one. The registers hold tenths of a degree as signed integers and the panel shows one decimal place, so 70.0 °C is 700, 85.0 °C is 850, and Min_Gap is 20, which is 2.0 °C.

Three Apply presses cover every path:

  1. Valid pair. The operator stages 700 and 850. The compare reads 700 < 850 - 20 = 830. True: the active pair becomes 700 and 850, SP_Reject stays FALSE, and the loop follows the new numbers.
  2. Whole band moves up. The operator stages high 900, which is 90.0 °C, and low 870, which is 87.0 °C. A per-entry check would fire on the low value first: 870 is above the current active high of 850, so the change dies there. The pair check waits for Apply: 870 < 900 - 20 = 880. True: both values copy over and the band moves in one press.
  3. Rejected pair. The operator stages low 845, which is 84.5 °C, with the high unchanged at 850. The compare reads 845 < 850 - 20 = 830. False: SP_Reject goes TRUE, the PLC copies 700 and 850 back over the staging registers, and the fields show 70.0 and 85.0 again. The loop never saw 84.5 °C.

Show the operator why the entry was refused

A silent refusal looks like a touch fault, so animate a text or indicator object from SP_Reject with a message in plain words: 'Low setpoint must be below high setpoint.' One tag drives it; if your visibility logic wants more than one condition, driving object visibility from one PLC tag collapses them into a single bit. Clear SP_Reject on the next successful Apply or on an acknowledge button, and decide the power-up state once: cleared at startup is the simpler choice.

Then check the refresh path: after a rejected Apply, the fields should return to the last good pair on their own. If they hold the typed value, the objects are keeping local edit state and the copy-back never reaches the display.

Run the reject-path tests before release

Watch the registers in the PLC for every row, not the screen: the screen can display a typed value that never took effect.

Test entry Expected result
Value outside 0.0 to 100.0 °C on either object Panel refuses it; the staging register never changes
Low above high, both in range, then Apply SP_Reject = 1; fields revert; active pair unchanged
High below low, both in range, then Apply Same rejection
Low equal to high, then Apply Refused while Min_Gap is above 0
Valid pair, then Apply Active pair updates; SP_Reject clears; loop follows
Edit a field and never press Apply Active pair unchanged
Power cycle the panel and the PLC Active pair restores per your retentive settings, still a valid pair

The last row is the one teams skip. An invalid pair that survives a power cycle defeats every check above it, so store the active pair retentively and copy the active pair into the staging registers at startup.

Faults that defeat the check

  • Scaled units. The panel shows one decimal place and the register holds tenths, so every range field and Min_Gap is in tenths too: a 5.0 °C gap is 50, and a 100.0 °C maximum is 1000. A maximum of 100 typed into a tenths register guards 10.0 °C.
  • Data type. Match the object's type to the register. A low limit of -10.0 °C is -100 in tenths; read as unsigned 16-bit it arrives as 65,436, which trips the object maximum or drives the loop to a nonsense value.
  • A second writer. PLC logic, a second panel or a comms master writing the active pair bypasses both layers. If another device must write, put the same compare in front of that write too, or remove its write access.
  • Range on one object only. Set min and max on both the low and the high object. An unguarded register accepts the full span of its type, -3,276.8 to 3,276.7 °C on a signed 16-bit tag in tenths.
  • Fields stuck at 0. If a staging field shows 0 after entry instead of the typed value, work through why a numeric entry resets to 0 after entry before touching the compare logic.

The decision

Recommendation: set the absolute min and max on every numeric entry object for the physical limits, stage both setpoints in PLC registers, and run the compare Low_Entry < High_Entry - Min_Gap on an Apply bit before anything copies to the pair the loop reads. Use a fixed split point only as a stopgap during commissioning, and use tag-based limit fields as a convenience on top of the PLC compare where your software offers them. Set Min_Gap to 0 for a modulating loop and to the swing between switch points for on/off control; the worked example uses 2.0 °C.

Questions

Do I still need the object range if the PLC validates the pair?

Yes, and they check different things. The numeric entry min and max are absolute limits: the sensor span and the equipment maximum, such as 0.0 to 100.0 °C on a loop with a 0 to 100 °C sensor. The PLC compare is relational: it checks one setpoint against the other. The range also guards entries while a screen is being commissioned before the PLC logic is loaded, and it rejects an out-of-span value before the staging register changes.

How large should the minimum gap between the setpoints be?

For a modulating loop, 0 works: the compare then only enforces that the low setpoint stays below the high one. For on/off control, the gap must be at least the swing the process shows between one switch-off and the next switch-on, or sensor noise toggles the output around the switching point. The example uses 2.0 °C, held as 20 in registers scaled to tenths of a degree. Widen it if the output switches more often than the contactor rating tolerates.

What if my HMI software lets the limit fields reference a tag?

Then point the low object's maximum at the high setpoint tag and the high object's minimum at the low setpoint tag; the fields follow live values and the panel rejects a contradictory entry at the keypad. Keep the PLC compare in place anyway, because tag-based limits still guard only the entries typed at that one panel, and any other writer of the active registers reaches the loop without passing them.

Why does the PLC write the active setpoints back into the entry fields after a rejection?

So the numeric entry objects refresh to the last good numbers instead of showing the typed value that failed. The PLC copied the active pair over the staging registers on the failure branch, and the screen displays whatever the registers hold on the next read, so 70.0 and 85.0 return in place of the rejected entry. Clear SP_Reject with the next successful Apply or an acknowledge button.

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