PLCcheck

S5→S7 Periphery Address Mapping: PEW/PAW/PEB/PAB Conversion

Reference table for converting S5 peripheral input/output addresses (PEW, PAW, PEB, PAB) to S7 equivalents. Covers analog modules, direct I/O access, and address assignment differences.

·8 min read
S5S7peripheryPEWPAWPEBPABanalogaddress mappingperipheral inputmigration

Diesen Artikel auf Deutsch lesen

S5→S7 Periphery Address Mapping: PEW/PAW/PEB/PAB Conversion

Peripheral addresses (PEW, PAW, PEB, PAB) provide direct access to I/O modules, bypassing the process image. In S5 and S7, the mnemonics and address ranges differ. This reference covers the conversion.

What Are Peripheral Addresses?

Normal I/O access in a PLC reads from the process image — a snapshot of all inputs taken at the beginning of each scan cycle and all outputs written at the end. Peripheral access reads/writes directly from/to the I/O module hardware, outside the process image update cycle.

When peripheral access is used:

Address Mnemonics: S5 vs. S7

German Mnemonics (SIMATIC default)

AccessS5S7Description
Peripheral input bytePEBPEBPeripheral Input Byte (Peripherie-Eingangsbyte)
Peripheral input wordPEWPEWPeripheral Input Word (Peripherie-Eingangswort)
Peripheral input double wordPEDPEDPeripheral Input Double Word
Peripheral output bytePABPABPeripheral Output Byte (Peripherie-Ausgangsbyte)
Peripheral output wordPAWPAWPeripheral Output Word (Peripherie-Ausgangswort)
Peripheral output double wordPADPADPeripheral Output Double Word

International Mnemonics (IEC)

AccessS7 InternationalDescription
Peripheral input bytePIBPeripheral Input Byte
Peripheral input wordPIWPeripheral Input Word
Peripheral input double wordPIDPeripheral Input Double Word
Peripheral output bytePQBPeripheral Output Byte
Peripheral output wordPQWPeripheral Output Word
Peripheral output double wordPQDPeripheral Output Double Word

Key point: The German mnemonics (PEW, PAW) are identical between S5 and S7. The addresses may differ depending on hardware configuration, but the mnemonic itself does not change.

Address Ranges: S5 vs. S7

S5 Address Assignment

In S5, peripheral addresses are fixed by slot position in the rack:

RackSlotAddress Range
0 (Central)0–7PEW/PAW 128–254 (analog typically starts at 128)
1 (Expansion)0–7Depends on configuration

S5 analog modules were typically assigned starting at address 128 (PEW 128 for the first analog input channel).

S7 Address Assignment

In S7, peripheral addresses are configurable in hardware configuration:

Migration implication: S5 address PEW 128 does not automatically become PEW 128 in S7. The address depends on where you configure the analog module in the S7 hardware configuration. You must create an explicit address mapping.

Common Conversion Examples

S5 CodePurposeS7 EquivalentNotes
L PEW 128Read first analog inputL PEW xxxxxx depends on S7 HW config
T PAW 128Write first analog outputT PAW xxxxxx depends on S7 HW config
L PEB 0Read digital input byte directlyL PEB xxxRarely needed in S7 (use process image)

Analog Value Ranges

SystemModule TypeRaw Value Range
S5 (analog)AI moduleVaries by module (often ±2048 or ±512 for old modules)
S7-300/400 (analog)SM 3310–27648 (unipolar) or ±27648 (bipolar)
S7-1200 (analog)AI module0–27648 (unipolar)
S7-1500 (analog)AI module0–27648 (unipolar)

Migration trap: S5 analog modules often had different raw value ranges than S7. When migrating, the analog scaling in the program must be adjusted to match the new module's range. A formula designed for 0–512 will produce wrong results with 0–27648.

Direct Peripheral Access in SCL

In SCL, peripheral access uses the same syntax but with the % prefix for IEC-style addressing:

// Read analog input (German mnemonic)
rawValue := PEW 256;

// Write analog output
PAW 256 := outputValue;

// SCL with IEC addressing
rawValue := %IW256;      // PIW 256
%QW256 := outputValue;   // PQW 256

Best practice on S7-1500: Avoid direct peripheral access when possible. Use the process image (standard I/O access) and configure process image partitions (OB6x) for time-critical I/O instead.

Frequently Asked Questions

Do PEW/PAW addresses change when migrating S5→S7?

The mnemonics stay the same (PEW is PEW in both systems). But the actual address numbers depend on the hardware configuration. In S5, addresses were fixed by slot. In S7, they are configurable. You must map each module's address in the S7 hardware configuration.

When should I use peripheral access instead of process image?

Only when you need to read/write a value outside the normal scan cycle — typically for analog values that must be read at a specific point in the program, or for diagnostic data from intelligent modules. For normal digital I/O, always use the process image.


Map Your Peripheral Addresses Automatically

PLCcheck Pro identifies all peripheral access instructions in your S5 program and generates an address mapping table for your S7 hardware configuration.

Upload S5 code for address mapping → | Complete Address Mapping Reference →

Part of the Address Mapping Reference. Maintained by PLCcheck.ai. 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.