Enter decimal timer seconds on an HMI keypad

5 min read · Published November 12, 2026

Set the scale on the numeric entry object and keep the keypad the panel already has: with the scale set to the timer's time base, typing 1.50 s writes 150 to an integer timer preset and the screen shows 1.50. Pick a keypad with a decimal point only when the timer tag already stores a real number in seconds. Run 1, 1.50 and 0.25 s past screen and register before the screen returns to service.

You do not need to build a custom keypad to type 1.50 seconds into a timer preset. Put the conversion where it belongs, in the numeric entry object's scale, and the digits typed at the panel arrive at the PLC already converted. On a 10 ms timer with the scale set to match the time base, typing 1.50 writes 150 to the preset register and the screen shows 1.50. The other route is a keypad that carries a decimal point key, and it only fits when the tag behind the object already stores a real number. The data type of that tag decides the method. This article compares the two routes and gives a test of 1, 1.50 and 0.25 s to run before the screen goes back in service.

What decides it: the tag behind the entry object

A numeric entry object writes one value to one tag in the PLC. Two settings sit between the keys pressed and that write. The keypad decides which characters the operator can enter. The scale converts the entered value before it is written; the object's help lists it among the object's options as a way to convert or scale the number, and on one common panel those fields sit on an Options tab in the object's properties.

The tag decides the method. If the timer preset is an integer register holding ticks of the timer's time base, scaling is the answer: the object turns the 1.50 the operator types into the count the register needs, and the keypad question disappears. If the tag is a real, floating point number in seconds and the timer logic uses that value directly, no conversion is wanted and the job reduces to giving the operator a decimal point to press.

A third setting, the object's number format, controls only what appears on screen. It sets how many decimal places are shown, which is why 1 can read as 1.00. Set the correct data format for a PLC timer preset covers that side in detail.

Scaling against a decimal keypad

The two routes, side by side:

Aspect Scale on the entry object Keypad with a decimal point
What you change Scale fields in the object's options, on the Options tab of one common panel Keypad selection in the object's properties, chosen so the pad carries a decimal point key
Tag it fits Integer preset holding time-base ticks Tag already a real number in seconds
Typing 1.50 s writes 150 counts, the scale set to the time base 1.50, unchanged
Entering 1 reads 1.00 when the format shows 2 decimals 1 unless the format adds decimals
Changes in the ladder None when the scale equals the time base None
Wins when The timer instruction needs integer counts The logic already works in seconds

Where each method wins

Scaling wins:

  • The preset tag is an integer. Set the scale equal to the time base: 0.01 s per count on a 10 ms timer, 0.001 s per count on a 1 ms timer.
  • Operators keep typing plain seconds at the panel while the ladder keeps its counts, with no multiply instruction added anywhere.
  • The same scale on the numeric display object that shows the preset puts 1.50 on screen wherever the register holds 150.

A decimal keypad wins:

  • The tag already stores seconds as a real number and the timer or a downstream compare uses that value directly.
  • The value in the register should read the same as what was typed, with no conversion for maintenance staff to undo.

One more point on keypads: a user-built keypad still has its place for layout or access reasons, and linking a user-defined keypad to an HMI numeric entry object has its own walkthrough. For decimal timer entry it adds nothing. A stock pad already carries the decimal point; on one common panel that pad is named System Default 4. If the number of decimals should follow the product running, some panels let the object take its decimal position from a PLC tag, and moving the HMI decimal point to a PLC tag covers that setup.

Example: 1, 1.50 and 0.25 s against a 10 ms preset

A packaging line has a dwell timer whose preset is a 16-bit unsigned integer counting 10 ms ticks. Operators are to enter seconds with two decimals. Set the entry object's scale to 0.01 s per count and its format to 2 decimal places, and test with the line idle and the cycle inhibit on, so a changed dwell cannot start an unexpected cycle.

  1. Enter 1. The object computes 1 ÷ 0.01 = 100 and writes 100 to the preset. Check: 100 × 0.01 s = 1.00 s, and the screen reads 1.00.
  2. Enter 1.50. That is 1.50 ÷ 0.01 = 150 counts, and 150 × 0.01 s = 1.50 s. The register reads 150 and the screen 1.50.
  3. Enter .25. The object writes 25 counts, which is 0.25 s, and the format shows 0.25 with the leading zero.

Check the timer side once: run the timer on the 1.50 entry and watch the accumulated value fall from 150 to 0. A stopwatch should read close to 1.5 s. Register 150, duration 1.5 s, screen 1.50: both sides agree and the screen can go back in service.

Ceiling: a 16-bit unsigned register holds 0 to 65535, so at that scale the largest entry is 65535 × 0.01 s = 655.35 s, about 10.9 min. A 20 min dwell, 1200 s, needs 120000 counts and does not fit. Set the entry limits in the object so no one can type a value the tag cannot hold, and choose the scale for the longest time the station runs. At 0.1 s per count the same dwell is 1200 ÷ 0.1 = 12000 counts, the range stretches to 6553.5 s, about 109 min, and the panel gives up one decimal. If operators prefer working in minutes at the panel, entering minutes and seconds into an HMI timer preset covers that conversion.

The decision

Recommendation: keep the keypad the panel already has and set the entry object's scale equal to the timer's time base, so the counts in the preset match the seconds typed, whenever the preset tag is an integer. Pick a keypad with a decimal point only for a tag that already stores seconds as a real number, and leave the scale off so what is typed is what is stored. In both cases, run 1, 1.50 and 0.25 s past the screen and the register before the screen returns to service.

So: integer preset, scale it. Real tag, decimal keypad. Times beyond 655.35 s on a 16-bit tag, use a coarser scale or a wider tag.

Questions

My timer counts milliseconds. What changes?

Set the scale to 0.001 s per count, so 1.50 s becomes 1500 counts and 0.25 s becomes 250. The 16-bit ceiling moves down with the finer base: 65535 counts is 65.535 s, so entries above about 65 s no longer fit. Either set the entry limit below that value or use a 32-bit or real tag for longer times.

Can I skip the scale and just hand operators a decimal keypad on an integer preset?

No. An integer register has nowhere to keep 0.50. What happens to the fraction depends on the software: it is dropped or the entry is refused. The scale in the object's options is what turns 1.50 s into the 150 counts an integer preset needs, while the keypad only decides which characters can be typed.

Does setting a scale change how accurately the timer runs?

No. The timer instruction still counts its own time base ticks, and the scale only converts between the seconds typed at the panel and the integer held in the preset register. With the scale equal to the time base, a preset of 150 still times out at 1.50 s on a 10 ms timer.

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