The 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.
The Siemens S5/S7 Converter Tool: What It Does and What It Doesn't
The STEP 7 S5→S7 conversion tool converts approximately 60–80% of S5 programs automatically. It translates S5 AWL source files into S7 STL source files. The remaining 20–40% — timers, data block addressing, indirect access, special function blocks, and startup OBs — must be converted manually. This article explains exactly what works, what fails, and how to handle the errors.
Where to Find the Converter
The S5→S7 converter is included in STEP 7 V5.x (Classic). It is NOT available in TIA Portal. You access it via:
Start → All Programs → SIMATIC → STEP 7 → Converting S5 Files
The tool requires S5 program files in Siemens format (.S5D) or AWL source text files. The output is S7 AWL (.awl) source files that can be imported into a STEP 7 project and compiled.
Important: The converter outputs S7 STL/AWL, not SCL. If your target is SCL (recommended for S7-1500), you must manually rewrite the converted AWL into SCL as a second step. See our AWL to SCL conversion guide.
What the Converter Handles (60–80%)
The converter successfully translates these S5 instructions to S7 equivalents:
Bit logic: U, UN, O, ON, S, R, = (AND, AND NOT, OR, OR NOT, SET, RESET, ASSIGN)
Load and transfer: L (Load), T (Transfer) for most operand types
Basic arithmetic: +F, -F (integer add/subtract), +G, -G (double integer)
Comparisons: !=F, ><F, >F, <F (integer comparisons)
Jumps: SPA (unconditional jump), SPB (conditional jump), SPBN (jump if not), SPZ, SPN, SPP, SPM
Block calls: SPA FB, SPA PB → CALL FB, CALL FC (basic calls without complex parameter passing)
Block end: BE, BEA, BEB
Simple addressing: Direct access to E (inputs), A (outputs), M (flags), T (timers), Z (counters)
The converter also handles I/O address remapping, suggesting new S7 addresses for S5 addresses, and renumbers blocks if needed.
What the Converter Cannot Handle
1. Timers (KT format → IEC timers)
The converter translates S5 timer instructions (SI, SE, SD, SS, SA) to S7 legacy timer functions (S_PULSE, S_PEXT, S_ODT, S_ODTS, S_OFFDT). This technically works, but the legacy timer functions are deprecated. For S7-1500, you should convert to IEC timers (TON, TOF, TP) manually.
The converter does NOT convert KT values to T# format. It keeps the S5TIME format (S5T#). While S7-300/400 accept S5TIME, you should convert to TIME (T#) for forward compatibility.
See our S5 Timer Conversion Guide and S5 Timer Calculator.
2. Data Block Addressing (DW → DBW)
The converter handles the DW→DBW address conversion (×2) for directly programmed DB accesses. However, it frequently fails when:
- Timer or counter presets are loaded from data blocks
- Data block values are used as indirect pointers
- Multiple data blocks are accessed in complex sequences
- Extended data blocks (DX) are used
Always verify every DB access in the converted code manually. Use our Address Converter to check individual addresses.
3. Indirect Addressing (DO, LIR, TIR, B register)
These instructions cannot be converted at all. The converter generates an error for each occurrence:
| S5 Instruction | Purpose | Converter Result |
|---|---|---|
| DO FW / DO DW | Indirect memory access via flag word | Error — not converted |
| LIR 0 / LIR 2 | Indirect load via accumulator content | Error — not converted |
| TIR 0 / TIR 2 | Indirect transfer via accumulator content | Error — not converted |
| B MW / B DW | Base register for indirect addressing | Error — not converted |
| TNB | Transfer nibble | Error — not converted |
S7 solution: Use pointer addressing with address registers AR1/AR2, or memory-indirect addressing with [MD x] / [MW x]. On S7-1500, use PEEK and POKE functions.
4. Startup Organization Blocks (OB21, OB22)
S5 uses OB21 (warm restart) and OB22 (cold restart) for initialization logic. The converter does not map these to S7 equivalents. You must manually create:
- OB100 (warm restart) — equivalent to S5 OB21
- OB102 (cold restart) — equivalent to S5 OB22
The startup logic itself must be reviewed because S5 and S7 have different initialization sequences.
5. System Function Blocks
S5 system FBs are not available in S7. Common ones that cause converter errors:
| S5 Block | Function | S7 Replacement |
|---|---|---|
| FB 250 | Read analog input | Scale + PEW (peripheral input word) |
| FB 251 | Write analog output | Scale + PAW (peripheral output word) |
| FB 241 | PID controller | S7 PID_Compact or PID_3Step FB |
| FB 242 | Step controller | S7 PID_3Step FB |
| FB 12 | FIFO buffer | Custom FB or SCL code |
6. Bit Test Operations on Special Areas
These S5 instructions access timer, counter, and system memory at the bit level and have no S7 equivalent:
- TB T x.y / TBN T x.y (Test bit in timer word)
- TB C x.y / TBN C x.y (Test bit in counter word)
- SU T x.y / RU T x.y (Set/Reset unconditional in timer/counter)
- TB RI x.y (Test bit in ring buffer)
- L RS x (Load system data word)
7. Communication Blocks
S5 communication handling blocks (for SINEC H1, SINEC L2, etc.) have no automatic conversion. S7 uses completely different communication mechanisms (S7 connections, PROFINET, PUT/GET, BSEND/BRCV).
Typical Converter Output: Errors vs. Warnings
Warnings are usually acceptable — the converter made an assumption that should be verified:
- Address remapping suggestions
- Block number changes
- Timer/counter format notices
Errors must be fixed manually — the converter could not translate the instruction:
- Unsupported instructions (DO, LIR, TIR, etc.)
- Missing block references
- Incompatible operand types
Real-world example: Users report typical results of 6–8 errors and 20–50 warnings for medium-sized S5 programs (50–100 blocks). Large programs (200+ blocks) commonly produce 50+ errors, often because they use indirect addressing extensively.
Step-by-Step: Using the Converter
-
Prepare the S5 program: Remove OB21, OB22, and communication FBs from the block list before conversion. These will generate errors and should be recreated manually.
-
Run the converter: Point it to your S5 program file (.S5D). The converter generates .AWL source files.
-
Review the log: Check every error and warning. Errors are blocks that were not converted.
-
Import into STEP 7: Create a new S7 project. Import the .AWL files into the Sources folder. Compile them.
-
Fix compilation errors: The STEP 7 compiler will flag additional issues (missing symbols, incompatible operands). Fix each one.
-
Manually convert remaining blocks: Rewrite blocks that the converter could not handle.
-
Test thoroughly: Every converted block must be tested. Focus especially on timers, data block access, and any logic involving indirect addressing.
When to Skip the Converter Entirely
For small programs (under 30 blocks), many experienced engineers recommend skipping the converter and rewriting directly in S7 SCL. The reasons:
- The converter output is S7 AWL, which is deprecated on S7-1500
- You still need to manually fix 20–40% of the code
- Rewriting in SCL produces cleaner, more maintainable code
- The time saved by the converter is often consumed by debugging its output
The converter is most valuable for large programs (100+ blocks) where rewriting everything from scratch would take weeks.
What PLCcheck Pro Does Differently
Unlike the Siemens converter, PLCcheck Pro:
- Outputs SCL directly (not AWL) — ready for S7-1500
- Converts all timers to IEC format (TON/TOF/TP with T# values)
- Handles the DW×2 address conversion for all data block accesses
- Generates symbolic names for all variables
- Produces documentation alongside the converted code
- Works in your browser — no STEP 7 V5.x installation needed
Frequently Asked Questions
Is the S5→S7 converter available in TIA Portal?
No. The S5→S7 converter is only available in STEP 7 V5.x (Classic). TIA Portal does not include it. You need a STEP 7 Classic installation to use the converter, then import the result into TIA Portal.
Does the converter output SCL?
No. The converter outputs S7 STL/AWL source files (.awl). If you want SCL, you must manually rewrite the converted AWL code.
How many errors should I expect?
Depends on program complexity. Simple programs with basic logic: 2–5 errors. Medium programs with timers and data blocks: 6–20 errors. Complex programs with indirect addressing and communication: 50+ errors.
Can the converter handle S5-135U and S5-155U programs?
Yes, but these large CPUs often use advanced features (indirect addressing, system data access, extended DBs) that the converter cannot handle. Expect more manual work.
Is there an alternative to the Siemens converter?
Third-party tools exist (e.g., S5 for Windows by IBHsoftec includes conversion features, PG-2000 by Process-Informatik). PLCcheck Pro offers AI-powered conversion directly to SCL with full documentation.
Maintained by PLCcheck.ai. Last update: March 2026. Not affiliated with Siemens AG.
Related Articles
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
migration-guideS7-300 to S7-1500 Migration: Complete Guide
Step-by-step guide for migrating Siemens S7-300 PLC programs to S7-1500 using TIA Portal. Covers hardware mapping, software migration wizard, optimized data blocks, AWL→SCL conversion, and common pitfalls.
15 min read
migration-guideConverting S5 AWL to S7 SCL: Step-by-Step
Practical guide for converting Siemens S5 AWL (Instruction List) code to S7 SCL (Structured Text). Includes conversion tables, code examples for bit logic, timers, counters, jumps, and data blocks.
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.