S5 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.
S5 to S7 Address Mapping: Complete I/O Conversion Table
Converting S5 addresses to S7 is straightforward for inputs, outputs, and flags — the numbers stay the same. The critical conversion is data blocks: S5 uses word addressing (DW 0, DW 1, DW 2...) while S7 uses byte addressing (DBW 0, DBW 2, DBW 4...). Every S5 data word address must be multiplied by 2 for S7. This single rule causes more migration bugs than any other.
Free tool: Use our S5→S7 Address Converter to convert any address instantly.
Inputs (Eingänge)
Inputs are identical in S5 and S7. Only the English mnemonic changes (E→I).
| S5 (German) | S7 (German) | S7 (English) | Type |
|---|---|---|---|
| E 0.0 | E 0.0 | I 0.0 | Input bit |
| E 3.7 | E 3.7 | I 3.7 | Input bit |
| EB 0 | EB 0 | IB 0 | Input byte |
| EW 0 | EW 0 | IW 0 | Input word (bytes 0–1) |
| EW 4 | EW 4 | IW 4 | Input word (bytes 4–5) |
| ED 0 | ED 0 | ID 0 | Input double word (bytes 0–3) |
No conversion needed. The address numbers are identical.
Outputs (Ausgänge)
Outputs are identical in S5 and S7. Only the English mnemonic changes (A→Q).
| S5 (German) | S7 (German) | S7 (English) | Type |
|---|---|---|---|
| A 4.0 | A 4.0 | Q 4.0 | Output bit |
| A 5.3 | A 5.3 | Q 5.3 | Output bit |
| AB 4 | AB 4 | QB 4 | Output byte |
| AW 4 | AW 4 | QW 4 | Output word |
| AD 8 | AD 8 | QD 8 | Output double word |
No conversion needed.
Flags / Memory (Merker)
Flags are identical between S5 and S7. The mnemonic M stays the same in both German and English. Note: In older S5 programs, flags may use the letter F instead of M (e.g., F 10.0 = M 10.0, FW 100 = MW 100, FY 10 = MB 10).
| S5 | S5 (old notation) | S7 | Type |
|---|---|---|---|
| M 10.0 | F 10.0 | M 10.0 | Flag bit |
| MB 20 | FY 20 | MB 20 | Flag byte |
| MW 100 | FW 100 | MW 100 | Flag word |
| MD 200 | — | MD 200 | Flag double word |
No conversion needed. Just replace F with M and FY with MB if your S5 program uses the older notation.
Data Blocks — CRITICAL (DW × 2 = DBW)
This is the most important conversion rule in any S5→S7 migration. Get this wrong and your program reads corrupted data — silently, without error messages.
The Rule
S5 uses word addressing. DW 0 is the first word, DW 1 is the second word, DW 2 is the third word. Each word is 2 bytes apart.
S7 uses byte addressing. DBW 0 starts at byte 0, DBW 2 starts at byte 2, DBW 4 starts at byte 4.
Conversion: S7 byte address = S5 word address × 2
Data Word Conversion Table
| S5 | S7 (STL) | S7 (SCL) | Calculation |
|---|---|---|---|
| A DB10 / L DW 0 | L DB10.DBW 0 | DB10.DBW0 | 0 × 2 = 0 |
| A DB10 / L DW 1 | L DB10.DBW 2 | DB10.DBW2 | 1 × 2 = 2 |
| A DB10 / L DW 2 | L DB10.DBW 4 | DB10.DBW4 | 2 × 2 = 4 |
| A DB10 / L DW 5 | L DB10.DBW 10 | DB10.DBW10 | 5 × 2 = 10 |
| A DB10 / L DW 10 | L DB10.DBW 20 | DB10.DBW20 | 10 × 2 = 20 |
| A DB10 / L DW 50 | L DB10.DBW 100 | DB10.DBW100 | 50 × 2 = 100 |
| A DB10 / L DW 100 | L DB10.DBW 200 | DB10.DBW200 | 100 × 2 = 200 |
| A DB10 / L DW 255 | L DB10.DBW 510 | DB10.DBW510 | 255 × 2 = 510 |
Data Byte Conversion
S5 splits each data word into a left byte (DL) and right byte (DR):
| S5 | S7 | Explanation |
|---|---|---|
| DL 0 (left byte of DW 0) | DB10.DBB 0 | Word 0 × 2 = byte 0 (high byte) |
| DR 0 (right byte of DW 0) | DB10.DBB 1 | Word 0 × 2 + 1 = byte 1 (low byte) |
| DL 5 (left byte of DW 5) | DB10.DBB 10 | Word 5 × 2 = byte 10 |
| DR 5 (right byte of DW 5) | DB10.DBB 11 | Word 5 × 2 + 1 = byte 11 |
Data Bit Conversion — Most Complex
S5 data bits are numbered 0–15 within each data word, where bit 0 is the LSB (rightmost) in the right byte (DR), and bit 15 is the MSB (leftmost) in the left byte (DL).
Conversion rules:
- S5 bits 0–7 (right byte, DR) → S7: DBX [word×2+1].[bit]
- S5 bits 8–15 (left byte, DL) → S7: DBX [word×2].[bit−8]
| S5 | S7 | Calculation |
|---|---|---|
| D 0.0 | DBX 1.0 | Bit 0 → right byte: 0×2+1=1, bit 0 |
| D 0.7 | DBX 1.7 | Bit 7 → right byte: 0×2+1=1, bit 7 |
| D 0.8 | DBX 0.0 | Bit 8 → left byte: 0×2=0, bit 8−8=0 |
| D 0.15 | DBX 0.7 | Bit 15 → left byte: 0×2=0, bit 15−8=7 |
| D 25.0 | DBX 51.0 | Bit 0 → right byte: 25×2+1=51, bit 0 |
| D 25.3 | DBX 51.3 | Bit 3 → right byte: 25×2+1=51, bit 3 |
| D 25.8 | DBX 50.0 | Bit 8 → left byte: 25×2=50, bit 8−8=0 |
| D 25.15 | DBX 50.7 | Bit 15 → left byte: 25×2=50, bit 15−8=7 |
S5 DB Open Command
S5 requires opening a data block before accessing it. S7 includes the DB number in every access.
| S5 | S7 (STL) | S7 (SCL) |
|---|---|---|
| A DB 10 / L DW 5 | L DB10.DBW 10 | temp := DB10.DBW10; |
| A DB 10 / T DW 5 | T DB10.DBW 10 | DB10.DBW10 := temp; |
| C DB 20 / L DW 0 | L DB20.DBW 0 | temp := DB20.DBW0; |
In S5, A DB (Aufschlagen) opens a DB and it stays open until another DB is opened. In S7, every access explicitly names the DB. This eliminates a common S5 bug where the wrong DB is accidentally still open.
Timers
| S5 | S7 (German) | S7 (English) |
|---|---|---|
| T 0 | T 0 | T 0 |
| T 127 | T 127 | T 127 |
Timer numbers are identical, but timer behavior differs between S5 and S7. See our S5 Timer Conversion Guide for details. Use IEC timers (TON, TOF, TP) instead of legacy T timers.
Counters (Zähler)
| S5 (German) | S7 (German) | S7 (English) |
|---|---|---|
| Z 0 | Z 0 | C 0 |
| Z 127 | Z 127 | C 127 |
Counter numbers are identical. The only change is the English mnemonic (Z→C). Use IEC counters (CTU, CTD, CTUD) instead of legacy Z/C counters.
Peripheral I/O (Direct Access)
| S5 (German) | S7 (German) | S7 (English) | Type |
|---|---|---|---|
| PEW 256 | PEW 256 | PIW 256 | Peripheral input word |
| PAW 256 | PAW 256 | PQW 256 | Peripheral output word |
| PEB 256 | PEB 256 | PIB 256 | Peripheral input byte |
| PAB 256 | PAB 256 | PQB 256 | Peripheral output byte |
No conversion needed for the address numbers. Only the English mnemonics change (PE→PI, PA→PQ).
S5 Addresses Without S7 Equivalent
These S5 constructs require manual redesign in S7:
| S5 | Purpose | S7 Approach |
|---|---|---|
| DX (extended DB) | Additional data block type | Use regular DB |
| RS (system data) | System data words | OB start info, SDB, or SFC calls |
| DO FW/DW | Indirect word access via flag word | Pointer addressing with MW/MD |
| B MW (base register) | Indirect addressing base | AR1/AR2 address registers |
| LIR / TIR | Indirect load/transfer via accumulator | L/T with pointer [MD] |
Quick Reference: German ↔ English Mnemonics
| German | English | Meaning |
|---|---|---|
| E | I | Input |
| A | Q | Output |
| M | M | Flag/Memory |
| T | T | Timer |
| Z | C | Counter |
| EB | IB | Input byte |
| EW | IW | Input word |
| AB | QB | Output byte |
| AW | QW | Output word |
| DB | DB | Data block |
| PEW | PIW | Peripheral input word |
| PAW | PQW | Peripheral output word |
PLCcheck Pro generates the complete address mapping table for your entire S5 program automatically — including all data block bit-level conversions. Try it now →
Frequently Asked Questions
Why is the S7 data block address different from S5?
S5 uses word addressing (each DW is one 16-bit word). S7 uses byte addressing (each DBW starts at a byte offset). Since one word = 2 bytes, the S7 address is always S5 address × 2. DW 5 = DBW 10.
What happens if I forget the ×2 conversion?
The program runs but reads the wrong data. DW 5 in S5 is the 6th word (bytes 10–11). If you use DBW 5 in S7, you read bytes 5–6 instead — completely wrong data, no error message. This is the most dangerous migration bug because it is silent.
Do inputs and outputs change between S5 and S7?
No. E 0.0 in S5 is E 0.0 (or I 0.0 in English) in S7. The address numbers are identical. Only the English-language mnemonics differ (E→I, A→Q).
What is the F notation in S5?
F (Flag) is the older S5 notation for memory/markers. F 10.0 = M 10.0, FW 100 = MW 100, FY 20 = MB 20. S7 always uses M.
What about double word (DD) in data blocks?
S5 DD (double data word) = two consecutive DWs. S7 equivalent: DBD at address × 2. Example: DD 10 in S5 = DBD 20 in S7 (DW 10 × 2 = byte 20, reading 4 bytes from byte 20 to 23).
Maintained by PLCcheck.ai. Last update: March 2026. Not affiliated with Siemens AG.
Related Articles
Converting 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
migration-guideCross-Platform PLC Migration: Siemens to Allen-Bradley
What to expect when migrating between Siemens S7 and Allen-Bradley ControlLogix. No automatic conversion exists — this guide covers the manual approach, key differences, and planning.
8 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
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.