TON PLC Timer Utility

PLC Timer Value Converter

Use this PLC Timer Value Converter to convert timer preset values and PLC timer ticks into milliseconds, seconds, minutes and formatted duration. Reverse-calculate timer presets from a required delay, or encode and decode Siemens S5TIME values.

✓ Timer Preset ✓ Time Base ✓ IEC TIME ✓ S5TIME ✓ Millisecond Conversion
T#
Convert PLC Timer Values
● Ready
Number of timer increments stored or configured in the PLC.
Duration represented by one timer tick.
Milliseconds represented by one timer tick.
Important: Generic PLC timer bases are configurable and controller-dependent. The S5TIME mode follows the Siemens 16-bit S5TIME layout: a time-base nibble plus a three-digit BCD timer value.
PLC Timer Result Converted
Timer Duration
Preset / Ticks
Time Base
Milliseconds
Seconds
Minutes
IEC TIME Style
S5TIME
Resolution Error
Calculation Breakdown -

What Is a PLC Timer Value Converter?

A PLC Timer Value Converter translates the numerical preset used by a programmable logic controller timer into an actual duration. Many PLC timer implementations represent time as a number of increments rather than storing seconds directly.

For example, a timer with a 100 millisecond time base and preset value 250 represents 25 seconds. Changing the time base to 10 milliseconds would make the same numerical preset represent only 2.5 seconds.

This calculator can also perform the reverse operation by determining the preset required for a desired delay.

PLC Timer Preset Formula

Basic timer formula: Timer Duration = Preset × Time Base Example: Preset = 250 Time Base = 100 ms Therefore: 250 × 100 ms = 25,000 ms = 25 seconds

How to Convert PLC Timer Preset to Seconds

First convert the timer base to milliseconds and multiply it by the preset value.

For a preset of 120 with a 100 ms timer base: 120 × 100 = 12,000 ms Then: 12,000 / 1000 = 12 seconds

PLC Timer Time Base

A timer time base specifies how much real time is represented by one timer increment or tick.

Time Base One Tick Preset 100 Preset 1000
1 ms 0.001 s 0.1 s 1 s
10 ms 0.01 s 1 s 10 s
100 ms 0.1 s 10 s 100 s
1 second 1 s 100 s 1000 s

These are useful generic bases, but the actual timer representation depends on the controller family and instruction.

Convert Required Time to PLC Timer Preset

To calculate a timer preset, divide the required duration by the timer base.

Required time: 25 seconds = 25,000 ms Timer base: 100 ms Preset: 25,000 / 100 = 250

Why Timer Preset Rounding Matters

A timer can normally represent only multiples of its configured resolution. If the requested duration is not an exact multiple of the timer base, the PLC cannot represent that time exactly using an integer tick count.

Required: 1055 ms Timer base: 100 ms Exact ticks: 1055 / 100 = 10.55 ticks Possible integer presets include: 10 → 1000 ms 11 → 1100 ms

The calculator reports the actual resulting duration and resolution error when rounding is necessary.

What Is IEC TIME?

IEC 61131-3 programming environments commonly provide a TIME data type for representing durations. Modern PLC timer instructions such as TON, TOF and TP often use a TIME value rather than an old-style timer-base preset.

A human-readable duration may appear in forms similar to:

T#500ms T#5s T#1m30s T#2h5m

Exact syntax and supported ranges can vary between PLC programming systems, but the underlying idea is a duration rather than a traditional timer counter.

TON, TOF and TP Timers

TON

On-delay timer. Its output becomes active after the configured input condition has remained true for the preset duration.

TOF

Off-delay timer. Its output remains active for the configured delay after the input condition changes.

TP

Pulse timer. Generates an output pulse having the configured duration.

Preset Time

The configured target delay or pulse duration used by the timer instruction.

What Is Siemens S5TIME?

S5TIME is a 16-bit time representation used by classic Siemens timer instructions. Instead of storing an arbitrary millisecond count directly, the word contains a time-base code and a three-digit BCD value.

Conceptual structure: Bits 15–12 = Time Base Bits 11–0 = 3-Digit BCD Value

S5TIME Time Bases

Base Code Resolution BCD 001 BCD 999
0 10 ms 10 ms 9.99 s
1 100 ms 100 ms 99.9 s
2 1 second 1 s 999 s
3 10 seconds 10 s 9990 s

How to Decode S5TIME

Consider hexadecimal S5TIME:

0x2250 The first hexadecimal digit is: 2 so the time base is: 1 second The lower three hexadecimal digits are BCD: 250 Therefore: 250 × 1 second = 250 seconds = 4 minutes 10 seconds

S5TIME BCD Encoding

The lower three digits of an S5TIME word are Binary Coded Decimal rather than a normal 12-bit hexadecimal integer.

