PLCcheck

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.

·14 min read
S5S7addressmappingDWDBWconversionI/OSiemens

Diesen Artikel auf Deutsch lesen

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.0E 0.0I 0.0Input bit
E 3.7E 3.7I 3.7Input bit
EB 0EB 0IB 0Input byte
EW 0EW 0IW 0Input word (bytes 0–1)
EW 4EW 4IW 4Input word (bytes 4–5)
ED 0ED 0ID 0Input 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.0A 4.0Q 4.0Output bit
A 5.3A 5.3Q 5.3Output bit
AB 4AB 4QB 4Output byte
AW 4AW 4QW 4Output word
AD 8AD 8QD 8Output 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).

S5S5 (old notation)S7Type
M 10.0F 10.0M 10.0Flag bit
MB 20FY 20MB 20Flag byte
MW 100FW 100MW 100Flag word
MD 200MD 200Flag 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

S5S7 (STL)S7 (SCL)Calculation
A DB10 / L DW 0L DB10.DBW 0DB10.DBW00 × 2 = 0
A DB10 / L DW 1L DB10.DBW 2DB10.DBW21 × 2 = 2
A DB10 / L DW 2L DB10.DBW 4DB10.DBW42 × 2 = 4
A DB10 / L DW 5L DB10.DBW 10DB10.DBW105 × 2 = 10
A DB10 / L DW 10L DB10.DBW 20DB10.DBW2010 × 2 = 20
A DB10 / L DW 50L DB10.DBW 100DB10.DBW10050 × 2 = 100
A DB10 / L DW 100L DB10.DBW 200DB10.DBW200100 × 2 = 200
A DB10 / L DW 255L DB10.DBW 510DB10.DBW510255 × 2 = 510

Data Byte Conversion

S5 splits each data word into a left byte (DL) and right byte (DR):

S5S7Explanation
DL 0 (left byte of DW 0)DB10.DBB 0Word 0 × 2 = byte 0 (high byte)
DR 0 (right byte of DW 0)DB10.DBB 1Word 0 × 2 + 1 = byte 1 (low byte)
DL 5 (left byte of DW 5)DB10.DBB 10Word 5 × 2 = byte 10
DR 5 (right byte of DW 5)DB10.DBB 11Word 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:

S5S7Calculation
D 0.0DBX 1.0Bit 0 → right byte: 0×2+1=1, bit 0
D 0.7DBX 1.7Bit 7 → right byte: 0×2+1=1, bit 7
D 0.8DBX 0.0Bit 8 → left byte: 0×2=0, bit 8−8=0
D 0.15DBX 0.7Bit 15 → left byte: 0×2=0, bit 15−8=7
D 25.0DBX 51.0Bit 0 → right byte: 25×2+1=51, bit 0
D 25.3DBX 51.3Bit 3 → right byte: 25×2+1=51, bit 3
D 25.8DBX 50.0Bit 8 → left byte: 25×2=50, bit 8−8=0
D 25.15DBX 50.7Bit 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.

S5S7 (STL)S7 (SCL)
A DB 10 / L DW 5L DB10.DBW 10temp := DB10.DBW10;
A DB 10 / T DW 5T DB10.DBW 10DB10.DBW10 := temp;
C DB 20 / L DW 0L DB20.DBW 0temp := 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

S5S7 (German)S7 (English)
T 0T 0T 0
T 127T 127T 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 0Z 0C 0
Z 127Z 127C 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 256PEW 256PIW 256Peripheral input word
PAW 256PAW 256PQW 256Peripheral output word
PEB 256PEB 256PIB 256Peripheral input byte
PAB 256PAB 256PQB 256Peripheral 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:

S5PurposeS7 Approach
DX (extended DB)Additional data block typeUse regular DB
RS (system data)System data wordsOB start info, SDB, or SFC calls
DO FW/DWIndirect word access via flag wordPointer addressing with MW/MD
B MW (base register)Indirect addressing baseAR1/AR2 address registers
LIR / TIRIndirect load/transfer via accumulatorL/T with pointer [MD]

Quick Reference: German ↔ English Mnemonics

GermanEnglishMeaning
EIInput
AQOutput
MMFlag/Memory
TTTimer
ZCCounter
EBIBInput byte
EWIWInput word
ABQBOutput byte
AWQWOutput word
DBDBData block
PEWPIWPeripheral input word
PAWPQWPeripheral 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

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.