Opening SIMATIC S5 .S5 Files in STEP 5 V7.2: IBH Softec Format Conversion
Field guide for automation engineers who receive a Siemens SIMATIC S5 program file carrying a non-standard .S5 extension instead of the canonical .S5D. The typical symptom: a customer hands over DFBACHER.S5, STEP 5 V7.2 rejects the file on open, and the symbol/comment files appear to be missing. The cause is almost always that the file was written by a third-party tool (most commonly IBH Softec's S5 for Windows) rather than by STEP 5 itself. This article documents the format distinction, the ST.S5D token convention, three recovery procedures, and the symbol/comment loss caveat.
ST.S5D, DB1.S5D, PB1.S5D, FB10.S5D, etc.). A bare .S5 extension that is not a recognized token will not be associated with a program block type and is treated as a foreign or third-party file.1. Overview: SIMATIC S5 File Format Landscape
The SIMATIC S5 family (S5-90U, S5-95U, S5-100U, S5-115U, S5-135U, S5-155U) stores each executable program element as a separate disk file with a strictly typed extension. The on-disk structure is the same on EPROM, on the programmer's hard drive, and on a PC/PG running STEP 5 — it is a flat list of files, not a project archive.
| File token | Content | Block type |
|---|---|---|
ST.S5D |
Sequencer / status block container | Sequence Block (SB) collective |
OBx.S5D |
Organization block (x = block number) | OB |
PBx.S5D |
Program block | PB |
FBx.S5D |
Function block | FB |
SBx.S5D |
Sequence block | SB |
DBx.S5D |
Data block | DB |
FXx.S5D |
Extended function block (FB with extended addressing) | FX |
DXx.S5D |
Extended data block | DX |
Z0.S5D / Z1.S5D
|
Run-time containers / cross-reference data | Internal |
BA.S5D / EA.S5D
|
Startup / ramp-down data | Internal |
*.S5L |
STEP 5 source / text file (LST) | Source listing |
*.SEQ |
STEP 5 sequencer export | Sequence |
The collective ST.S5D file is unique: it is a packed container that holds every SB (sequence block) in the program. The other block types are stored one file per block. A SIMATIC S5 program on disk is therefore a directory of files matching the tokens above.
PB, FB, DB, ST) is the token, and the digits after it are the block number. STEP 5 matches files to PLC block numbers by parsing the token, not by inspecting the file content. A file named DFBACHER.S5 has no parseable token, so STEP 5 cannot associate it with any block type.2. The .S5 vs .S5D File Extension Distinction
STEP 5 V7.2 hard-codes the .S5D extension for its program block files and .S5L for its source / listing files. When the customer supplied a file with extension .S5, the Open dialog filter in STEP 5 does not display it, and even if forced into the project directory, the file manager does not classify it.
There are three plausible origins for an .S5 file:
-
IBH Softec S5 for Windows: the file was created and saved by the third-party IDE. S5 for Windows uses its own internal project representation and may export to
.S5,.S5D, or its native.S5Pproject file format depending on user choice. -
Hand-rename by a third party: someone re-saved the file from another development tool and stripped the token portion (e.g. renamed
PB7.S5DtoPB7.S5). - Documentation fragment: the file is not a program block at all but an extract, dump, or print job that was mislabeled by the originator.
To determine which case applies, inspect the file size, the file header, and the directory it arrived in. A valid S5 program block is normally between 32 and 16 384 bytes and starts with a 5-byte header (block number, block type, library flag, and a checksum byte). A file under 32 bytes or a file with no readable header is almost certainly not a valid block.
3. Why .S5 Files Exist: IBH Softec S5 for Windows
IBH Softec GmbH (Germany) developed S5 for Windows as an alternative IDE for the S5 line. It runs on standard Windows PCs without the proprietary PG hardware and uses an MPI / serial adapter to communicate with the PLC. The S5 for Windows environment stores the program in its own project file (.S5P) and uses auxiliary files with extensions including .S5, .S5L, and .S5D.
The relevant consequence: an S5 for Windows project can export individual blocks, and the export uses extensions that do not always match the STEP 5 token convention. A file with extension .S5 produced by S5 for Windows is, internally, a valid S5 program block — but the surrounding metadata and the choice of extension make it unrecognizable to STEP 5's file manager.
IBH Softec documented the project and block file format on its support pages. The key point for the field engineer: opening a third-party S5 for Windows project file in STEP 5 is not supported by Siemens or by IBH Softec. The two IDEs use different file filters and different block header conventions (S5 for Windows stores additional comment and symbol metadata in a sidecar file).
DFBACHER.S5: the filename has no block-number suffix (x.S5D) and uses the .S5 extension. This is a tell-tale signature of an S5 for Windows export. STEP 5 will not open it directly; you need one of the three recovery procedures in Sections 6–8.4. STEP 5 V7.2 Capabilities and Limitations
STEP 5 V7.2 is the last released version of the original STEP 5 programming package, distributed for Windows 95/98/ME/NT/2000/XP. It supports the full S5 CPU range from S5-90U to S5-155U, includes the S5-DOS toolkit, and provides the AG (Automation Gerät = PLC) online functions for upload/download via the COM port or an MPI adapter.
| Feature | Capability | Notes |
|---|---|---|
Open *.S5D
|
Yes | Default filter |
Open *.S5L
|
Yes | Source / listing |
Open *.S5
|
No | Not in filter list |
Open *.S5P
|
No | S5 for Windows project |
| Edit symbols/comments from a foreign tool | No | Sidecar files are different |
| AG upload via COM (AS511) | Yes | 9600 / 19200 baud, TTY or RS-232 |
| AG upload via MPI | Yes (with PC/MPI cable) | 187.5 kbit/s |
| Read symbol/comment files from PLC | No | Symbol/comment data is not in the PLC; it lives only on the PG |
The single most important row in the table is the last one. The SIMATIC S5 PLC stores only the compiled program and configuration data. Symbol names, symbolic I/O addresses, and program comments are not downloaded to the PLC — they are kept in the PC's project directory only. If the customer did not supply the symbol and comment files alongside the .S5 file, the symbols and comments are gone forever and must be re-entered manually.
5. The ST.S5D Naming Token Convention
STEP 5 identifies a program block file by parsing the filename as TTn.S5D, where TT is the two-letter token and n is the block number. The ST token is special: it is the collective file for sequence blocks (SB). The file is named exactly ST.S5D with no number — every SB block in the program is packed into that single file.
| Token | Parse rule | Example valid filename | Notes |
|---|---|---|---|
ST |
No number, exact match | ST.S5D |
SB collective |
OB |
Number 1–255 | OB1.S5D |
|
PB |
Number 0–255 | PB7.S5D |
|
FB |
Number 0–255 | FB10.S5D |
|
SB |
Number 0–255 | SB2.S5D |
Standalone SBs only |
DB |
Number 1–255 | DB5.S5D |
|
FX |
Number 0–255 | FX20.S5D |
CPU 928/948 only |
DX |
Number 0–255 | DX20.S5D |
CPU 928/948 only |
Anything else — including a file named DFBACHER.S5 or PB7.S5 — is rejected at the file-association layer before the contents are even read. This is why the first recovery procedure (Section 6) starts with a rename.
6. Procedure A: Rename the File to Use the Token
This is the fastest and most common recovery path. It works when the file is a valid program block but lost its token and/or its D during a copy/rename by the originator.
6.1 Prerequisites
- STEP 5 V7.2 installed and licensed.
- A copy of the suspect file in a working directory.
- A hex viewer (e.g. the DOS
DEBUGutility or a freeware hex editor) to confirm the block type.
6.2 Step-by-Step
- Inspect the header. Open the file in a hex editor. Look at byte offset 0x02 — this is the block type code (0x00=OB, 0x01=PB, 0x02=FB, 0x03=DB, 0x04=SB, 0x05=FX, 0x06=DX). Also look at offsets 0x00–0x01: they encode the block number as a 16-bit little-endian integer.
-
Identify the correct token and number. For example, if byte 2 is 0x01 and bytes 0–1 are
07 00, the file is PB7. -
Rename the file. From a Windows command prompt, run:
If the file is an SB collective (byte 2 = 0x04 with no number), rename to:ren DFBACHER.S5 PB7.S5Dren DFBACHER.S5 ST.S5D - Move the file into the STEP 5 project directory. STEP 5 expects all blocks of one program in the same directory; the file manager reads the directory listing and matches tokens on demand.
- Open the project in STEP 5. Use File > Open Project and select the renamed file. STEP 5 will add it to the program overview.
- Verify the block. Right-click the block in the program overview and select Block Properties. The block number, type, length, and checksum should match the expected values. If the checksum is wrong, the file was corrupted in transit.
6.3 Verification
- The block opens in the STEP 5 editor and the LAD/FBD/ST source displays without errors.
- The cross-reference list (Edit > Cross-Reference) shows the block in its expected callsites.
- The block checksums (header byte 4) match the value STEP 5 recomputes on open. A mismatch means the file is corrupted or not a real S5 block.
7. Procedure B: Upload the Program from the S5 PLC
This is the only procedure that recovers both program and configuration when the source file is unusable. It also gives you a definitive answer to the question "is the file a valid S5 block?".
7.1 Prerequisites
- STEP 5 V7.2 with online functions (the standard install includes the AG-Online package).
- Physical connection to the S5 PLC. Two options:
- Serial: PC <--RS-232--> AG via the Siemens AG-S5 cable (TTY/20 mA current loop or RS-232-C, depending on PLC side). The standard setting is 9600 baud, no parity, 8 data bits, 1 stop bit. Some CPUs support 19 200 baud.
- MPI: PC <--USB--> MPI/DP <--MPI--> S5 using a PC-Adapter (USB to MPI/DP) at 187.5 kbit/s.
- The PLC must be in STOP or RUN with password disabled (or password known). Some S5 CPUs require a password for upload; the customer must provide it.
7.2 Step-by-Step
- Set up the connection. In STEP 5, choose File > Online > Set Connection. Select AG-Online and the appropriate interface (COM1/COM2 for serial, or the MPI adapter for MPI).
- Establish the link. Choose File > Online > Connect. STEP 5 will report the PLC type (e.g. AG 115U / CPU 944) and the operating state. If the connect fails, verify the cable pinout, baud rate, and PLC mode selector.
-
Read the program. Choose File > Online > Read PLC to PG. STEP 5 will pull every block (OB, PB, FB, DB, SB, FX, DX) plus the system data and store them in the current project directory with the correct
*.S5Dfilenames. - Verify the upload. Compare the block count with the customer's documentation. Open each FB and confirm the STL source is intact.
7.3 Verification
- The block list in STEP 5 matches the documentation.
- Reading back (Write PG to PLC) and comparing with the source produces no diffs.
- The PLC enters RUN with the new program and the controlled process behaves identically to the previous state.
*.S5L or *.Z0) is a separate PG-side file and must be supplied.8. Procedure C: Acquire IBH Softec S5 for Windows
When the file is known to come from S5 for Windows and renaming does not work, the only path to recover the file with its native symbols and comments is to use the same IDE that wrote it.
8.1 Prerequisites
- License for IBH Softec S5 for Windows. The vendor offers a commercial license and a demo version. The demo version can read project files and view blocks but cannot save or write to the PLC.
- Access to the original project files, including the
.S5Pmaster and any symbol/comment sidecars.
8.2 Step-by-Step
- Install S5 for Windows on a Windows PC (XP / 7 / 10 / 11 in compatibility mode is reported to work for current versions).
- Open the original
.S5Pproject. The IDE will list every block with its name and comment intact. - Export each block to
.S5Dformat (the IDE's Export function). Place the exported files into a STEP 5 project directory. - Open the STEP 5 project. The blocks will be readable; the symbols and comments are recovered from the S5 for Windows sidecar during export, where supported by the export options.
9. Symbol and Comment File Recovery Caveats
The S5 family stores symbols in one of two ways:
-
STEP 5: in a separate symbol file with extension
.Z0(or sometimes.S5Lfor listings). Symbol files live in the PG project directory, not on the PLC. -
S5 for Windows: in a sidecar binary file associated with the project. The S5 for Windows project
.S5Pcontains a compressed symbol table.
If the customer only sent the .S5 file and no symbol file, the symbols and comments are unrecoverable. They must be re-entered either in STEP 5 (Editor > Symbols) or in a new S5 for Windows project.
| Procedure | Code blocks | Symbols | Comments |
|---|---|---|---|
| A — Rename | Recovered (if valid format) | Lost unless sidecar supplied | Lost unless sidecar supplied |
| B — Upload from PLC | Recovered (PLC is source of truth) | Lost | Lost |
| C — S5 for Windows | Recovered | Recovered from project | Recovered from project |
10. Verification and File Integrity Checks
After any recovery procedure, run these checks before trusting the result:
- Header checksum. Reopen the block in STEP 5 and confirm the checksum shown in Block Properties matches the byte at offset 4 in the file. A mismatch indicates corruption.
- Block length sanity. Compare the block length reported by STEP 5 with the file size. Length discrepancy > 16 bytes usually means trailing garbage was appended during a copy operation.
- Cross-reference list. Generate the cross-reference list (Edit > Cross-Reference). Every CALL/JU/JC reference should resolve to an existing block. Unresolved references indicate missing blocks in the recovery set.
- Compile / re-save. Use File > Save Project to force STEP 5 to recompile and rewrite every block. Any block that fails to re-save is corrupted.
- PG-to-PLC round-trip. Connect to a test PLC or a standby CPU, write the project, then read it back and compare. Any diff is a recovery error.
11. Troubleshooting Matrix
| Symptom | Likely cause | Resolution |
|---|---|---|
| STEP 5 does not list the file in the Open dialog | Extension not in filter (.S5 vs .S5D) |
Procedure A: rename to token-based *.S5D
|
| File appears in dialog but cannot be opened | Header byte 2 is outside 0x00–0x06 | Procedure B or C: third-party container |
| Block opens but symbols are empty | Symbol sidecar not supplied | Re-enter symbols or recover from original S5 for Windows project |
| Upload returns "Password required" | S5 CPU password protection active | Request password from customer or reset CPU (clears program) |
| Upload fails at block 5 of 12 | Communication error / parity mismatch | Verify cable, baud rate (9600/19200), parity (none), data bits (8), stop bits (1) |
| Block length differs from file size by >16 bytes | Trailing data appended during copy | Truncate file to length reported by STEP 5 |
| Checksum mismatch on open | File corruption or wrong format | Re-acquire file or use Procedure B |
| STEP 5 reports "Unknown CPU" | PG-to-PLC protocol mismatch | Set correct interface in File > Online > Set Connection |
| S5 for Windows demo will not save | Demo license | Purchase full license, or use STEP 5 to view after export |
12. Quick Reference: Decision Flow
Use this flow to pick the right procedure for any incoming S5 file:
Field Notes
- Always keep an unmodified backup of the customer-supplied
.S5file before any rename or hex edit. The header is the only source of truth for the block type and number. - STEP 5 V7.2 runs fine in a Windows XP virtual machine on a modern PC; the original installer is 16-bit but works under XP mode. Hardware-key (dongle) licenses may not survive a VM.
- For S5-115U and S5-135U/155U CPUs, the
FXandDXblocks are enabled by a setting in the system data; if STEP 5 reports them as "unknown block type", the CPU does not support them. - When the customer has both an S5 for Windows project and a STEP 5 project, prefer the STEP 5 project for maintenance: the symbol/comment files use the canonical format and round-trip cleanly through the PG.
FAQ
Why does STEP 5 V7.2 not open a file named *.S5?
STEP 5 V7.2 filters the Open dialog for *.S5D and *.S5L only. A file with extension .S5 (or any other extension) is not associated with a block type. Inspect the file's first 5 bytes: if byte offset 2 is 0x00–0x06 it is a valid STEP 5 block — rename it to the correct token (OB1.S5D, PB7.S5D, ST.S5D for sequence blocks, etc.) and reopen.
What is the ST.S5D file?
ST.S5D is the collective file for sequence blocks (SB). It is the only STEP 5 block file with no number in the name — every SB in the program is packed into this single file. If your customer sent a file that opens as a list of SBs, it was almost certainly named ST.S5D originally.
Can I open a S5 for Windows project file (.S5P) in STEP 5?
No. The .S5P project file format is proprietary to IBH Softec's S5 for Windows and is not readable by Siemens STEP 5. To recover the project, either open it in S5 for Windows and export to *.S5D, or upload the program directly from the S5 PLC using STEP 5's File > Online > Read PLC to PG.
Why are the symbols empty after I upload the program from the PLC?
SIMATIC S5 CPUs store compiled code only — symbols, symbolic I/O names, and program comments are kept in the PC's project directory and are never downloaded. If the customer did not supply the symbol file (*.Z0 for STEP 5 or the sidecar inside the S5 for Windows .S5P), the symbols must be re-entered manually.
Will renaming DFBACHER.S5 to PB7.S5D work for an unknown project?
Only if the file is a valid PB7. The rename procedure relies on hex-inspecting the header (byte offset 2 = 0x01 for PB, bytes 0–1 = block number). If the header bytes do not match, the file is not a STEP 5 program block and renaming will not help — use the upload-from-PLC procedure (Procedure B) or acquire a copy of S5 for Windows (Procedure C).