BCD: 250 is represented by hexadecimal nibbles: 2 | 5 | 0 Each nibble must contain decimal digit 0 through 9.

For this reason an S5TIME value containing a BCD digit A through F in the lower three nibbles is invalid.

S5TIME Maximum Duration

The largest standard S5TIME value uses time base 10 seconds and BCD value 999.

999 × 10 seconds = 9990 seconds which equals: 166 minutes 30 seconds = 2 hours 46 minutes 30 seconds

How S5TIME Encoding Is Selected

When converting a duration into S5TIME, the tool searches the available time bases and selects the smallest resolution that can represent the value exactly with a BCD count from 0 through 999.

Not every millisecond value can be represented exactly as S5TIME. The minimum resolution is 10 milliseconds, and larger durations may require 100 ms, 1 second or 10 second resolution.

Timer Resolution vs Accuracy

Timer resolution is the smallest increment a particular representation can express. A 100 millisecond timer base cannot represent a requested delay of 1050 milliseconds exactly.

Higher Resolution

A smaller timer base provides finer control over the requested delay.

Larger Range

A larger timer base permits longer delays using the same numerical preset range.

Timer Preset vs Accumulated Value

The preset is the target timer value, while the accumulated or elapsed value represents progress toward that target during execution.

For: Preset = 250 Time Base = 100 ms Target duration: 25 seconds If accumulated value is 100: 100 × 100 ms = 10 seconds elapsed

Milliseconds, Seconds and Minutes Conversion

Unit Milliseconds
1 millisecond 1 ms
1 second 1,000 ms
1 minute 60,000 ms
1 hour 3,600,000 ms
1 day 86,400,000 ms

Common PLC Timer Conversion Mistakes

Assuming Preset Means Seconds

A preset has meaning only when its timer base or timer data type is known.

Confusing 10 ms and 100 ms

The same preset differs by a factor of ten when the timer base changes.

Treating S5TIME as Hex Integer

The lower S5TIME digits are BCD digits, not a normal hexadecimal number.

Ignoring Timer Resolution

Requested delays may require rounding when they are not exact multiples of the base.

Mixing Legacy and IEC Timers

Modern IEC TIME-based timers and older preset/time-base timers use different representations.

Assuming Every PLC Is Identical

Timer ranges, resolutions and storage formats vary between PLC families and instructions.

PLC Timer Value Converter FAQs

How do I convert a PLC timer preset to seconds?
Multiply the preset by the timer base and convert the result into seconds. For example, preset 250 with a 100 ms base equals 25 seconds.
What does a 100 ms PLC timer base mean?
Each increment of the timer represents 100 milliseconds or 0.1 second.
What preset gives 30 seconds with a 100 ms timer base?
30 seconds equals 30,000 ms. Dividing by 100 ms gives a preset of 300.
What preset gives 10 seconds with a 10 ms base?
10,000 milliseconds divided by 10 milliseconds equals 1000 timer ticks.
What is IEC PLC TIME?
TIME is a duration data type commonly used by IEC 61131-3 PLC programming systems and timer instructions such as TON, TOF and TP.
What is S5TIME?
S5TIME is a Siemens legacy 16-bit timer representation combining a time-base code with a three-digit BCD timer count.
What does S5TIME 0x2250 mean?
Base code 2 means one-second resolution and BCD value 250 means 250 increments, so 0x2250 represents 250 seconds.
What are the S5TIME time bases?
The four standard bases are 10 milliseconds, 100 milliseconds, 1 second and 10 seconds.
What is the maximum S5TIME duration?
BCD value 999 with the 10-second time base represents 9990 seconds, or 2 hours 46 minutes 30 seconds.
Why does S5TIME use BCD?
Its timer count is stored as three decimal digits encoded separately into binary nibbles.
Can S5TIME represent 1 millisecond?
No. Its finest standard resolution is 10 milliseconds.
What happens if my desired time is not divisible by the timer base?
The required preset is fractional. A controller using integer timer ticks must use an available neighboring preset or a finer timer resolution.
What is timer resolution error?
It is the difference between the requested duration and the duration actually represented after converting to an available integer timer preset.
Is PLC timer preset the same as accumulated time?
No. Preset is the target value. Accumulated or elapsed value represents how far the timer has progressed toward that preset.
Do all PLC timers use the same time base?
No. Timer resolution, representation and supported ranges vary by PLC family, firmware and timer instruction.
Can this calculator use a custom timer base?
Yes. Enter the number of milliseconds represented by one timer tick.

Convert PLC Timer Presets, Time Bases and S5TIME

Calculate real timer duration from PLC ticks, determine the preset needed for a required delay, inspect resolution error and encode or decode Siemens S5TIME timer words.

Scroll to Top