Migrating SIMATIC S5 to S7: Conversion Steps & FB Compatibility

David Krause15 min read
S7-300SiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview of SIMATIC S5 to S7 Migration

Thousands of SIMATIC S5 programmable logic controllers remain in service across process and manufacturing plants worldwide. End-of-life announcements from Siemens, combined with shrinking spare-part availability for legacy CPUs (S5-90U, S5-95U, S5-100U, S5-115U, S5-135U, S5-155U), make migration to the S7 family a recurring engineering task. Field experience shows that the migration is rarely a single-step operation, and the path chosen has long-term consequences for spare-part strategy, support contracts, and engineering tooling.

Siemens provides a formal Migration Guide: SIMATIC S5 to SIMATIC S7-1500 on the Siemens Industry Online Support portal. This guide is the canonical reference, but it covers only the S7-1500 target. No equivalent guide or automatic tool exists for the S7-1200, which means engineers must follow different procedures depending on which S7 platform the customer has standardized on.

Engineering reality check: A complete S5 to S7 migration includes hardware re-design, program conversion, communication re-mapping, HMI migration, and documentation. The program-conversion step is the smallest portion of the project; field engineers report program conversion is typically 20-30 % of the total effort, with hardware, I/O re-wiring, and HMI re-development dominating the schedule.

Prerequisites and Target Platform Selection

Before launching the migration toolchain, decide which S7 platform will replace the S5. The decision drives the entire toolchain, the available migration tools, and the long-term support profile.

Target Platform Programming Environment Migration Tool Available Recommended When
S7-300 / S7-400 (Classic) STEP 7 V5.5 + SPx Yes (STEP 5 to STEP 7 V5.5) Brownfield replacement, minimal HMI change, conservative firmware profile, long-term spare-part symmetry with installed base
S7-1500 TIA Portal V13 / V14 / V15+ Yes (two-step: STEP 5 to STEP 7 V5.5 to TIA) New HMI/SCADA standards, motion, safety integrated, OPC UA, customer mandates TIA
S7-1200 TIA Portal No automatic tool Small standalone machines, low I/O count, cost-sensitive, willing to manually rewrite

Many field engineers still prefer S7-300 / S7-400 on STEP 7 V5.5 / V5.6 for migration projects because of the maturity of the converter, the absence of TIA Portal instabilities on a production line, and the simpler spare-part model. This preference is explicit: the S7-300 / S7-400 with STEP 7 V5.x combination is regarded as the most predictable target until TIA Portal V14 (and successor) firmware problems on the S7-1500 are fully resolved.

Prerequisites Checklist

  • STEP 5 source project (S5-DOS, S5 file container) — backup verified
  • STEP 7 V5.5 SP2 or later installed (required for the S5 converter)
  • TIA Portal V14 or V14 SP1 minimum, V15+ strongly recommended for new S7-1500 work
  • License dongle for the converter option in STEP 7 V5.5
  • Current S5 program listing and cross-reference
  • Hardware list of all S5 modules, CPs, and I/O
  • Communication topology map (Sinec L1 / L2 / H1 nodes)

Two-Step Migration Architecture

Direct migration from STEP 5 to TIA Portal is not supported. The official path requires an intermediate STEP 7 V5.5 project, and is documented in the Siemens migration guide and confirmed by field experience.

STEP 5 Project.S5 / S5-DOS STEP 7 V5.5Classic converter TIA PortalV14 / V15+ S7-1500Target PLC STEP 5 Project STEP 7 V5.5 S7-300/400 S5 to S7-1200 No automatic migration tool — manual rewrite required

Figure 1 — Three migration paths: two-step to S7-1500, single-step to S7-300/400, and manual rewrite for S7-1200.

  1. Step 1: Convert STEP 5 source to a STEP 7 V5.5 project using the bundled S5 converter. Output is a STEP 7 V5.5 .s7p archive.
  2. Step 2: Migrate the STEP 7 V5.5 project to TIA Portal using the TIA migration tool. The target CPU is then an S7-1500 with a defined firmware version.
