1. Problem Description
On a SIMATIC PCS 7 V9.0 (AS-OS Engineering, WinCC Runtime) operator station, opening a faceplate trend view produces the runtime message "No Data connection could be established" when the trend is configured to display archive (historical) values. The same tag viewed through a group trend object directly in the WinCC graphics designer opens without error and renders the historical curve correctly. The Online view of the faceplate trend also works; only the switch from online to archive within the faceplate fails.
Typical symptoms reported in the field:
- Faceplate trend view: error message in the trend window, no curve drawn.
- Group trend view (same tag, same archive): curve renders, no error.
- Tag is visible in WinCC Explorer → Tag Logging with the correct archive name and a valid process tag mapping.
- Switching the block icon trend mode from Online to Archive triggers the error immediately on dialog open.
2. Environment & Affected Versions
| Component | Version / Detail |
|---|---|
| SIMATIC PCS 7 | V9.0 (Engineering Station, Operator Station) |
| WinCC Runtime (OS) | PCS 7 V9.0 WinCC (build aligned with the ES install) |
| Block library | APL (Advanced Process Library) faceplates, V9.0-compatible revision |
| Archive backend | Microsoft SQL Server (WinCC archive database) – checked via SQL Server Management Studio |
| AS | AS 410 / AS 400 series, or S7-400 (PCS 7 V9.0 supported families) |
Refer to the official SIMATIC PCS 7 V9.0 documentation for the exact ES/OS compatibility matrix and required Hotfix level before applying any change.
3. Root Cause Analysis
Five independent root causes can produce this exact symptom on a PCS 7 V9.0 OS. They must be ruled out in the order listed because each subsequent cause assumes the previous one has been verified clean.
- CFC archive bit wired to the wrong signal. The Archive checkbox in the CFC block I/O view is enabled on the input (meas) value rather than the output value. The faceplate is bound to the output; the archive subsystem receives a value from the input that the faceplate never references, so the connection lookup fails when the trend opens.
- WinCC Tag Logging not compiled into the OS project. The tag exists in the ES but was not propagated to the OS by a full WinCC compile (Tag Logging is part of the OS compile scope). Online works because the online tag is read directly from the AS via the WinCC connection; the archive tag is a WinCC-internal archive entry that only exists after a successful OS compile.
- Block icon configured for online-only display. The faceplate's standard configuration shows online values by default. The mode switch to archive requires the TrendArchive attribute to be wired to the block; if the attribute is missing or bound to a constant "0", the trend control can never resolve the archive tag name.
- Empty archive for the requested time range. The WinCC archive exists but contains no rows for the selected period. The trend control surfaces this as "No Data connection" rather than "No data in range". Verify in SQL Server Management Studio.
- Image surcharge / pre-projection variable mismatch. The picture is loaded with a pre-projected variable, that pre-projection is invalid, the system attempts to read it, the read fails, the runtime error is raised, and only then is the correct variable written. This is a load-order issue between the picture cache and the block icon instance.
4. Pre-Diagnosis Checklist
Before changing anything, capture the following state. It is required to decide which root cause applies.
- Confirm the OS is the V9.0 OS in SIMATIC Manager → OS → Properties or in the TIA-equivalent project view.
- Open the WinCC Explorer on the OS and navigate to Tag Logging. Locate the affected tag. Verify it has a valid Process Tag column entry (not blank, not red).
- On the affected CFC chart, open the block I/O and inspect the Archive checkbox on every relevant analog value. Note whether the tick is on the input (I) row or the output (O/Q) row.
- From WinCC Explorer, open Graphics Designer, locate the faceplate picture, and inspect the Configuration dialog of the embedded trend control. Note the property OnlineArchiveToggle or the equivalent TrendSource attribute and how the archive tag name is constructed.
- Open SQL Server Management Studio, connect to the WinCC archive instance, and run a count query on the archive table for the tag in the requested time range.
SELECT COUNT(*) FROM dbo.TAG_archive_RUNTIME_1 WHERE TagName = 'YourTagName' AND Timestamp BETWEEN 'YYYY-MM-DD HH:MM:SS' AND 'YYYY-MM-DD HH:MM:SS';
5. Solution 1 — Correct the CFC Archive Bit (Input vs. Output)
This is the single most common cause of the symptom on a freshly built V9.0 OS and the first item to verify.
- Open the CFC chart that owns the affected block.
- Select the block and open I/O view (Ctrl+I or menu View → I/O).
- Locate the analog meas input (e.g.
AI1on a CTRL_PID, or the PV input of the driver block) and the corresponding output (AI1_OUT,PV_OUT, or the block output on the SECT_/MOT_ family). - Inspect the Archive column for both rows. The tick must be on the output row, not the input row.
- If the input is ticked, remove the tick, tick the output, recompile the CFC chart, then perform a full OS compile (entire OS).
6. Solution 2 — Force a Full WinCC (OS) Compile
If Tag Logging is empty for the tag on the OS even though the CFC is correct, the OS has a stale image of the WinCC configuration.
- In SIMATIC Manager, right-click the OS and choose Compile OS.
- Select scope Entire OS (do not use "Changes only"). The full scope is required because the archive configuration and the tag logging database are rebuilt.
- Confirm the dialog lists the affected tag in the Tag Logging section of the compile log.
- Transfer the project to the target OS and restart WinCC Runtime.
If you are using the PCS 7 V9.0 engineering toolset with the migration/upgrade path, also verify that no orphaned archive tags from a previous project version remain in the WinCC Tag Logging database.
7. Solution 3 — Bind the Block Icon Trend to the Archive Tag
The standard PCS 7 APL faceplate ships with the trend view pre-configured, but the archive mode requires a correct binding. Inspect and fix the block icon properties:
- Open the faceplate picture (e.g.
@APL_Faceplate.pdlor the picture instance) in Graphics Designer. - Right-click the trend control → Configuration → tab Trends.
- Confirm that the trend name pattern resolves to a valid archive tag, e.g.
Tagname_archiveor the TrendArchive attribute exposed by the block. - Open the Properties of the block icon and verify the attribute TrendSource or OnlineArchiveToggle is bound to the block's output (e.g.
LIC_101/PV.OUT) and not a constant. - Save the picture, close Graphics Designer, and reload the runtime.
8. Solution 4 — Verify the Archive Database in SQL Server Management Studio
An empty archive range is reported as a connection failure by the WinCC Trend control. Validate with the SQL tool that ships with the OS.
- Open SQL Server Management Studio on the OS.
- Connect to the WinCC instance (typically
(local)\WINCCfor PCS 7 V9.0). - Locate the archive database; the runtime tag archive tables are named with the pattern
TABLE_1,TABLE_2, etc., and the tag list is in the system tables. - Identify the table that holds the affected tag (the TagID mapping is visible in WinCC Explorer → Tag Logging → Archives).
- Run a row count and a value-range query:
SELECT MIN(Timestamp), MAX(Timestamp), COUNT(*) FROM dbo.TABLE_n WHERE TagID = <id>; - If the count is zero or the time range does not cover the trend window, archive the data at the source (verify the AS is writing to the archive, the swap-out is healthy, and the disk has free space).
Reference: SIMATIC PCS 7 V9.0 WinCC documentation set, section "Diagnostics of Tag Logging".
9. Solution 5 — Resolve the Image Surcharge Variable Mismatch
When a picture is opened with a pre-projected variable, the runtime must read that variable first, then apply the picture. If the pre-projection is invalid, the read fails and the trend control initializes with an empty tag name. The error is raised before the correct variable is written.
- Identify the call point of the faceplate. In the process picture, locate the Open Faceplate event on the block icon (typically a mouse-click event with the action
OpenFaceplateor the equivalent C-script / VB action). - Verify the parameter being passed to the faceplate opener. It must be the full block instance path (e.g.
LIC_101), not a tag alias that may not yet exist at first picture open. - Avoid using pre-projection of an internal faceplate variable for the trend attribute. Use the block's output attribute directly.
- Reload the picture, navigate to a healthy process tag, and confirm the faceplate trend now switches online ↔ archive without error.
10. Verification Steps
Run the following checks in order. Each must pass before moving to the next.
- CFC archive bit: the output row carries the Archive tick.
- WinCC Tag Logging: the tag is present on the OS with a valid process-tag mapping.
- OS compile log: the tag is listed in the Tag Logging section, no warnings.
- Block icon binding: the trend control's archive name resolves to a tag that exists in WinCC Tag Logging.
- SQL Server: the archive table contains rows for the requested time range.
- Runtime toggle: open the faceplate, click the Archive button. The trend draws. No "No Data connection" message.
- Cold reload: restart the WinCC Runtime and repeat step 6 on three consecutive faceplate instances to rule out stale picture cache.
11. Field-Troubleshooting Matrix
| Symptom | First Check | If Fails |
|---|---|---|
| Faceplate trend fails, group trend OK | Block icon binding (Section 7) | Image surcharge (Section 9) |
| Both trends fail, online OK | CFC archive bit (Section 5) | OS compile scope (Section 6) |
| Both trends fail, online also fails | AS connection / WinCC channel | AS-side block configuration |
| Trend fails only outside working hours | SQL Server archive swap-out / disk space | Archive configuration, retention time |
| Trend fails after project migration to V9.0 | Library revision mismatch on APL | Recompile OS with full scope |
| Trend fails only on a redundant standby OS | Archive replication state | Re-synchronize the archive server |
12. Common Configuration Pitfalls
- Tag compiled into WinCC manually. Manually added tags in the OS Tag Logging bypass the ES compile contract. They appear healthy until the next OS compile, which overwrites them. Always let the ES generate the tags via CFC + OS compile.
- Tick on the input of the block. The most reported root cause in this failure mode. The output of the block is the contract; the input is just the value source.
- Time range wider than archive retention. If the user selects a window older than the configured archive retention time, the runtime raises the same error because the underlying archive tag returns no data.
- Mixed library revisions. Using a V9.0 ES with a pre-V9.0 block icon (e.g. from a migrated V8.2 project) leaves attribute names mismatched. Update the APL library to the V9.0 revision before commissioning.
- Online / Archive toggle is not wired. The toggle button on the trend toolbar requires the OnlineArchiveToggle attribute to be exposed by the block. Some custom blocks do not expose it; the toggle then silently fails.
13. Long-Term Recommendations
- Establish a block icon regression step in the OS commissioning procedure: open at least five faceplates per unit, exercise the online ↔ archive toggle, and log the result.
- Configure the SQL Server archive with sufficient retention to cover the longest trend window the operators request (typically 7 days for fast loops, 30+ days for process KPIs).
- Maintain a single source of truth for block I/O archive bits: the output, never the input. Enforce this in the project standards document and audit quarterly.
- After any ES update, Hotfix, or library revision change, repeat the OS compile with full scope and the faceplate regression.
Why does the group trend show archive data but the faceplate trend does not?
The group trend object uses a direct archive tag reference and bypasses the block icon's TrendSource attribute. The faceplate trend resolves the archive tag name dynamically from the block's output attribute. If the block icon is misbound or the CFC archive bit is on the input, the faceplate path fails while the group path still works.
Is "No Data connection could be established" a network error?
No. The message is generated by the WinCC Trend control when the archive tag name it resolves to does not exist in the WinCC Tag Logging runtime database. Treat it as "archive tag resolution failure" and verify the OS compile, the CFC archive bit, and the block icon binding before checking the network.
Should the Archive checkbox be on the input (meas) or the output of the CFC block?
On the output. The output is the ES-side contract between the CFC and the OS faceplate. The input is the raw measurement and is not what the faceplate subscribes to. Tick the output row, not the input row, then perform a full OS compile.
Do I have to recompile the entire OS, or is "Changes only" enough?
Use Entire OS for the first correction. Tag Logging and the archive configuration are not always picked up by incremental compiles, especially after a block icon change. After the issue is resolved, future routine OS deliveries can return to the incremental scope.
How do I confirm the archive is not simply empty for the requested time range?
Open SQL Server Management Studio, connect to the WinCC instance, and run a count and range query against the archive table that holds the tag. If the count is zero or the timestamps fall outside the requested window, the runtime will raise the same connection error even though the archive is technically healthy. Adjust the requested time range, or extend the archive retention, accordingly.