PLCcheck

S5 Timer Conversion: KT Values to IEC Timers

Complete guide to converting Siemens S5 KT timer values to S7 IEC timers (TON, TOF, TP). Includes BCD format explanation, conversion table with 20+ examples, and behavior differences between S5 and IEC timers.

·12 min read
S5S7timerKTTONTOFTPIECSiemensBCD

Diesen Artikel auf Deutsch lesen

S5 Timer Conversion: KT Values to IEC Timers

S5 timers store time values as 16-bit BCD-encoded words with a time base selector (KT format). S7 IEC timers use the TIME data type (T#). Converting S5 timers to S7 requires three steps: decode the KT value to seconds, select the correct IEC timer type (TON/TOF/TP), and handle the behavior differences between S5 and IEC timers. This guide covers all three with concrete examples.

Understanding the S5 KT Timer Format

The S5 timer format is KT [value].[timebase] where:

Time base reference:

Time BaseMultiplierResolutionMax Duration
010 ms10 ms9.99 s
1100 ms100 ms99.9 s
21 s1 s999 s (16 min 39 s)
310 s10 s9,990 s (2 h 46 min 30 s)

Conversion formula: Duration = Value × Multiplier

Example: KT 030.2 = 30 × 1 s = 30 seconds → S7: T#30s

Free tool: Use our S5 Timer Calculator to convert any KT value instantly.

KT to IEC Conversion Table

S5 KT ValueCalculationDurationS7 IEC Format
KT 001.01 × 10 ms10 msT#10ms
KT 010.010 × 10 ms100 msT#100ms
KT 050.050 × 10 ms500 msT#500ms
KT 100.0100 × 10 ms1 sT#1s
KT 001.11 × 100 ms100 msT#100ms
KT 005.15 × 100 ms500 msT#500ms
KT 010.110 × 100 ms1 sT#1s
KT 030.130 × 100 ms3 sT#3s
KT 050.150 × 100 ms5 sT#5s
KT 100.1100 × 100 ms10 sT#10s
KT 001.21 × 1 s1 sT#1s
KT 010.210 × 1 s10 sT#10s
KT 030.230 × 1 s30 sT#30s
KT 060.260 × 1 s60 sT#1m
KT 300.2300 × 1 s300 sT#5m
KT 600.2600 × 1 s600 sT#10m
KT 001.31 × 10 s10 sT#10s
KT 006.36 × 10 s60 sT#1m
KT 030.330 × 10 s300 sT#5m
KT 060.360 × 10 s600 sT#10m
KT 360.3360 × 10 s3,600 sT#1h
KT 999.3999 × 10 s9,990 sT#2h46m30s

BCD Encoding: How S5 Stores Timer Values

S5 stores each timer as a 16-bit word in BCD (Binary Coded Decimal) format:

Bit: 15  14 | 13  12 | 11  10  9  8 | 7  6  5  4 | 3  2  1  0
      0   0 |  TB TB |  H   H  H  H | T  T  T  T | O  O  O  O
      unused | time   | hundreds     | tens       | ones
             | base   | (BCD)        | (BCD)      | (BCD)

Example: KT 543.2

This matters when you encounter timer values loaded from data blocks (L DW → SD T) rather than as constants (L KT). The DW contains the BCD-encoded value.

S5 Timer Types → S7 IEC Equivalents

SI — Pulse (S7: TP)

S5 behavior: Output goes TRUE when started. Output goes FALSE when time expires OR when input goes FALSE (whichever comes first). If input goes FALSE before time expires, the timer stops and output goes FALSE.

S7 TP behavior: Output goes TRUE on rising edge of IN. Output stays TRUE for exactly PT duration, regardless of IN state. Even if IN goes FALSE during timing, output remains TRUE until PT expires.

⚠️ Key difference: S5 SI stops when input goes FALSE. S7 TP does NOT stop — it always completes the full pulse duration. If your S5 program relies on SI being interrupted by the input, you need additional logic in S7.

SE — Extended Pulse (S7: TP)

S5 behavior: Like SI, but if the input goes TRUE again while the timer is running, the timer restarts from the beginning.

S7 TP behavior: TP ignores rising edges while already timing. It does NOT restart.

⚠️ Key difference: S5 SE restarts on re-trigger. S7 TP does not. For SE behavior in S7, you need to add a reset mechanism before the TP call.

SD — On Delay (S7: TON)

S5 behavior: Timer starts when input goes TRUE. Output goes TRUE when time expires, IF input is still TRUE. If input goes FALSE before time expires, timer resets to zero.

S7 TON behavior: Identical to S5 SD. Timer starts on rising edge of IN, output Q becomes TRUE when ET reaches PT, resets when IN goes FALSE.

✅ This is a direct 1:1 match. SD → TON is the safest conversion.

SS — Retentive On Delay (S7: TON with modifications)

S5 behavior: Like SD, but if input goes FALSE before time expires, the timer value is retained (not reset). When input goes TRUE again, the timer restarts from zero (not from the retained value). The output can only be cleared by the reset input (R).

⚠️ Important: S5 SS is NOT the same as S7 TONR (Retentive On-Delay Timer). TONR accumulates time across multiple input cycles. SS does NOT accumulate — it restarts each time. SS simply retains the timer status (output remains TRUE) until explicitly reset.

S7 equivalent: Use TON with a separate latch (SR flip-flop) for the output, and a dedicated reset input.

SA — Off Delay (S7: TOF)

S5 behavior: Output goes TRUE immediately when input goes TRUE. When input goes FALSE, timer starts. Output goes FALSE when time expires. If input goes TRUE again while timer is running, timer resets.

S7 TOF behavior: Identical to S5 SA. Output Q is TRUE while IN is TRUE. When IN goes FALSE, timer starts, Q remains TRUE for PT duration, then goes FALSE. If IN goes TRUE again during timing, timer resets and Q stays TRUE.

✅ This is a direct 1:1 match. SA → TOF is a safe conversion.

Complete Conversion Examples

Example 1: Simple On Delay (SD → TON)

S5 AWL:

      U     E 0.0
      L     KT 050.1       // 50 × 100ms = 5 seconds
      SD    T 1
      U     T 1
      =     A 4.0

S7 SCL:

"Timer_Motor_Delay"(
    IN := "Start_Button",       // E 0.0
    PT := T#5s                  // KT 050.1 = 5 seconds
);
"Motor_Run" := "Timer_Motor_Delay".Q;    // A 4.0

Example 2: Off Delay (SA → TOF)

S5 AWL:

      U     E 1.0
      L     KT 100.1       // 100 × 100ms = 10 seconds
      SA    T 5
      U     T 5
      =     A 5.0           // Stays ON for 10s after E1.0 goes FALSE

S7 SCL:

"Timer_Cooldown"(
    IN := "Fan_Sensor",         // E 1.0
    PT := T#10s                 // KT 100.1 = 10 seconds
);
"Fan_Motor" := "Timer_Cooldown".Q;       // A 5.0

Example 3: Pulse (SI → TP with caution)

S5 AWL:

      U     E 2.0
      L     KT 010.1       // 10 × 100ms = 1 second
      SI    T 10
      U     T 10
      =     A 6.0           // 1-second pulse

S7 SCL (simple, if SI interrupt behavior is not needed):

"Timer_Pulse"(
    IN := "Trigger_Sensor",     // E 2.0
    PT := T#1s                  // KT 010.1 = 1 second
);
"Signal_Lamp" := "Timer_Pulse".Q;        // A 6.0

Example 4: Timer value from data block

S5 AWL (timer preset loaded from DB):

      A     DB 10
      L     DW 5             // Timer preset stored in DB10 DW5
      U     E 0.0
      SD    T 3

S7 SCL:

// Note: DB10 DW5 → DB10.DBW10 (×2 address conversion)
// The DB value must be converted from S5TIME (BCD) to TIME format
// Or: store the time directly as TIME in the new DB

"Timer_FromDB"(
    IN := "Start_Button",
    PT := DB10.MyTimerPreset     // Declare as TIME in the DB
);

⚠️ When timer presets come from data blocks, the S5 value is BCD-encoded (S5TIME format). In S7, you should redesign the DB to store the value directly as TIME (T#) format. If you must read legacy BCD values, use the S5T_TO_TIME conversion function.

Migration Checklist for Timers

PLCcheck Pro automatically identifies all timers in your S5 program, calculates the IEC equivalents, and flags behavior differences. Try it now →

Frequently Asked Questions

What does KT 030.2 mean?

KT 030.2 is an S5 timer value. The 030 is the count value (30) and the .2 is the time base (1 second). Duration = 30 × 1 s = 30 seconds. In S7 IEC format: T#30s.

What is the maximum S5 timer duration?

The maximum is KT 999.3 = 999 × 10 s = 9,990 seconds = 2 hours, 46 minutes, 30 seconds. S7 IEC timers (TIME data type) support up to approximately 24 days, so there is no limitation when migrating.

Are S5 legacy timers (S_PULSE, S_ODT, etc.) still available in S7?

Yes, S7-300/400 and S7-1500 support S5 compatibility timer functions (S_PULSE, S_PEXT, S_ODT, S_ODTS, S_OFFDT). However, they are deprecated and limited to 256 timer instances. IEC timers (TON, TOF, TP) are recommended for all new and migrated programs.

Can I use the same timer number (T1, T2, etc.) in S7?

Yes, but S5 compatibility timers share a global timer memory area limited by the CPU. IEC timers use instance data blocks and have no such limitation. When migrating, assign each timer its own IEC timer instance with a meaningful name.


Maintained by PLCcheck.ai. Last update: March 2026. Not affiliated with Siemens AG.

Related Articles

Analyze your PLC code with AI

PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.

Try PLCcheck Pro →
← Back to Blog

Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.