If the target is S7-300 or S7-400, only Step 1 is required; the resulting STEP 7 V5.5 project is loaded directly into the new CPU.

FB Conversion Compatibility Reference

The S5 converter in STEP 7 V5.5 handles a defined set of S5 standard function blocks (FBs) automatically. Field engineers maintain a published distinction between "convertible" FBs and "non-convertible" FBs because it drives the engineering hours for the conversion phase.

Category Examples in S5 Behavior in S7 Engineering Action
Standard math / logic FBs Add, multiply, compare blocks Converted automatically None
IEC 61131-3 standard functions (re-mapped) Timer, counter, edge detection Re-mapped to S7 IEC timers / counters / FB calls Verify in converted code
Display drivers (legacy OP / COROS) FB51 family for Siemens display panels Not converted — function obsolete Replace by S7 HMI / WinCC Flexible / TIA WinCC
Sinec L1 / L2 / H1 CP drivers CP 530 / 1430 / 1431 send/receive FBs Not converted — Sinec retired Re-architect on PROFIBUS DP or PROFINET
COM package FBs (closed-loop control, special comms) FB120-FB255 ranges from COM package Not converted — handled in S7 by standard libraries or technology objects Map to PID_Compact / PIDT1 in S7-1500 or FM 355 in S7-300
User FBs (FB 0-FB 199 in S5) Project-specific blocks Converted as far as syntax permits Manual review and test
Rule of thumb from the field: If the FB name appears in the Sinec, OP/COROS, or COM-package list, do not even think of trying to convert it — the function no longer exists in S7 in the same form. The S7 architecture replaces those FBs with system blocks, technology objects, or HMI-side drivers.

Non-Convertible S5 Standard FB Categories

The S5 program model relied on several layers of standard FBs that Siemens shipped with the programming package. Three categories of those FBs do not survive the migration to S7 in their original form, and attempting to convert them produces either a compile error or a silently non-functional block.

1. Display and Operator Panel Drivers

The S5 OP and COROS operator panels were driven by Siemens-supplied FBs such as FB51 and its siblings. These FBs read panel key states, wrote to display buffers, and managed the OP-protocol handshake. In S7, those functions are replaced by:

  • ProTool / WinCC Flexible for S7-300/400 migrations
  • TIA Portal WinCC for S7-1500 migrations
  • Tag-based communication, with the panel protocol handled by the HMI runtime, not the CPU program

The CPU program must be scrubbed of all display-driver FBs before conversion. Field engineers report this scrub takes a non-trivial amount of time on large S5 programs because the FBs are often called from many OB1 segments.

2. Sinec L1 / L2 / H1 Communication FBs

Sinec was the Siemens proprietary network family for S5:

  • Sinec L1 — low-speed, master/slave, used on AS-Interface-like segments
  • Sinec L2 — PROFIBUS predecessor (corresponds to PROFIBUS DP / FMS)
  • Sinec H1 — Industrial Ethernet predecessor (10 Mbps, CSMA/CD)

The S5 communication FBs (send/receive, fetch/write, BSEND/BRCV) that drove the CP 530, CP 1430, CP 1431 and the L1 master/slave FBs are not converted. The communication is re-implemented on the S7 side using:

  • PROFIBUS DP via CP 342-5 / CP 443-5 (S7-300/400) or CM 1542-5 (S7-1500)
  • PROFINET / Industrial Ethernet via CP 343-1 / CP 443-1 or the S7-1500 onboard PROFINET interface
  • Open IE communication: TSEND, TRCV, TCON, TDISCON for ISO-on-TCP / TCP / UDP

3. COM-Package FBs (Closed-Loop Control and Special Libraries)

The "COM package" (Kommunikations- und Organisations-Pakete) bundled FB ranges for closed-loop control, positioning, and special communication. These FBs were typically called within the FB120-FB255 range in many S5 programs. In S7, their functionality is delivered by:

  • Standard library blocks in STEP 7 V5.5: PID_CP, PID_FM, CONT_C, CONT_S
  • TIA Portal technology objects: PID_Compact, PIDT1 in S7-1500, or external FM 355 / FM 455 modules in S7-300
  • Motion control technology objects in S7-1500: TO_PositioningAxis, TO_SynchronousAxis

