IMDTouchKnowledge BaseShop main store

Comparison

Why an HMI gain of 0.0166667 rounds your minutes-to-seconds input

HMI and touchscreens Published 6 min read

Short answer

Proportion Conversion, not a typed gain, is the right scaling for a Kinco DTools Pro numeric input that takes minutes while the PLC register holds seconds. Set the value range to 0 to 3600 seconds and the proportion range to 0 to 60 minutes and the factor is exact, so a full-scale entry writes the register maximum instead of falling one short. Check the register time base first: a signed 16-bit register caps the preset at 32767 units.

On this page
  1. Which conversion fits a minutes-to-seconds input
  2. Why the typed gain rounds your entry
  3. Set up Proportion Conversion on the numeric input
  4. The register ceiling sets the entry limit
  5. Confirm the conversion on the panel
  6. Pitfalls that recur with unit scaling
  7. The decision, case by case
  8. Questions asked

Do not fight the gain field. On a Kinco G2100E project in DTools Pro 1.10, the numeric input that takes minutes while the PLC register holds seconds belongs on Proportion Conversion: set the value range to 0 to 3600 seconds and the proportion range to 0 to 60 minutes, and the entry converts exactly. The gain route fails for arithmetic no decimal count repairs — 1/60 never terminates, so the typed constant is always rounded, and a full-scale entry computes to 3599.9928 seconds before the register store. This article compares the two conversions, works that arithmetic, gives the register ceiling for each timer time base, and closes with the checks that prove the preset at the panel.

Which conversion fits a minutes-to-seconds input #

DTools Pro 1.10 gives the numeric input two linear conversions under its digit-calculate settings: Scale Conversion with a Gain and an Offset, and Proportion Conversion with two min/max ranges. They look interchangeable and are not, because Scale Conversion asks you to type a constant and 1/60 cannot be typed.

Criterion Scale Conversion (Gain, Offset) Proportion Conversion (two ranges)
Stored constant 1/60 typed as 0.0166667, a rounded value None; the factor comes from the two maxima
Fixed-value entry The field rejects that many decimals, so a macro must hold the constant Whole numbers only: the seconds range and the minutes range
Full-scale entry 3599.9928 before the store, so a truncating store keeps 3599 Lands exactly on the range maximum
Longer presets Same rounded constant, same relative error Works while both maxima keep the 60:1 ratio
Way it fails Silently, one unit short on whole-second entries Loudly, at the entry limit, if the ranges are wrong

The decision is the right column. The gain route needs a macro to hold a number that is still rounded, and it puts an invisible constant between what the operator types and what your PLC receives. Proportion conversion maps linearly between the ranges you set, and the full-scale check is arithmetic you can do in your head: an entry of 60 minutes maps from 0–60 to 0–3600 as 60 × (3600 ÷ 60) = 3600 seconds, exact because both maxima are whole numbers. The same two ranges drive the display direction when the register is written from the PLC; the general display-side method is covered in How to Scale a PLC Integer Into an HMI Display Value.

Why the typed gain rounds your entry #

Scale Conversion divides the operator's entry by the Gain before the register is written; that is how the instruction maps minutes at the panel into seconds in the PLC. The divisor for that direction is 1/60, and 1/60 = 0.0166666... never stops, so whatever the field accepts, the stored constant is rounded. Work the full-scale entry with the seven-decimal constant:

  • Entered at the panel: 60 minutes
  • Constant stored: 0.0166667
  • Register write: 60 ÷ 0.0166667 = 3599.9928 seconds
  • Integer store, keeping the whole-number part: 3599

The stored constant sits just above 1/60, so every entry that should land on a whole second lands just under it, and an integer store drops it by one. A rounding store would rescue that entry — which is exactly the defect of the gain route: your preset accuracy hinges on a rounding step inside the write that you cannot configure from the object. Proportion conversion has no constant to round, so the store cannot miss.

Set up Proportion Conversion on the numeric input #

  1. Open the numeric input object and enable its digit-calculate option (Use Digit Calculate).
  2. Select Proportion Conversion in place of Scale Conversion.
  3. In Min/Max of the value, enter the valid range of the target register in seconds; 0 to 3600 covers a one-hour preset.
  4. In Min/Max of the proportion, enter the display and entry range in minutes; 0 to 60 matches the same hour, and the panel checks the typed entry against this range.
  5. Tighten both maxima to what the process actually needs, keeping the 60:1 ratio, and respect the register ceiling in the next section.
  6. Delete the old Gain and Offset, and delete any macro that wrote the constant — leaving both conversions active scales the entry twice.
  7. Download the project and run the confirmation checks below.

The register ceiling sets the entry limit #

The scaling never limits the preset; the register does. A signed 16-bit integer stores -32768 to +32767, so the ceiling is 32767 register units, and the units are whatever your timer counts: seconds, 100 ms ticks or milliseconds. Multiply the ceiling by the tick time before you fix the upper limits:

Timer time base The ceiling equals Longest preset Upper entry limit in minutes
Seconds 32767 s About 9.1 h 546 min
100 ms ticks 3276.7 s 54 min 36.7 s 54.6 min
Milliseconds 32.767 s 32.8 s 0.54 min

