Problem Overview
A field engineer reports the following reproducible behavior on a SIMATIC S7-300 CPU 313C programmed with TIA Portal V13 (no Service Pack):
- The original project backup is lost; only the program resident on the PLC remains as the reference.
- A new project is created and the CPU is brought online.
- After the download, Go online succeeds, but the Online/Offline comparison reports differences in every block (OB1, FB, FC, DB).
- Monitoring is blocked; TIA Portal refuses to display the online view because the blocks are flagged as different.
- The HW configuration message "PC HW configuration has changed but has not been compiled nor charged. Diagnosis may be inconsistent or erroneously displayed" appears in the lower status bar with timestamp
17/04/2016 12:35:38.
This article is a field-proven procedure for separating the real failure modes from the cosmetic ones, and for restoring a clean Online/Offline state without losing the runtime program.
Affected Components and Versions
| Component | Value / Version | Notes |
|---|---|---|
| Engineering framework | TIA Portal V13 (Basic / Comfort / Professional) | Bug-prone compare logic for S7-300 targets |
| Recommended framework | TIA Portal V13 SP1 Update 8 (or later) | Corrects timestamp and partial download mismatches |
| PLC family | SIMATIC S7-300 | Limited symbolic information online |
| CPU | CPU 313C (6ES7 313-5BF03-0AB0 and similar) | MPI/DP variant; PN variant behaves the same way |
| Firmware baseline | V3.3 (typical for 313C-2 DP/PN) | Match firmware in HW Config to the connected CPU |
| Interface | TCP/IP via CP343-1, or PROFINET onboard (313C-2 PN) | Verify PG/PC interface assignment |
| Block types affected | OB1, OB35, OB100, FB, FC, DB, SFB, SFC | Comparison is performed block-by-block |
Root Cause Analysis
Three independent root causes can each produce the symptom of a persistent Online/Offline difference after a download. All three are present in the reported case.
Root Cause 1: Time-Stamp-Based Comparison in TIA V13
TIA Portal performs the Online/Offline comparison by comparing the block time stamps stored in the offline project against the time stamps held in the CPU's load memory. A difference in time stamps is a sufficient condition for TIA Portal to mark the block as different, even when the compiled code is bit-identical.
When the project was created from scratch and the CPU's online blocks were uploaded, the time stamps differ by definition (online timestamp ≠ offline timestamp). The Detailed comparison window shows the logical networks as green ("identical"), but the high-level status still reports a difference. This is correct TIA behavior, not a fault.
Root Cause 2: Incomplete Compile Before Download
If Compile > Software (rebuild all blocks) is not executed immediately before the download, the binary image in the project tree may not match the most recent offline source. The status bar warning "Go online: HW configuration of PLC_1 has changed but has not been compiled nor loaded" is the diagnostic signature.
For a download to proceed cleanly, both of the following must be true:
- PLC_1 > Program blocks > right-click > Compile > Software (rebuild all blocks) returns with no errors.
- PLC_1 > right-click > Compile > Hardware configuration returns with no errors.
Root Cause 3: Partial / Single-Block Download
The download action is scoped by the selection in the project tree at the moment the download button is pressed:
| Selected node | Resulting download scope |
|---|---|
| Single block (e.g., OB1) | Only that block is downloaded; HW config and remaining blocks are not refreshed. |
| Program blocks folder | All program blocks (OB/FB/FC/DB) are downloaded. |
| PLC_1 (station) | Hardware configuration + all software blocks are downloaded ("Download to target device"). |
| Right-click on PLC_1 > "Download all (hardware and software)" | Equivalent to a full station download; the recommended path. |
Partial downloads are the most common origin of the reported symptom in V13, because the time stamps of the previously loaded blocks are not aligned with the newly loaded block, and the comparison engine (V13 baseline) flags the whole station.
Pre-Download Verification Checklist
Run the following checks before any download. Each check has a pass criterion and a remediation if it fails.
- IP / Address verification – Open Online > Accessible nodes and confirm the CPU's actual IP/MPI/PROFIBUS address matches the PG/PC interface assignment and the value in PLC_1 > Properties > PROFINET interface / MPI/DP interface. Mismatch produces a download dialog that "looks correct" but writes to the wrong node.
- CPU protection level – In PLC_1 > Properties > Protection > CPU protection level, confirm that the protection is not set to "No access (complete protection)" and that any required password is known. A forgotten password blocks write access and is reported as a generic authorization error.
- Operating mode – Set the CPU mode selector to RUN-P (or use the online panel Operating mode > RUN-P). RUN mode allows monitoring but blocks block deletion and partial download.
- Project tree selection – Make sure the station node PLC_1 is selected before pressing the download button. Selecting a single block performs a partial download.
- Compile state – Run PLC_1 > right-click > Compile > Software (rebuild all blocks) and Compile > Hardware configuration. Both must complete with 0 errors / 0 warnings on the compile log.
Step-by-Step Resolution Procedure
Step 1 – Capture the current PLC program as a safety backup
- In TIA Portal, navigate to Online > Upload from device (software).
- Select the CPU type (S7-300 / CPU 313C) and confirm the target PG/PC interface.
- Choose "Upload to a new project" and store the result in a dedicated backup folder.
- Open the new project, right-click the CPU and verify that Online > Online & diagnostics is reachable without any difference warnings.
Step 2 – Force a full compile
- Select PLC_1 > Program blocks.
- Right-click > Compile > Software (rebuild all blocks).
- Open the Compile log in the inspector window. Resolve every entry marked as Error. Warnings are tolerable if they were present before the operation.
- Select PLC_1 > Device configuration, right-click > Compile > Hardware configuration. The log must show "0 errors".
Step 3 – Execute a full station download
- Select the PLC_1 node in the project tree (not a child block).
- Click Download to target device in the toolbar, or right-click PLC_1 > Download to > target device.
- In the Extended download to device dialog, confirm the PG/PC interface type (TCP/IP or PROFINET) and the target address.
- Use "Show accessible nodes" to verify the destination CPU before continuing.
- Choose "Download all (hardware and software)" – this is the option that aligns the station-level time stamps and resolves the V13 comparison bug.
- Confirm the overwrite prompt for any blocks that already exist on the CPU.
Step 4 – Re-run the Online/Offline comparison
- Right-click PLC_1 > Online > Go online.
- Open Online > Compare > Online/Offline.
- Each block should now show status "Identical". Time stamps in the detailed view will match the offline project.
- Open OB1 and confirm that monitoring is available; symbols will appear as
%IW0,%MW0addresses rather than fully symbolic names – this is correct S7-300 behavior, not an error.
TIA Portal V13 SP1 Update 8: Why the Upgrade Matters
The TIA Portal V13 baseline contains a known defect in the Online/Offline compare engine that affects S7-300 targets. The defect manifests as a permanent difference status even when the Detailed comparison shows all networks green. Siemens addressed the issue in V13 SP1 and continued to refine it through subsequent Updates. Update 8 is the stable V13 line endpoint.
Reference the official Siemens support pages for the latest patches:
- TIA Portal V13 SP1 – What's new and download
- TIA Portal V13 SP1 Update 8 trial download entry
- STEP 7 V13 SP1 / TIA Portal V13 SP1 manual collection
If the customer machine cannot be upgraded, apply the workaround described in Step 3 (full station download) – it forces a re-alignment of all block time stamps and side-steps the compare bug.
S7-300 Specific Online Limitations
When an S7-300 target is brought online, the following differences from S7-1200/1500 are expected and are not symptoms of a download failure:
| Feature | S7-300 behavior | S7-1200/1500 behavior |
|---|---|---|
| Symbolic online view | Absolute addresses only (%IW0) |
Fully symbolic, including UDT members |
| Watch table force | Force on peripheral I/O only with caveats | Full force on tags and I/O |
| Block consistency check | Time-stamp based only | Time-stamp + checksum + signature |
| Know-how protection | Block-level password | Block-level + global protection |
| Firmware update | Via SIMATIC Manager or TIA, requires RUN-STOP | Online, in RUN where supported |
Operators migrating from S7-1200/1500 frequently misinterpret the lack of symbolic online data as a download failure. Validate online functionality by toggling a known input (e.g., %I0.0) and observing the corresponding output in the watch table before assuming the download is bad.
Diagnostic Buffer and Error Codes
Always inspect the CPU diagnostic buffer after a failed download. The most relevant entries for the reported case are:
| Event ID (hex) | Meaning | Recommended action |
|---|---|---|
| 0x4300 | STOP due to module removal / configuration mismatch | Re-check hardware configuration in TIA against actual rack. |
| 0x4501 | STOP due to error in OB1 (programming error) | Open OB1 online and inspect STL for invalid address or type. |
| 0x4570 | STOP due to communication error | Check CP, bus connector, terminating resistor. |
| 0x45xx | STOP due to OB not loaded | Confirm OB1, OB35, OB100, OB122 are loaded. |
| 0x4Fxx | User-triggered STOP / mode change | Check operator actions; verify mode selector. |
| 0xE0xx | Error in distributed I/O / PROFINET | Run Online & diagnostics on the head module. |
Open the diagnostic buffer with PLC_1 > Online & diagnostics > Diagnostic buffer. Sort by Time descending to see the most recent events first.
Troubleshooting Matrix
| Symptom | Most likely cause | Verification | Fix |
|---|---|---|---|
| Go online succeeds, all blocks show "Different", Detailed compare is green | V13 timestamp compare defect | Check About TIA Portal version | Upgrade to V13 SP1 Update 8; else perform full station download |
| Status bar shows "HW configuration changed but not compiled" | Stale HW config | Run Compile > Hardware configuration | Recompile and reload |
| Single block downloads, rest of station drifts | Selection in project tree | Verify selected node before download | Select PLC_1 and use Download all |
| Download aborts with authorization error | CPU protection level | Properties > Protection | Set protection to Full access (no protection) or enter the password |
| No symbolic view online | S7-300 target | Check device family | Expected; use absolute addressing in watch tables |
| IP not found / connection refused | PG/PC interface mismatch | Use Accessible nodes | Reassign PG/PC interface in Control Panel |
| Blocks upload, project won't compile | Know-how-protected blocks | Check block headers for KNOW_HOW_PROTECT | Re-import field report; contact OEM for unprotected version |
| OB1 opens, monitoring grayed out | Online/Offline diff + no compile | Re-compile and full download | Follow Step 2 and Step 3 |
Field-Commissioning Best Practices
- Always maintain a known-good backup on an engineering share. Use Project > Archive (or File > Archive in older builds) to produce a single-file archive after every change.
- Use version control – pair TIA Portal with a Git or TIA-specific version control plugin. The S7-300 is often deployed for 10+ years; manual backup discipline fails over that horizon.
- Document PG/PC interface assignments in the project documentation. PN, MPI and PROFIBUS each have their own dialog in the Windows Control Panel ("Set PG/PC Interface").
- Avoid partial downloads in production. Reserve them for diagnostics and only on a machine that can be safely re-loaded.
- Schedule a periodic consistency check – once per quarter, perform a full Upload from device, open the resulting project, and compare it to the offline reference. A divergence here is the earliest indicator of a corrupted block.
- Use the CPU clock – the diagnostic buffer uses the CPU clock. Set it via Online & diagnostics > Set time so that future field service has a coherent timeline.
Verification After Repair
Use the following gate checks before signing off the repair:
- Right-click PLC_1 > Online > Go online – status must be "Connected" with no comparison warnings in the status bar.
- Open Compare > Online/Offline – every block row reads "Identical".
- Open OB1 online and confirm that the Monitoring on/off button is enabled and that toggling a real input changes a tag in the watch table within one scan.
- Open the diagnostic buffer; the most recent download event has Event ID
0x4300-class (download completed) with no follow-up error event. - Power-cycle the CPU (MRES not required) and confirm that it returns to RUN within the configured startup time (typically 3–5 s for 313C).
Edge Cases and Operator-Specific Notes
- Know-how-protected blocks cannot be re-compiled offline. If the lost source contained protected blocks, only a re-import from the OEM restores the program fully. A round-trip via Upload from device produces a working copy that runs, but the source comments and symbols are missing.
- Multi-language TIA installations sometimes show the warning text in Spanish ("la configuración HW de PLC_1 ha cambiado pero no se ha compilado ni cargado. Es posible que el diagnóstico visualizado sea incoherente o erróneo") or German – the message is identical and the fix is identical.
- Two engineers on the same project – the online time stamps reflect the CPU clock. If two PGs download within the same minute, the Detailed compare can be confusing; this is a cosmetic issue, not a fault.
- CPU in STOP after failed download – if the download was interrupted (network glitch, MRES), perform a full Download to target device with the CPU in STOP, then return it to RUN-P.
Related Engineering Documentation
- TIA Portal V13 SP1 – Release notes and download
- STEP 7 / TIA Portal V13 SP1 manual collection
- S7-300 CPU 31xC technological functions manual
- S7-300 Automation System – Module specifications
Why does TIA Portal V13 show "Different" for every block even when the Detailed compare is green?
The V13 baseline has a known defect in the Online/Offline compare engine for S7-300 targets that uses time stamps as the primary discriminator. If the offline time stamps were never aligned with the CPU's online time stamps, every block is flagged. The fix is to upgrade to V13 SP1 Update 8 or, as a workaround, perform a Download all (hardware and software) on the PLC_1 station node so all time stamps are written in one operation.
How do I recover the program from an S7-300 CPU 313C if the original project has been lost?
Open TIA Portal, create an empty project, then use Online > Upload from device (software) with the PG/PC interface set to the correct TCP/IP or PROFINET node. Choose "Upload to a new project" and store the result in a dedicated backup folder. Verify by going online and checking the diagnostic buffer; the upload preserves all OB, FB, FC, DB and SFB/SFC blocks with their original time stamps.
What does the message "HW configuration has changed but has not been compiled nor loaded" mean?
TIA Portal has detected that the offline HW configuration no longer matches the binary image used for the last download. The message is a warning that the Online/Offline comparison and the diagnostic data may be inconsistent. Resolve by selecting PLC_1 > Device configuration, right-clicking Compile > Hardware configuration, confirming zero errors, and then performing a full Download to target device on the station.
Why are no symbolic names visible when I open OB1 online on an S7-300?
SIMATIC S7-300 CPUs do not expose a full symbolic online view in TIA Portal. Online monitoring is performed with absolute addresses (%I0.0, %MW10, %DB1.DBD0). This is expected behavior and is not a symptom of a download failure. To view symbolic names, work from the offline project or from a watch table that is bound to the named tags.
Can I perform a partial download of a single block to a CPU 313C in TIA Portal V13?
Yes, but it is not recommended. Select the single block in the project tree and press Download to target device; only that block is written, the rest of the station is not refreshed, and the time stamps of the other blocks remain out of sync. For a healthy Online/Offline state, always select the PLC_1 station node and use Download all (hardware and software).