Communication Migration: Sinec to Modern Networks

One of the largest engineering tasks in a Sinec-bearing S5 program is the re-mapping of the communication layer. The table below summarizes the canonical mapping used in brownfield migrations.

S5 Network Typical S5 CP S7 Replacement Notes
Sinec L1 CP 530, CP 531 AS-Interface CP 343-2 / CM 1542-A2 Master/slave re-implemented on the AS-i master CP
Sinec L2 CP 5412, CP 5430 PROFIBUS CP 342-5 / CP 443-5 / CM 1542-5 DP-V0/V1 slave configuration converted manually
Sinec H1 CP 1430, CP 1431 IE CP 343-1 / CP 443-1 / onboard PROFINET on S7-1500 TF protocol replaced by ISO-on-TCP; use TSEND_C/TRCV_C
Point-to-point (3964R, ASCII) CP 521, CP 524, CP 525 PtP CM 1241 / CM 1541 / CP 340 / CP 341 / CP 440 / CP 441 3964R framing retained; ASCII framing block re-written

For S7-1500 projects, consult the Siemens Industry Online Support knowledge base to retrieve the current CP compatibility matrix. The CP type and firmware version must be matched against the S7-1500 firmware version (V1.x through V3.x) to avoid communication faults at commissioning.

Step 1: STEP 5 to STEP 7 V5.5 Procedure

The STEP 5 to STEP 7 V5.5 conversion is the most mature of the migration steps. It is the same path used since STEP 7 V3.x and is documented in the STEP 7 V5.5 online help and the conversion tool's own user manual.

1.1 Prepare the STEP 5 Source

  • Open the S5 program in STEP 5 V7.x (or STEP 5 for Windows). Verify the project compiles without errors.
  • Print or export the cross-reference list. The S7 cross-reference format differs and the printout is the fallback when symbol conversion loses information.
  • Identify and document all FBs that fall in the non-convertible categories (display drivers, Sinec, COM package).

1.2 Run the S5 Converter

  1. In STEP 7 V5.5, choose File → S5 File → Open and select the S5 file container.
  2. The converter analyzes OB, FB, PB, SB, DB, FX, FY, and the symbol table.
  3. Mapping rules: S5 PB (program block) → S7 FC (function); S5 FB → S7 FB with instance DB; S5 DB → S7 DB with adjusted syntax; S5 OB → S7 OB family (OB1, OB100, OB101, OB102).
  4. The conversion log is written to a .log file. Read it line-by-line; every warning must be triaged before the next step.

1.3 Review the Converted Project

  • Open each converted block in the STEP 7 V5.5 LAD/FBD/STL editor.
  • For every block flagged as "rewritten" or "incomplete", replace by a manual S7 equivalent or by a block from the STEP 7 standard library.
  • Rebuild the symbol table; some S5 symbols (8-char max, no special characters) are lost or truncated.
  • Cross-check timer/counter semantics: S5 BCD-coded timers must be re-coded as IEC timers in S7.

Step 2: STEP 7 V5.5 to TIA Portal Migration

Step 2 migrates the STEP 7 V5.5 project into a TIA Portal project. The TIA migration tool is invoked from inside TIA Portal and accepts .s7p / .s7l archives. The target is always a defined CPU type and firmware version.

2.1 TIA Portal Prerequisites

  • TIA Portal V14 or V14 SP1 minimum; V15 / V15.1 / V16+ strongly recommended for new S7-1500 work
  • Matching S7-1500 HSP (Hardware Support Package) installed for the target CPU
  • STEP 7 V5.5 project must be free of warnings and errors before migration

2.2 Migration Procedure

  1. In TIA Portal, select Project → Migrate project → S7-300/S7-400 project.
  2. Select the STEP 7 V5.5 archive. TIA reports compatibility with the target firmware version.
  3. Choose the target S7-1500 CPU and firmware version. The migration tool warns if the S7-1500 firmware is too new or too old for the block set.
  4. Review the migration log. "Block has not been migrated" messages must be investigated — these are blocks the TIA tool could not convert and which must be re-implemented.
  5. Re-compile, download to PLCSIM, and verify on a test rig before site deployment.
