Resolving PCS7 Invalid Download State Error After AS Readback

David Krause14 min read
Process ControlSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Overview

Engineers running Siemens PCS 7 V6.1 + SP4 on top of STEP 7 V5.4 / V5.5 occasionally encounter the following class of error when attempting a changes-only download from the ES (Engineering Station) to the AS (Automation Station, e.g. S7-400 CPU 417):

Invalid download state (Production_I31 [FC697] calls DB801).
Please check the offline block folder and recompile the charts.

Twenty-one (21) events can appear simultaneously, all referencing the same instance DB but different function blocks. The error appears immediately after a CFC (Continuous Function Chart) compile followed by Download changes to AS, but only when an online → offline readback had previously been performed on the same target. Standard recovery actions (full compile, reorganization, check block consistency) typically do not clear the condition, and the only final resolution confirmed in field service is a complete download to the AS — a step that requires a production stop and is therefore the least desirable outcome.

This reference compiles the working procedures documented by Siemens product support and field service engineers for restoring the AS download state without, where possible, a full download.

Error Message Anatomy

The diagnostic string contains three distinct pieces of information. Treat each as a separate field during root-cause analysis:

Segment Example Value Engineering Meaning
Error class Invalid download state The offline S7 program on the ES is no longer consistent with the online program on the AS in a way that allows a delta download.
Calling block Production_I31 [FC697] The CFC-generated function FC697 in chart "Production_I31" references an instance that is not present in the offline block container with a matching time stamp / interface signature.
Called block DB801 The referenced instance data block is missing, has a different interface, or its FCxx calls were rewritten by the last readback / writeback cycle.

When 21 events share the same instance DB but list different FCs, the data block is the root of the inconsistency and the FCs are victims. Do not try to fix the FCs — fix the DB and re-run the CFC compile.

Root Cause Analysis

The error is generated by the PCS 7 CFC / SFC download manager when it compares the block container computed by the CFC compiler against the block container currently online in the target AS. The comparison fails because of one of three underlying conditions:

  1. Time-stamp divergence caused by readback. An online → offline readback re-stamps the offline blocks with the time stamps from the AS. A subsequent chart edit (e.g. changing the op_lim block limit) and a changes compile produces a new offline set that no longer matches the AS. The download manager detects the divergence and refuses to start a delta download.
  2. Missing offline block folder for instance DBs. After readback, certain instance DBs (especially those generated for shared data pools) end up in the online view but were never written back to the S7 program blocks folder of the ES. The next compile does not regenerate them because the CFC source does not list them as an output block of any chart.
  3. OCM (Operator Control and Monitoring) parameter drift. When the CFC uses operator-controllable blocks and the OS is not compiled, the OCM interface signature is computed against the latest CFC compile but the AS still has the older signature. The download manager treats this as "inconsistent" and rejects the delta download.

The "check offline block folder and recompile the charts" hint is a generic instruction — it only works when the missing offline blocks can be regenerated from the chart source. When the source no longer matches what is on the AS, regeneration will not solve the problem.

Preconditions That Reproduce the Error

The combination of operations that reliably triggers the error on PCS 7 V6.1 SP4 is:

  1. An online → offline readback of the AS to the ES (e.g. for archiving the current runtime program).
  2. One or more chart edits in the offline project (any CFC block parameter change — even something as small as the limit of an op_lim block).
  3. A changes compile of the S7 program.
  4. An attempt to download changes to the AS.
Important: Readback does not corrupt the AS. It only modifies the offline view on the ES. The error is therefore recoverable in the ES, but the AS state must be preserved during recovery to avoid losing runtime values, archives, and tuning data.

Diagnostic Sequence

Before applying any corrective action, capture the state of both ES and AS so the procedure can be reversed if it makes the situation worse.

  1. Archive the ES project. Use SIMATIC Manager → File → Archive. The archive is the baseline for any rollback.
  2. Snapshot the AS online program. From the ES, perform PLC → Upload Station to PG to a temporary S7 project. This is the runtime program the AS is actually executing.
  3. List the failing block pair. From the download log, capture every (FC, DB) pair reported in the 21 events. Sort by DB — they will all collapse onto one or two instance DBs.
  4. Compare time stamps. Open the offline S7 program blocks folder and the online view side by side. The instance DB reported in the error will have an online time stamp that does not match the offline time stamp computed by the last changes compile.
  5. Verify the call chain. Open the affected FCs in LAD/FBD/ST editor. Right-click → Call Structure confirms whether the FC actually references the offending DB or whether the call is indirect through a multi-instance DB.

Resolution Path 1 — Download the DB Directly in STEP 7 Mode

This is the lightest-touch workaround and is the recommended first attempt because it does not require any chart modification.

  1. In SIMATIC Manager, right-click the AS (e.g. AS01) and choose Object Properties → Operating Mode. Switch the project from PCS 7 mode to STEP 7 mode.
    In STEP 7 mode the CFC Download changes button is disabled, but you can download individual blocks through the standard STEP 7 download dialog.
  2. Open the offline S7 program and locate the instance DB reported in the error (e.g. DB801). Open the block container.
  3. Select the DB. Choose PLC → Download. Confirm any prompts. The DB is now online with the offline-compiled interface and time stamp.
  4. Repeat for any other instance DBs reported in the 21 events.
  5. Switch the AS back to PCS 7 mode: right-click the AS → Object Properties → Operating Mode → PCS 7 mode.
  6. Run a CFC changes compile for the S7 program. Do not run a full compile — a full compile will rewrite the DB and re-introduce the divergence.
  7. Attempt the Download changes to AS again. The delta should now be accepted.

