Problem Description
A Siemens S7-400 station with an AS-i Link Advanced module (order number 6GK1 415-2BA20) on PROFIBUS-DP exhibits a digital I/O address shift after the Adopt Actual → Desired (German: Ist → Soll übernehmen) command is executed in the AS-i Master diagnostics dialog. The configuration that was downloaded into the CPU still maps slave 1A to input byte 801, but the re-uploaded hardware configuration returns slave 1A at input byte 800 with slave 1B shifted to 816. The PLC program continues to operate against the addresses that were downloaded, so a write to output 1A physically energises output 3A — a silent, dangerous mapping error that can only be detected by visual inspection of the valve manifold or by cross-referencing the AS-i diagnostic frame.
The affected stack is:
- CPU: SIMATIC S7-400 (any 41x / 416 / 417 / 41xH)
- DP Master: PROFIBUS interface of the S7-400 (e.g.
6GK7 443-1EX11) - DP/AS-i Gateway: DP/AS-i Link Advanced 6GK1 415-2BA20, firmware V2.1
- Engineering: STEP 7 V5.4 + SP4 (or earlier SP)
- Slaves: AS-i A/B slaves on two AS-i lines per gateway (1M = Line 1, 2M = Line 2)
The bus cycle appears healthy (no DP diagnostics, no AS-i CER code 0x0F / 0x1F), which makes the fault particularly misleading.
Observed Symptom: Download vs. Upload Address Map
The two tables below are taken from a real session. The downloaded map reflects what the project was compiled to ship. The uploaded map is what HW Config → Station → Upload to PG reads back from the CPU after Adopt Actual → Desired has been triggered. Address bytes are decimals; bit offsets are added in the editor.
Downloaded configuration (intended)
| AS-i addr. | Module | I address | Q address | ID2 / ID1 | Code |
|---|---|---|---|---|---|
| 1M (Line 1) | DP/AS-i Link Advanced | 800..831 | 800..831 | — | — |
| 2M (Line 2) | DP/AS-i Link Advanced | 832..863 | 832..863 | — | — |
| 1A | AS-i A/B slave | 801.0..801.3 | 801.0..801.3 | 7.A.7 / 7 | 7 |
| 1B | AS-i A/B slave | 801.4..801.7 | 801.4..801.7 | 7.A.7 / F | 7 |
| 2A | AS-i A/B slave | 802.0..802.3 | 802.0..802.3 | 7.A.7 / 7 | 7 |
| 2B | AS-i A/B slave (Spare) | 802.4..802.7 | 802.4..802.7 | 7.A.7 / F | 7 |
| 3A | AS-i A/B slave | 803.0..803.3 | 803.0..803.3 | 7.A.7 / 7 | 7 |
| 3B | AS-i A/B slave (Spare) | 803.4..803.7 | 803.4..803.7 | 7.A.7 / F | 7 |
| … | … | … | … | … | … |
| 10A | AS-i A/B slave | 810.0..810.3 | 810.0..810.3 | 7.A.7 / 7 | 7 |
| 10B | AS-i A/B slave | 810.4..810.7 | 810.4..810.7 | 7.A.7 / F | 7 |
Uploaded configuration after Adopt Actual → Desired
| AS-i addr. | Module | I address | Q address | ID2 / ID1 | Code | Delta |
|---|---|---|---|---|---|---|
| 1A | AS-i A/B slave | 800.0..800.3 | 800.0..800.3 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 1B | AS-i A/B slave | 816.0..816.3 | 816.0..816.3 | 7.A.7 / F | 7 | Jumped +15 bytes |
| 2A | AS-i A/B slave | 801.4..801.7 | 801.4..801.7 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 2B | AS-i A/B slave (Spare) | 817.4..817.7 | 817.4..817.7 | 7.A.7 / F | 7 | Jumped +15 bytes |
| 3A | AS-i A/B slave | 801.0..803.3 | 801.0..803.3 | 7.A.7 / 7 | 7 | Range expanded |
| 3B | AS-i A/B slave (Spare) | 817.0..817.3 | 817.0..817.3 | 7.A.7 / F | 7 | Jumped +14 bytes |
| 4A | AS-i A/B slave | 802.4..802.7 | 802.4..802.7 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 5A | AS-i A/B slave | 802.0..802.3 | 802.0..802.3 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 6A | AS-i A/B slave | 803.4..803.7 | 803.4..803.7 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 7A | AS-i A/B slave | 803.0..803.3 | 803.0..803.3 | 7.A.7 / 7 | 7 | OK |
| 8A | AS-i A/B slave | 804.4..804.7 | 804.4..804.7 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 9A | AS-i A/B slave | 804.0..804.3 | 804.0..804.3 | 7.A.7 / 7 | 7 | Shifted −1 byte |
| 10A | AS-i A/B slave | 805.4..805.7 | 805.4..805.7 | 7.A.7 / 7 | 7 | Shifted −1 byte |
The mapping is no longer monotonic. Outputs now collide: writing PQB 801 energises slaves 1A and 3A simultaneously because the B-slaves have been re-allocated to the upper 816..818 byte block.
Root Cause: STEP 7 V5.4 Object Manager Defect
Siemens documented a limiting condition in the STEP 7 Object Manager used to build the DP/AS-i Link Advanced slot frame. The Object Manager builds the AS-i slot list in two passes: once during the initial Download to Target System (where it uses the project source) and once during any subsequent Upload from Target System (where it re-interprets the AS-i master’s live slave list). When spare slaves are configured but not physically present, the live list triggers the Adopt Actual → Desired workflow, which causes the second pass to reassign the I/O offset table. With STEP 7 V5.4 base, SP1, SP2, SP3 and SP4 the slot offset for AS-i Line 1A is computed incorrectly whenever the upper B-slave row of the previous line was previously marked as Spare in the project.
This is purely an engineering-tool defect — the PLC program stored in the CPU retains the original, correct mapping until the project is rebuilt against the uploaded (corrupted) configuration and re-downloaded. The AS-i master firmware V2.1 itself is not at fault.
Why the Project Code Does Not Match the Uploaded Config
- Download path. STEP 7 compiles the HW Config into the System Data Blocks (SDB) of the project and pushes them to the CPU. The CPU’s SDBs reflect the engineering intent (table 1).
- Spare-slave alarm. Because the project declares spare B-slaves that are not physically connected, the AS-i master raises System Fault (SF) and Configuration Error (CER) on the Link Advanced front panel.
- Adopt Actual → Desired. Selecting this button rewrites the AS-i master’s internal desired configuration (LCS list 1) to match the actual configuration (LCS list 0). It does not touch the CPU’s SDBs.
- Upload path. When HW Config re-reads the station from the CPU it queries the AS-i master for the new LCS list 1. The corrupted Object Manager code interprets the reordered LCS list and re-assigns offsets incorrectly, producing the table 2 mapping.
- Net effect. The CPU continues to execute the original program against the original offsets, but the engineering view (uploaded HW Config) shows a different map. Re-downloading the uploaded project would propagate the corruption into the running CPU.
Solution
Step 1 — Capture the working configuration
- In SIMATIC Manager, mark the S7-400 station and choose PLC → Save Service Data (Snapshot). Save the ZIP to a project archive directory.
- Export the AS-i line diagnostics with AS-i Master → Diagnostics → Save as CSV so the LCS list 0 (actual) and LCS list 1 (desired) of each line are recorded.
- Do not save the uploaded HW Config — it is contaminated.
Step 2 — Install STEP 7 V5.4 Service Pack 5
- Close SIMATIC Manager and any STEP 7 add-ins.
- Run the installer for STEP 7 V5.4 SP5 (delivered as
STEP7_V54_SP5.exe). The SP requires administrator rights and a clean registry snapshot. Existing projects are preserved. - Reboot. Verify Help → About → Installed Software shows STEP 7 V5.4 + SP5 / K5.4.5.0.
Step 3 — Recompile the HW Config
- Open the station in HW Config on the patched tool.
- Without changing any slot or address, choose Station → Consistency Check then Save and Compile. The rebuilt SDBs now contain the fixed Object Manager code paths.
- Download to the target CPU. Do not first perform Upload from Target — start from the engineering source.
Step 4 — Resolve the SF / CER alarms correctly
Instead of running Adopt Actual → Desired against a configuration that contains spares, choose one of the two supported strategies:
| Strategy | When to use | Procedure |
|---|---|---|
| Remove spares from HW Config | Spare slaves will never be energised during commissioning | Delete the spare B-slave rows in HW Config, recompile, download. The AS-i master then reports project OK with no SF/CER. |
| Use Configuration in Expanded Mode on the AS-i master | Spare slaves will be added later without a CPU stop | In HW Config, double-click the AS-i master, Configuration tab, enable Configuration allowed in expanded mode. This permits the AS-i master to accept the live list and continue without alarming. |
Step 5 — Verification (mandatory)
- Open a watch table with VAT_1 containing all configured Q addresses from byte 800 onward, e.g.:
// Watch table — force one output per AS-i B-slave row QW 800 // Line 1A area, bit pattern 0x0001 — should light Slave 1A QW 802 // Line 2A area, bit pattern 0x0001 — should light Slave 2A QW 803 // Line 3A area QW 804 // Line 4A area … QW 810 // Line 10A area - Set the CPU to STOP, force each value to
0x0001, switch to RUN-P, and visually verify on the valve manifold that only the corresponding solenoid LED lights. - Re-upload HW Config and confirm byte-for-byte parity with table 1.
Verification Matrix
| Check | Tool | Expected result | Pass criterion |
|---|---|---|---|
| STEP 7 build | SIMATIC Manager → Help → About | K5.4.5.0 or later | Build ≥ K5.4.5.0 |
| SF LED on Link Advanced | Front panel | Off | No system fault |
| CER LED on Link Advanced | Front panel | Off | No configuration error |
| Uploaded HW Config slot table | HW Config | Matches downloaded table 1 | Each row byte-equal |
| Watch table force | VAT_1 with QW 800..810 | One valve per force | 1:1 mapping observed |
| Online → Accessible Nodes | STEP 7 PG interface | All 2 AS-i lines visible | No diagnostic interrupt pending |
Edge Cases and Field Notes
- Mixed firmware on the Link Advanced. The defect is in the STEP 7 Object Manager, not in firmware V2.1. Sites that have the AS-i master firmware at V1.x or V2.0 still see the symptom, because the engineering tool is the source of the corrupted slot list.
- More than two AS-i lines. The 6GK1 415-2BA20 only supports two AS-i lines, but the symptom also occurs if the project accidentally declares a third "ghost" line during slot reassignment. Remove the ghost line in HW Config before recompiling.
- Migration to TIA Portal. The DP/AS-i Link Advanced is also represented in the TIA Portal V13+ hardware catalog under Configuring an AS-i master and slave device. Sites planning a migration should re-import the S7-400 project into TIA Portal only after the STEP 7 V5.4 SP5 patch is installed, otherwise the corrupted slot table is carried over.
- S7-400H redundant CPUs. Both CPUs must be patched to the same STEP 7 version. Inconsistency between H-CPU engineering stations has been observed to introduce an additional 1-byte offset during SDB resynchronisation.
- CPU 410 vs. S7-400 classic. The SIMATIC S7-400 CPU 410 (process automation) requires STEP 7 V5.4 SP5 or V5.5; V5.4 base refuses to compile the CPU 410 rack.
Why You Should Never Adopt the Uploaded Configuration
A common temptation after seeing the corrupted uploaded view is to "make it match" by editing the project to match the uploaded table. Do not do this: it permanently bakes the bug into the project source. The upload view is wrong; the engineering source is right (provided STEP 7 V5.4 SP5 is installed and the project was last saved in a clean state). Always debug from the engineering source downward — never from the upload upward.
Related Manuals and References
- SIMATIC DP/AS-i Link Advanced (6GK1 415-2BA20) product page
- STEP 7 V5.4 Service Pack 5 download entry
- Configuring an AS-i master and slave device (TIA Portal manual)
- SIMATIC S7-400 Automation System manual
- AS-Interface System Description
Frequently Asked Questions
Does the DP/AS-i Link Advanced firmware V2.1 cause the address mismatch?
No. The defect is in the STEP 7 V5.4 Object Manager (build K5.4.4.0 and earlier). The AS-i master firmware V2.1 simply stores the LCS lists exactly as STEP 7 writes them; reinstalling STEP 7 V5.4 SP5 corrects the issue without touching the master.
After Adopt Actual → Desired the front-panel SF LED stays off but the output still maps incorrectly — is the fix still needed?
Yes. The CPU continues to run against the original SDB mapping even after the master’s desired list is rewritten. The bug is invisible until somebody re-uploads HW Config and re-downloads it, at which point the corrupted offsets become the live mapping. Patch STEP 7 before any further download.
Can I just edit the I/O addresses in the uploaded project to match the engineering source?
You can, but it is a one-shot workaround that does not fix the underlying Object Manager defect. The next slot re-numbering will reintroduce the corruption. Install STEP 7 V5.4 SP5 and recompile the project from the engineering source.
Is the AS-i A/B slave with ID code "7" and ID2 "A" the cause of the swap?
The mix of code 7 (digital 4I/4O with B-address capability) and the spare-flagged B-slaves is the trigger for the broken second pass of the Object Manager. Disabling the spare rows in HW Config eliminates the trigger, but it does not remove the tool defect — SP5 is still recommended.
Does migrating to TIA Portal V16 eliminate the problem?
Yes. TIA Portal V13 and later use a different AS-i slot builder and do not exhibit the V5.4 SP4-era behaviour. Re-import the STEP 7 V5.4 SP5-cleaned station into TIA Portal to avoid carrying the corrupted SDBs forward.