TIA V14 specific: TIA V14 introduced a new internal architecture (multi-user, integration of PLCSIM, redesigned library model). Early V14 builds were reported to make first-time migration problems worse, particularly around library upgrades and AS-i configuration. Choose a TIA version that has been patched for at least one service pack before starting the migration.

TIA Portal Version Stability Reference

TIA Portal version selection has a direct effect on migration success. The version history below records the typical stability profile observed in the field for S5-to-S7 migration projects targeting S7-1500.

TIA Version Release Year Stability Notes for Migration Field Recommendation
V10 2010 Initial release, limited S7-1500 support Do not use for migration
V11 2011 First stable S7-1500 support (CPU FW 1.0) Legacy only
V12 2012 S7-1500 CPU FW 1.5 support Outdated
V13 2013 Improved migration tool, FW 1.6 Avoid for new work
V13 SP1 2014 Stability improvements Acceptable for V13-anchored projects
V14 2016 New architecture, FW 2.0 / 2.1; first-launch issues reported Apply at least SP1; preferably move to V15
V14 SP1 2017 Stabilized migration; common in field Acceptable for production migration
V15 / V15.1 2017-2018 FW 2.5 / 2.6; OPC UA support Recommended for new S7-1500 work
V16 / V17+ 2019+ FW 2.8 / 2.9 / 3.0; modern S7-1500 CPU support Recommended for new projects

Field engineers report that TIA Portal stability did not reach a level they could "recommend with a good conscience" until V14 SP1, and that even then the TIA platform as a whole was not on par with STEP 7 V5.5 for risk-averse brownfield work. This is a recurring comment across multiple TIA versions (V10 through V13), and the V14 release did not immediately resolve the underlying stability complaints. New TIA architecture changes can make first-time problems worst before service packs stabilize the platform.

S7-1200 Migration Limitation

There is no automatic migration tool from S5 to S7-1200. This is an explicit gap in the Siemens migration offering. The S7-1200 was positioned as a small-machine / cost-optimized controller and was not part of the S5-to-S7 converter strategy.

For S7-1200 targets, the migration must be performed by manual rewrite:

  1. Reverse-engineer the S5 program into a function specification.
  2. Redesign in TIA Portal using S7-1200-compatible blocks: IEC_Timer (TP, TON, TOF), IEC_Counter (CTU, CTD, CTUD), and the S7-1200 process image model.
  3. Re-implement the S5 FBs as TIA Portal FBs or as S7-1200 standard library calls.
  4. Test the S7-1200 program against the S5 program on a parallel rig for verification.
When S7-1200 is the wrong target: For a brownfield migration of any S5 program that uses COM-package FBs, Sinec communications, or significant closed-loop control, the S7-1200 is almost always the wrong target. The S7-1200 lacks the technology objects (advanced motion, multi-axis synchronization) and the CP portfolio of the S7-1500. Force-fitting an S5 migration into the S7-1200 increases engineering hours and reduces the long-term support profile.

Common Migration Issues and Workarounds

Symptom Root Cause Workaround
Block fails to convert in STEP 5 to STEP 7 V5.5 FB is in the Sinec / display / COM package category Delete the FB; replace function with S7 standard library or HMI-side handling
Symbol truncated or lost S5 symbol table is 8-char uppercase only Rebuild the symbol table in S7 with the long names; export a cross-reference first
Time-of-day or date wrong S5 used different time-base word format Use S7 READ_CLK / WRIT_CLK and re-format in S7 code
Counter wraps at 999 instead of 16-bit S5 BCD-coded counter in 16-bit Replace by IEC counter block in S7
Communication partner not reachable after migration Sinec L2 / H1 CP removed; protocol mismatch Re-implement on PROFIBUS or PROFINET with TSEND / TRCV or DP slave configuration
HMI tags broken Display driver FBs removed but tag links remain Re-build tag list in WinCC / WinCC Flexible from S7 symbols; do not import the S5 OP project
FB instance DB inconsistent S5 instance-DB structure not preserved Open the FB in S7, save it once; regenerate the instance DB
TIA migration "Block has not been migrated" Block uses V5.5 features that the target TIA version cannot represent Re-implement the block in TIA-compatible form; re-run the migration
Scan time much faster than S5 baseline S7-1500 OB1 cycle time is significantly lower than S5 Verify time-of-day logic, watch-dog, and integrator gains that depended on S5 scan rate