If the AS responds that the offline and online versions are still different and forces a full download, the DB in question is a pool data block (DB with a large declared area of INTs / REALs used as shared process memory). Pool DBs cannot be delta-downloaded even after the procedure above; jump to Resolution Path 4.

Resolution Path 2 — Clean Up the @ System Charts

System charts are CFC charts whose names start with the @ character (e.g. @STATE, @ALC, @MOD_…). They are generated automatically by PCS 7 to host module drivers, alarm-control logic, and lifecycle blocks. After a readback these charts can hold references to blocks that are no longer part of the compile output.

  1. In the plant view, expand S7 Program / Charts and sort by name. Identify all charts beginning with "@".
  2. Right-click each @ chart → Delete. The charts will be regenerated by the next compile.
  3. Open the CFC editor and choose Options → Chart Compile. In the compile dialog, enable Generate module drivers and Generate SCL source.
  4. Run the compile and inspect the diagnostic log. The previously failing FC/DB pairs should now either be resolved or reduce to a small set.
  5. Retry the Download changes operation.
Only delete @ charts that were generated by the standard PCS 7 drivers. Custom @ charts added by third-party libraries should be backed up before deletion.

Resolution Path 3 — Block Replacement Strategy

When a single FB / FC persistently fails to download even after Path 1 and Path 2, the block itself is the holder of the stale reference. Replace it with a freshly inserted instance from the PCS 7 master data library.

  1. Identify the block type from the block header (e.g. CTRL_PID, OP_LIM, MOT_SPEED, FB1869). Confirm it against the PCS 7 library catalog.
  2. In the CFC, insert a new instance of the same block type from the library at a free chart position.
  3. Reconnect all signal lines, parameters, and OCM connections from the old instance to the new instance. Use the CFC Interconnection dialog to copy the full signal list.
  4. Delete the old instance block. Record the original name and comment for restoration after the procedure.
  5. Compile the AS and attempt the changes download.
  6. If the download succeeds, rename the new instance to the original block name and reapply the original comment. Recompile the OS if the block has OCM parameters and download the OS changes.

This procedure preserves the signal topology while forcing the compiler to regenerate the FC / DB from a known-clean source.

Resolution Path 4 — Full Download Recovery

If none of the above restores a valid delta-download state, the only path confirmed by Siemens product support is a full download. The procedure requires a plant stop; the duration depends on program size and CPU type.

  1. Schedule the plant stop. For an S7-400 CPU 417-4 with a mid-sized PCS 7 program (≈ 300 CFCs, ≈ 6,000 blocks), allow 30–60 minutes of stop time plus 60 minutes of buffer.
  2. Take a final archive of the ES project and a final upload of the AS to a temporary S7 project.
  3. Put the process in a safe state. Force all closed-loop controllers to manual, set outputs to safe values, and stop all drives.
  4. Stop the CPU: PLC → Operating Mode → Stop. Verify the STOP LED on the CPU.
  5. Perform a Memory Reset of the CPU so the receive area is clean. PLC → Diagnostics/Setting → Clear/Reset.
  6. From SIMATIC Manager, select the AS and choose PLC → Download. Confirm that the dialog reads Download to Target System — Complete Download rather than "changes only".
  7. After download, switch the CPU back to RUN. Watch the diagnostic buffer for SF / BF errors and confirm the process image is updating.
  8. Re-run the OS download to synchronize the operator screens with the freshly compiled program.

The full download wipes all retentive M / DB areas that are not configured as non-volatile. Document which tags need to be re-initialized by the operator before commissioning resumes.

Verification After Fix

After any of the four paths above, verify that the download state is truly consistent:

  1. In SIMATIC Manager, choose PLC → Compare Online / Offline. The result must be reported as Identical for both the S7 program and the S7 connections.
  2. Open the diagnostic buffer of the CPU (PLC → Diagnostics/Setting → Diagnostic Buffer). Confirm that no entry with event ID 0x03xx (STOP / startup failure) or 0x0Bxx (communication errors) appears in the last hour.
  3. From the CFC chart, perform a Download → Changes Only test. The dialog must report "No download required" or "Delta available" rather than "Invalid download state".
  4. If operator stations are involved, perform an OS download and confirm the runtime system starts without red banner alarms for missing block icons.
  5. Repeat the readback on a test AS (PLCSIM or a backup CPU) and run the same download cycle to confirm the issue does not reproduce.

Prevention and Best Practices