The 100 ms row is the one that bites. Plenty of timers tick in 100 ms or milliseconds, and a minutes object configured for a full hour overflows a tick register long before your ranges run out; the write then clamps or wraps depending on the driver. Read the time base off the timer instruction itself and set the upper limit under the matching row. On a millisecond register a minutes entry has nothing to feed, and the right move is a wider register type or a different panel unit.

Confirm the conversion on the panel #

Run these on the bench with the time function's output disabled — a wrong preset on a live machine can skip a hold time or stretch a cycle.

  • Enter the full-scale minutes value and read the register: it must equal the range maximum exactly, not one below it.
  • Enter 1 minute and read the register: a seconds register must hold 60.
  • Write the range maximum from the PLC and check the panel displays the exact minutes figure.
  • Type above the minutes limit and confirm the object rejects the entry instead of clamping it.
  • Enable decimal places on the object and enter 1.5: the register must hold 90, because fractions of a minute exist only at the panel while the register receives whole seconds.

If every check passes here but the preset still never moves, the scaling is not your fault — the article HMI numeric input does not change FX2N timer preset covers exactly that case.

Pitfalls that recur with unit scaling #

  • Stacked conversions: a Gain left in place under the proportion ranges scales the entry twice, and the register lands far off in a way that looks like a wrong factor.
  • Limits left in register units after conversion: the object now speaks minutes, so entry limits, trend ranges and any paperwork around the preset must speak minutes too.
  • Ceiling chosen after the ranges: fix the time base first — on a 100 ms tick register the preset ends at 54 min 36.7 s, and no range setting moves that.
  • Zero arriving from a valid-looking entry has causes of its own: Why an HMI Numeric Entry Writes Zero to a Counter Preset walks through that fault.

The decision, case by case #

  • Minutes at the panel, seconds in the register: Proportion Conversion with the hour ranges from the setup section — no Gain, no Offset, no macro.
  • Timer on 100 ms ticks: the same conversion with both maxima scaled down to the tick ceiling, and the entry limit just under 54.6 min.
  • Preset longer than the register ceiling: widen the register to a 32-bit or real type first, then scale; never stretch the ranges past what the store can hold.
  • Millisecond register: change the panel unit instead — a minutes entry does not belong there.

Questions asked

Can I keep Scale Conversion and write the exact gain from a macro?

A macro can store more decimals than the fixed-value field, but even a computed 1/60 is not exact in floating point, so the write only survives if the runtime rounds instead of truncating. You would keep a hidden constant plus a macro dependency for what two integer ranges do with no constant at all. Switch the object to Proportion Conversion and delete both.

Does the rounded gain also distort the value the panel displays?

Yes, both directions pass through the same constant. When the PLC writes the full-scale register value, multiplying it by 0.0166667 gives 59.99988 minutes, which the panel shows correctly only because display rounding hides the gap. The proportion ranges drive both directions identically, so entry and display stay consistent.

What is the entry ceiling if the timer counts 10 ms ticks?

Multiply the 16-bit ceiling by the tick time: 32767 ticks at 10 ms is 327.67 seconds, which is 5 minutes 27.7 seconds, so the minutes entry caps near 5.46. The same multiplication gives the limit for any time base; only the tick size changes.

Can Proportion Conversion cover a preset longer than one hour?

Yes, as long as the two maxima keep the 60:1 ratio and stay inside the register ceiling. For two hours, set the seconds range to 0-7200 and the minutes range to 0-120: the factor stays exactly 60 and a full-scale entry still lands on the register maximum. A signed 16-bit register in seconds reaches about 9.1 h, so two hours fits.

Keep reading

  • Troubleshooting

    Scaling encoder counts to inches on an HMI display

    A value like 9E-46 on a scaled encoder readout is a data-type symptom: the HMI tag reads integer counter memory as a 32-bit float. Set the tag to the integer type the counter writes, apply two-point scaling from 0 counts/0 inches to 2,540 counts/1 inch, set four decimal places on the object, and let one layer, HMI or PLC, own the conversion so the count is never scaled twice.

    HMI and touchscreens

  • How-to

    Scaling Analog Inputs for Both PID and HMI Display in Ladder

    Configure the 1769 analog channel for engineering units X1 across the transmitter span, set the CompactLogix PID scaling to the same range, and display that one tag on the PanelView Plus. Decimal-place settings change appearance only; add a single CPT rate-and-offset rung only when a consumer needs different units.

    HMI and touchscreens

  • Troubleshooting

    Why a Comfort Panel seems to scale fonts set in TIA Portal

    A Comfort Panel applies no scaling to the fonts a TIA Portal project sets, and it offers no scale setting to change. The size difference is authored in: Windows display scaling at 125% on the engineering PC enlarges the editor's text metrics, and a hypervisor display option can add a second factor. Set Windows Scale to 100%, sign out and back in, disable the VM scaling option, recompile completely and download.

    HMI and touchscreens

Why touch input jumps to a second HDMI monitor