Verification and Commissioning Checklist

  1. Cross-reference: Generate a fresh cross-reference in STEP 7 V5.5 / TIA Portal and compare it to the S5 source cross-reference. Any unexplained delta is a lost address or symbol.
  2. Block consistency: Run Edit → Check Block Consistency in TIA Portal. Resolve every error before download.
  3. Simulation: Run the converted program in PLCSIM (S7-300/400) or PLCSIM Advanced (S7-1500). Force I/O and compare behavior to the S5 simulation if available.
  4. Online test on the real CPU: With the S5 PLC still running in parallel, force each output on the S7 side and verify field behavior. Then invert: force on the S5 and verify the S7 reads the right input.
  5. Communication test: For each migrated CP, verify the partner device sees the S7 with the same identity and slot as the S5 had. DP slave GSD must match; PROFINET device name must match.
  6. HMI tag refresh: Cycle every HMI tag at runtime. Any tag that does not update is either a symbol mismatch or a tag-prefix error.
  7. Watch-dog / scan-time check: The S7-1500 OB1 cycle time is typically lower than the S5 OB1 cycle time. Verify the S7 program does not break a time-of-day-based logic that relied on the S5's slower scan.
  8. Documentation: Export the TIA project, the STEP 7 V5.5 archive, and the original S5 program. Store on a project-server with version tagging.

FAQ

How long does an S5 to S7 migration project typically take?

For a mid-sized S5 program (50 FBs, 30 DBs, one Sinec L2 network), expect 6-12 weeks of engineering: 1 week STEP 5 to STEP 7 V5.5 conversion, 1-2 weeks STEP 7 V5.5 to TIA (if S7-1500), 2-4 weeks manual rework of non-convertible FBs, 2-3 weeks on-site commissioning. Add hardware re-design and HMI re-build on top.

Can I migrate an S5 program directly to S7-1200?

No. Siemens does not provide an automatic migration tool for the S7-1200. The S5 program must be manually reverse-engineered and rewritten in TIA Portal using S7-1200-compatible blocks. For COM-package and Sinec-heavy S5 programs, choose the S7-1500 instead.

Which S5 FBs cannot be converted to S7?

Display-driver FBs (e.g. FB51 and the OP/COROS family), Sinec L1 / L2 / H1 communication FBs (CP 530 / 1430 / 1431), and COM-package FBs for closed-loop control (typically FB120-FB255). The S5 system blocks for these functions are obsolete in S7 and are replaced by HMI tag handling, PROFINET / PROFIBUS, and technology objects respectively.

Is TIA Portal V14 stable enough for a production S5 to S7-1500 migration?

Use V14 SP1 or later. V14 (RTM) introduced a new TIA architecture and early builds made first-time migration problems worse. V15 / V15.1 / V16 are the recommended baseline for new S7-1500 work; V14 SP1 is the minimum acceptable. For risk-averse brownfield work, STEP 7 V5.5 on S7-300 / S7-400 remains a defensible target.

Should I choose S7-300 / S7-400 or S7-1500 as the migration target?

Choose S7-300 / S7-400 (STEP 7 V5.5 / V5.6) if the project demands a predictable, stable migration with no customer mandate for TIA, especially for brownfield S5 replacements with Sinec, COM package, or large FB libraries. Choose S7-1500 (TIA Portal) if the customer mandates TIA, requires motion, safety integrated, OPC UA, or wants long-term support aligned with the S7-1500 roadmap. Avoid the S7-1200 for any non-trivial S5 migration.

Back to blog