An HMI numeric entry field holds one number, so a feet-and-inches setpoint needs two fields: one for feet, one for inches limited to 0 to 11. Combine them in the PLC as total inches = feet x 12 + inches before any range check, so 12 ft 3 in becomes 147 in and a 6 to 24 ft machine accepts 72 to 288 in.
An HMI numeric entry field holds a single number in a single display format, so a value like 12 ft 3 in does not fit in one field. The setup that works is two numeric entry objects per setpoint: one field for feet and one for inches, with the inches field limited to 0 to 11. The PLC combines the pair as total inches = feet × 12 + inches before any range check, so 12 ft 3 in becomes 147 in. On the machine in this design, a product measured from 6 ft to 24 ft with ten operator-set positions, the combined value must land between 72 in and 288 in. The whole job is two entry objects per position, one multiply, one add, and one limit check that runs ahead of the motion command.
Why a single field cannot hold a feet-and-inches value
A numeric entry object on a panel does one thing: it writes the number an operator types into a tag, and shows that number in a format chosen in the object's settings, whole numbers or whole numbers with decimal places. The panel software has no format that carries two units at once, and no object that reads as feet and inches in one field.
The tempting shortcut is decimal feet, and it breaks in a specific way. 12.4 ft is 12 ft plus 0.4 × 12 in, which is 12 ft 4.8 in. The operator who means 12 ft 4 in types 12.4, feels correct, and the machine lands 0.8 in long. The operator who means the 147 in target from the introduction has to type 12.25, a number nobody speaks. Every entry carries one mental conversion, and that mental conversion is where the errors come from.
So the design decision is made before any configuration: the position travels as two numbers, feet and inches, and becomes one number in the PLC.
What you need
- Two integer tags per position: a feet tag and an inches tag. Ten positions means 20 tags.
- Two labeled numeric entry objects per position on the screen.
- One integer tag per position for the combined total in inches, computed in the PLC.
- Limit logic in the PLC that accepts the combined window and rejects everything outside it.
- Two numeric display objects per position if the actual position is also shown back in feet and inches.
Wiring the two fields
-
Create the tag pair for each position. Ten positions on this machine means ten feet tags and ten inches tags, all integers. Label the pair so it reads as one unit, for example Position 3 Feet and Position 3 Inches, so a conversion applied to the wrong pair is obvious on sight.
-
Place the two numeric entry objects side by side. Bind one to the feet tag and one to the inches tag, and label each with its unit. Both fields use the whole-number format with no decimal places. Set the entry limits in each object's properties: feet 0 to 24 and inches 0 to 11 on this machine. Those per-field limits keep obvious typos off the screen. The gate that matters is the PLC check in step 4; when a value needs a bound the panel object cannot apply, clamping HMI numeric entry limits in PLC ladder logic shows the rung pattern.
-
Combine the pair in the PLC before any range check. total_inches = feet × 12 + inches, computed every scan or on entry. Doing the add ahead of the limit logic means a pair such as 5 ft 11 in is judged as 71 in, its real length, never as a feet value and an inches value judged separately.
-
Check the combined value against the machine limits. Accept 72 to 288 in, which is the 6 ft to 24 ft travel window, and reject anything outside. On a failure, keep the last valid setpoint and tell the operator which limit tripped. This check lives in the PLC, ahead of the motion command. A limit typed into a panel object only keeps bad numbers off the screen; the PLC is the code that actually commands the machine, so the range check has to sit there.
-
Optional: add increment and decrement buttons. Buttons that add or subtract 1 ft or 1 in beside each field give operators a jog-style way to trim a position. They write to the same tags and pass through the same combined check, so they cannot walk a value outside the 6 ft to 24 ft window.
Whole inches are the assumption in the steps above. When a position needs a fraction, add a third numeric entry for it and fold the fraction into the total the same way; entering 32nds of an inch on an HMI numeric entry keypad works through the fraction field.
Example: entering the target setpoint on a 6 to 24 ft machine
Inputs. The operator's target is the feet-and-inches pair stated in the introduction. The travel limits come from the product spec: 6 ft minimum and 24 ft maximum, which is 72 in and 288 in. The field limits are feet 0 to 24 and inches 0 to 11. The conversion constant is 12 in per foot.
Rule. Total inches = feet × 12 + inches.
Arithmetic. Feet first: 12 × 12 = 144 in. Then add the inches: 144 + 3 = 147 in.
Result. The combined setpoint is 147 in.
Decision. 147 in sits inside the 72 to 288 in window, so the PLC accepts it and writes it to the position setpoint. The combined check is what makes the window honest: 5 ft 11 in passes both field limits and totals 5 × 12 + 11 = 71 in, one inch under the 72 in floor, so it is rejected. A feet-only check would have passed that pair, because 5 ft looks legal until the inches are added.
How to check it worked
Run these with the machine in setup and the drive disabled or at low speed:
- Enter the example pair and read the combined tag: it must show 147.
- Type 12 into the inches field. The panel rejects it at the field limit; with the limit left unset, the PLC clamp rejects the pair instead.
- Enter the corner pairs: 6 ft 0 in totals 72 in and must be accepted, 5 ft 11 in must be rejected as the example shows, 24 ft 0 in totals 288 in and must be accepted, and 24 ft 1 in totals 289 in and must be rejected.
- Enter a rejected pair and confirm the active setpoint tag did not change and the machine did not move. A reject that lets the edit through anyway is the fault worth hunting for.
If the combined tag reads 156 after entering the example pair, the multiply is fed by the inches tag instead of the feet tag; check which tag feeds that input.
One field with a text keypad, and its cost
Some panel software can put the whole entry in one field using a text object and a custom on-screen keypad: digit keys, cancel, delete, enter, plus a feet key and an inches key, producing a string that reads 12'11". The PLC then has to parse that string into a feet value and an inches value before the multiply, and handle every malformed entry an operator can produce. That is real added logic in exchange for a slightly more natural screen. Take that path only when the interface specification demands a single field; the two-object layout reaches the same total with object properties and one add. Linking a user-defined keypad to an HMI numeric entry object covers the keypad mechanics for the numeric-entry version of this.
Showing the position back in feet and inches
The same math runs backwards for the display. Divide the total by 12 with integer division: the quotient is the feet and the remainder is the inches. 147 in divides by 12 to give 12 with remainder 3, so the panel shows the setpoint as feet and inches again. Compute both values in the PLC and show them with two numeric display objects, so the displayed pair is the same pair the motion logic is using. For the ladder-level version of that divide and remainder, the walkthrough on converting total inches back to feet and inches in a PLC shows it step by step.
Recommendation
Recommendation: use two numeric entry fields, feet and inches, with the inches field limited to 0 to 11 and the total computed as feet × 12 + inches in the PLC ahead of the range check, whenever operators set positions in feet and inches. Reserve the single decimal-feet field for crews that already work in decimal feet and can tolerate 0.01 ft steps, which is 0.12 in of resolution.
Questions
Can one decimal-feet field replace the two fields?
Yes, when the operators already think in decimal feet. Two decimal places give 0.01 ft steps, which is 0.12 in, and the PLC multiplies the entry by 12. The catch is reading: 12.4 ft is 12 ft 4.8 in, and an operator who means 12 ft 4 in will accept it without noticing. On a floor where setpoints are called out as feet and inches, the two-field layout matches how the number is spoken.
Does the same pattern work for other mixed units?
Yes, wherever a larger unit plus a bounded remainder reads naturally. Pounds and ounces: multiply pounds by 16 and limit the ounces field to 0 to 15. Hours and minutes: multiply by 60 and limit minutes to 0 to 59. Metres and millimetres on one screen: multiply by 1000 and limit millimetres to 0 to 999. Keep the per-field limit on the panel and the multiply-and-add in the PLC, the same split as feet and inches.
What tag type do the feet, inches and total fields need?
Use plain signed integers. Even a 16-bit signed integer holds 32,767, so the largest combined value on this machine, 288 in, fits with room to spare. Tag size only starts to matter when the value is scaled into encoder counts downstream, where the count range of the positioning system, not the inches, sets the limit.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.