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.
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:
- Value: 000–999 (BCD-encoded, 3 digits)
- Time base: 0–3 (defines the multiplier)
Time base reference:
| Time Base | Multiplier | Resolution | Max Duration |
|---|---|---|---|
| 0 | 10 ms | 10 ms | 9.99 s |
| 1 | 100 ms | 100 ms | 99.9 s |
| 2 | 1 s | 1 s | 999 s (16 min 39 s) |
| 3 | 10 s | 10 s | 9,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 Value | Calculation | Duration | S7 IEC Format |
|---|---|---|---|
| KT 001.0 | 1 × 10 ms | 10 ms | T#10ms |
| KT 010.0 | 10 × 10 ms | 100 ms | T#100ms |
| KT 050.0 | 50 × 10 ms | 500 ms | T#500ms |
| KT 100.0 | 100 × 10 ms | 1 s | T#1s |
| KT 001.1 | 1 × 100 ms | 100 ms | T#100ms |
| KT 005.1 | 5 × 100 ms | 500 ms | T#500ms |
| KT 010.1 | 10 × 100 ms | 1 s | T#1s |
| KT 030.1 | 30 × 100 ms | 3 s | T#3s |
| KT 050.1 | 50 × 100 ms | 5 s | T#5s |
| KT 100.1 | 100 × 100 ms | 10 s | T#10s |
| KT 001.2 | 1 × 1 s | 1 s | T#1s |
| KT 010.2 | 10 × 1 s | 10 s | T#10s |
| KT 030.2 | 30 × 1 s | 30 s | T#30s |
| KT 060.2 | 60 × 1 s | 60 s | T#1m |
| KT 300.2 | 300 × 1 s | 300 s | T#5m |
| KT 600.2 | 600 × 1 s | 600 s | T#10m |
| KT 001.3 | 1 × 10 s | 10 s | T#10s |
| KT 006.3 | 6 × 10 s | 60 s | T#1m |
| KT 030.3 | 30 × 10 s | 300 s | T#5m |
| KT 060.3 | 60 × 10 s | 600 s | T#10m |
| KT 360.3 | 360 × 10 s | 3,600 s | T#1h |
| KT 999.3 | 999 × 10 s | 9,990 s | T#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)
- Bits 15–14: Unused (always 0)
- Bits 13–12: Time base (00=10ms, 01=100ms, 10=1s, 11=10s)
- Bits 11–0: Value as 3 BCD digits
Example: KT 543.2
- Time base 2 = binary 10
- Value 543: Hundreds=5 (0101), Tens=4 (0100), Ones=3 (0011)
- Full word: 00 10 0101 0100 0011 = 0x2543
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
- List all timers (T0–T255) with their KT values
- Calculate duration for each: Value × Time Base
- Identify the S5 timer type (SI/SE/SD/SS/SA) for each
- Map to IEC equivalent (TP/TON/TOF)
- Flag SI and SE timers for behavior testing (TP behaves differently)
- Flag SS timers (not equivalent to TONR — needs special handling)
- Check for timer presets loaded from data blocks (BCD format)
- Convert all KT values to T# format
- Test every timer in PLCSIM before commissioning
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
Migrating S5 Counter Programs (Z/ZV/ZR) to S7
How to migrate S5 counter programs to S7. Covers ZV (count up), ZR (count down), BCD format differences, S7 equivalents (S_CU, S_CD, CTU, CTD, CTUD), and common pitfalls.
10 min read
migration-guideThe Siemens S5/S7 Converter Tool: What It Does and What It Doesn't
Honest assessment of the Siemens STEP 7 S5→S7 conversion tool. What it converts automatically, what it cannot handle, common errors, and how to deal with the remaining 20–40% that requires manual work.
12 min read
migration-guideS5 to S7 Address Mapping: Complete I/O Conversion Table
Complete reference for converting Siemens S5 PLC addresses to S7 format. Covers inputs (E→I), outputs (A→Q), flags (M/F), data blocks (DW→DBW×2 with bit-level mapping), timers, counters, and peripherals.
14 min read
Analyze your PLC code with AI
PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.
Try PLCcheck Pro →Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.