PLCcheck

S5 to S7 Migration: The Complete Guide (2026)

Step-by-step guide for migrating Siemens S5 PLC programs to S7-1500. Covers AWL→SCL conversion, timer mapping, address translation, and hardware selection.

·18 min read
S5S7migrationSiemensAWLSCLTIA Portal

Diesen Artikel auf Deutsch lesen

S5 to S7 Migration: The Complete Guide (2026)

Migrating a Siemens S5 PLC to S7-1500 requires converting AWL/STL code to SCL, translating S5 addresses to S7 byte-addressing, replacing BCD timers with IEC timers, and selecting compatible S7-1500 hardware. This guide covers every step of the process with concrete code examples.

Siemens ended all S5 support on September 30, 2020. No spare parts, no repairs, no technical support. Every S5 system still running is operating on borrowed time. The S7-300 — the most common migration target until recently — entered its own phase-out on October 1, 2023, with spare parts guaranteed only until 2033. The only future-proof target is the S7-1500 with TIA Portal.

Why You Must Migrate Now

The SIMATIC S5 was launched in 1979 and served the industry for over 40 years. Since October 1, 2020, Siemens provides zero support for the entire S5 product family. Here is what that means in practice:

No spare parts from Siemens. A failed CPU module cannot be replaced through official channels. Third-party refurbished parts exist but at 3–10× the original price, with no guaranteed availability and limited warranty.

No software support. STEP 5 runs on DOS or Windows XP. Modern operating systems do not support it natively. The programming cable (PG cable with AS511 protocol) requires legacy hardware interfaces.

No qualified personnel. Engineers who learned S5 programming in the 1980s and 1990s are retiring. Finding someone who can troubleshoot S5 AWL code becomes harder every year.

The S7-300 is next. If you were considering migrating S5 to S7-300 — don't. The S7-300 entered product discontinuation (PM410) on October 1, 2025. From that date, components are only available as spare parts at increasing prices. Spare part availability is guaranteed only until October 2033. The only migration target that makes sense today is the S7-1500.

The 6-Step Migration Process

Step 1: Document the Existing S5 Program

Before touching any code, create a complete inventory of the existing system:

Use STEP 5 or S5 for Windows (S5W) to generate these lists. If you have only the S5D binary file without original software, a demo version of S5W can open files for offline viewing.

PLCcheck Pro tip: Upload your S5 AWL source code and get an instant analysis with block inventory, cross-references, timer list, and I/O map — without needing STEP 5 software. Try PLCcheck Pro →

Step 2: Select S7-1500 Hardware

Choose an S7-1500 CPU based on two critical parameters from your S5 system:

Work memory: Your S7-1500 needs at least 2× the S5 program memory. S7 programs are larger because SCL code is more verbose than AWL, and S7 uses byte-addressing (doubling DB sizes).

I/O addressing capacity: Count total digital and analog I/O points. The S7-1500 supports all common S5 I/O configurations via PROFINET-connected ET 200SP distributed I/O.

Common S5 → S7-1500 CPU mapping:

S5 CPUMemoryRecommended S7-1500S7-1500 Memory
S5-90U / S5-95U2–8 KBCPU 1511-1 PN150 KB
S5-100U (CPU 103)6–16 KBCPU 1511-1 PN150 KB
S5-115U (CPU 941–944)16–64 KBCPU 1513-1 PN300 KB
S5-135U (CPU 922/928)64–256 KBCPU 1515-2 PN750 KB
S5-155U (CPU 946/947/948)256–512 KBCPU 1517-3 PN/DP2 MB

I/O adapter modules: Siemens offers adapter modules (e.g., IM 461-1) that allow reusing existing S5 I/O racks with S7 controllers. This can reduce migration cost and downtime significantly by keeping existing field wiring intact.

Step 3: Convert the PLC Program

You have three options:

Option A: Use the Siemens S5→S7 Converter (fastest, ~60–80% automatic)

The STEP 7 software (V5.x) includes a built-in S5→S7 conversion tool. It converts S5 AWL source files into S7 STL source files.

What the converter handles: basic logic (U, O, UN, ON, S, R, =), load/transfer (L, T), jumps (SPA, SPB), basic arithmetic (+F, -F), comparisons.

What the converter does NOT handle:

Option B: Rewrite in SCL (best long-term, most effort)

Rewriting the program in SCL produces the cleanest result. SCL is the IEC 61131-3 Structured Text language and the recommended programming language for S7-1500.

Option C: Hybrid approach (recommended)

Use the converter for basic logic, then manually convert timers, data blocks, and special functions. Finally, refactor critical sections into SCL for maintainability. This is the most common approach in practice.

Step 4: Convert Timers and Counters

This is the most error-prone step. S5 timers use a BCD-encoded format (KT) with a time base selector. S7 IEC timers use the TIME data type.

S5 timer format: KT [value].[timebase]

S5 timer types → S7 IEC equivalents:

S5 TimerS5 NameS7 IECS7 Function
SIPulseTPGenerates a pulse of fixed duration
SEExtended PulseTPGenerates a pulse, restarts on re-trigger
SDOn DelayTONOutput ON after delay
SSRetentive On DelayTONLike SD, but retains elapsed time
SAOff DelayTOFOutput OFF after delay

Example conversion:

S5 AWL:

      U     E 0.0
      L     KT 030.2
      SD    T 1
      U     T 1
      =     A 4.0

S7 SCL:

"Timer_Conveyor"(
    IN  := "Start_Button",
    PT  := T#30s,
    Q   => "Motor_Run",
    ET  => "Elapsed_Time"
);

Free tool: Use our S5 Timer Calculator to convert any KT value to seconds and IEC format instantly.

Step 5: Convert Addresses

S5 and S7 use different addressing schemes. Inputs, outputs, and flags are straightforward. Data blocks are the critical difference.

Simple conversions (address number stays the same):

S5 (German)S7 (German)S7 (English)Type
E 0.0E 0.0I 0.0Input bit
EW 0EW 0IW 0Input word
A 4.0A 4.0Q 4.0Output bit
M 10.0M 10.0M 10.0Flag/memory bit
MW 100MW 100MW 100Flag/memory word

Data block conversion (CRITICAL — most common error):

S5 uses word addressing (DW). S7 uses byte addressing (DBW). The S7 address is always S5 address × 2.

S5S7Calculation
DB10 DW 0DB10.DBW 00 × 2 = 0
DB10 DW 1DB10.DBW 21 × 2 = 2
DB10 DW 5DB10.DBW 105 × 2 = 10
DB10 DW 100DB10.DBW 200100 × 2 = 200

Free tool: Use our S5→S7 Address Converter to convert any S5 address to S7 format with explanation.

Step 6: Test, Commission, and Go Live

Offline testing: Use PLCSIM (included with TIA Portal) to simulate the S7 program before connecting to real hardware.

Cutover strategy:

Common Pitfalls

1. Forgetting the DW × 2 conversion. Every data block address must be doubled. Missing even one creates silent data corruption.

2. Assuming S5 timers work the same in S7. Always use IEC timers (TON, TOF, TP), not S5 legacy timers.

3. Ignoring OB21/OB22 startup blocks. S5 uses OB21 (warm restart) and OB22 (cold restart). S7 uses OB100 and OB102.

4. Not testing indirect addressing. S5 commands like DO FW, LIR, TIR have no direct S7 equivalents.

5. Losing the S5 backup. Before starting migration, create multiple backups of the S5 program on different storage media.

Migration Checklist

What PLCcheck Pro Does for You

PLCcheck Pro automates the most time-consuming parts of S5→S7 migration:

Analyze Your S5 Code Now →


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.