Practice Rationale
Avoid readback on a production AS unless the project has been baselined immediately afterwards. Readback re-stamps offline blocks and is the most common precursor to this class of error.
Treat the ES project as a single source of truth. Never edit both ES and AS in parallel. Divergent edits are the second most common cause of "invalid download state".
Use the PCS 7 version control (VC) tool to check blocks in and out. The "VC lock" prevents two engineers from editing the same block in parallel. Eliminates the silent divergence that readback can mask.
Always perform the OS compile and the AS compile from the same chart source within the same change window. Asynchronous OS / AS compilation is a known trigger for OCM signature drift.
Test every change on PLCSIM or a test AS before applying it to the production AS. The error reproduces in simulation, so test cycles can catch it before a plant stop is needed.
Maintain a rolling archive of the last three ES states and the matching AS uploads. A matching AS upload is the fastest way to recover when the download state cannot be repaired in place.

Fault-Code and Event-ID Cross-Reference

The "invalid download state" text is generated client-side by the CFC download manager. The S7-400 diagnostic buffer usually does not receive an event entry for it. However, during and after a full download the following CPU event IDs may appear in the diagnostic buffer; the table shows which entries are expected and which indicate residual trouble.

Event ID (hex) Meaning Expected after fix?
0x1155 STOP due to STOP switch / PG stop Yes — only during the planned full download.
0x4300 Startup OB100 executed Yes — warm restart after full download.
0x4301 Restart OB101 executed Yes — if the CPU was configured for hot restart.
0x4542 STOP because of missing / faulty OB No — indicates that the compile output did not contain a required OB.
0x49xx Communication error / DP slave failure No — investigate the DP / PROFINET topology before resuming operation.
0x0B31 IO redundancy loss No — check the H-station configuration.

Always clear the diagnostic buffer (PLC → Diagnostics/Setting → Clear Diagnostic Buffer) immediately before applying any of the resolution paths so that post-fix events can be unambiguously attributed to the new download.

Edge Cases and Field-Proven Caveats

  • PLCSIM substitution. Some engineers have been able to restore the delta-download state by compiling + downloading the entire program to PLCSIM on the same ES, then re-attempting the AS download. PLCSIM accepts the full program even when the real AS refuses, and the side effect is that the ES write-back is rewound to a state the download manager accepts. Treat this as a recovery of last resort before scheduling a full download.
  • H-system asymmetry. On S7-400H stations, the invalid download state can appear on the standby CPU only. Always retry the download with the CPU pair synchronized (PLC → Operating Mode → Switch to Standby-Redundant) before declaring the error a true inconsistency.
  • Pool DBs. Shared instance DBs that act as inter-chart memory (often numbered above 1000 in large plants) cannot be delta-downloaded. They require a full AS download if their interface or length has changed.
  • Firmware / CFC library mismatch. PCS 7 V6.1 SP4 with CFC library V6.1 SP3 is a known bad combination. Confirm that the CFC library and the master data library are at the same service-pack level before opening a service request.
  • Sequential @ chart deletion. Deleting all @ charts at once can break the AS if a custom library registered non-standard @ charts. Delete in groups (drivers, ALC, then lifecycle) and run a compile after each group.

Commissioning Checklist After a Full Download

  1. Confirm CPU is in RUN with no SF / BF LEDs lit.
  2. Open the S7 program and verify the online / offline comparison reports Identical.
  3. Re-initialize all non-retentive tuning constants from the operator station.
  4. Walk the operator through the required manual reset of any alarm that was latched at the time of stop.
  5. Verify that the OS server has the current OS image: WinCC Explorer → Server → Computer → Properties → Picture Tree matches the ES export.
  6. Re-arm all protective interlocks (ESD, fire & gas) only after process conditions are confirmed safe.
  7. Sign the change record and store the ES archive and the AS upload together in the change-management system.

FAQ

What does the message "Invalid download state (FCxxx calls DByyy)" actually mean?

The CFC download manager detected that the offline S7 program on the Engineering Station no longer matches the online program on the Automation Station in a way that allows a delta download. The FC/DB pair is named in the message so you can identify the single instance data block whose interface is the root cause; the FC is the victim block, not the cause.

Will a full compile and check consistency fix the problem on PCS 7 V6.1 SP4?

Usually not. The "check offline block folder and recompile the charts" hint is generic; it only resolves the error when the missing offline blocks can be regenerated from the chart source. When the divergence was introduced by a previous readback, the source no longer matches the AS and a full download is the only definitive fix.

Can I avoid the full download by switching the AS to STEP 7 mode?

Yes for the first attempt. In STEP 7 mode, download the affected instance DB (e.g. DB801) directly through PLC → Download, then switch back to PCS 7 mode and retry Download changes. The procedure fails for pool data blocks, which always require a full AS download.

Is it safe to delete the @ system charts in the CFC?

Yes for the charts generated by the standard PCS 7 drivers (ALC, MOD_…, STATE, RUNTIME). Back up any custom @ charts from third-party libraries before deletion, because they are not regenerated by the next compile. After deletion, run a compile with "Generate module drivers" enabled.

Does performing a readback on the AS always lead to this error?

No. Readback is safe as long as no chart is edited afterwards. The error is triggered by the sequence: readback → chart edit → changes compile → changes download. The most reliable prevention is to archive the project and the AS upload together immediately after every readback.

Back to blog