1. Problem Overview
When generating a SIMATIC BATCH report under PCS 7 V9.0 / V9.1 (SP1/SP2), operators observe the following banner rendered at the top of the PDF report header:
Under the report section Limit Violations, the count is reported as 0 even when process limit violations have occurred during batch execution. The expected output is a chronologically ordered list of WinCC alarm entries referenced to the active batch ID, batch name, and step number.
This is a data-acquisition problem, not a report-rendering problem. The BATCH report layout itself is correctly configured; the underlying data sources (WinCC Alarm Logging, WinCC Tag Logging) are not being written to the central BATCH data store because the CDV (Central Data Management / Central Data and Visualization) pipeline is not active. The same condition silently affects WinCC measured values, batch closing, and the migration path to PB (Process Historian) in mixed-mode installations.
This document covers three independent failure layers that must all be correct before the warning disappears:
- EMT (Event Manager for Tags) field wiring in the WinCC Alarm Logging message configuration.
- CDV service status and SQL Server agent startup on the BATCH server / OS server.
- Alarm Logging system message 2010020 "Triggers action" parameter (BATCH process cell ready).
2. Root Cause Analysis
The SIMATIC BATCH report compiler queries the BATCH relational store (Microsoft SQL Server) for two artefacts: process values captured by Tag Logging, and alarm events captured by Alarm Logging. The CDV component is the bridge that transfers both into the BATCH schema while a batch is in the Running or Closing state.
The CDV pipeline is only permitted to start logging under these conditions:
- A valid
BatchENsignal is high (batch is active). - The corresponding
BatchID,BatchNameandStepNohave been published by the BATCH application via the EMT interface to Alarm Logging. - The Alarm Logging has the "Triggers action" flag set on system message 2010020 (BATCH process cell in operating state).
- The Windows service "BATCH CDV" (and the underlying SIMATIC BATCH CDV Service) is started and the SQL Server instance hosting the CDV database is in the Running state.
If any of the conditions above is false, the CDV silently discards the inbound event stream and the report header warning is rendered. The warning text is generated when the BATCH Report Server compiles a batch and finds zero rows in the WinCCMessages view for the batch ID window.
3. EMT Field Wiring for WinCC Messages
The Event Manager for Tags (EMT) is the mechanism that decorates WinCC messages with batch context. The following EMT process-tag connections must be made in the WinCC Alarm Logging editor for every batch-relevant message class:
| EMT Source Tag | Alarm Logging Process Tag | Data Type | Purpose |
|---|---|---|---|
QBA_ID |
BatchID |
DWORD | Numeric identifier of the running batch; required for CDV join key. |
QBA_NA |
BatchName |
TEXT8 / STRING | Human-readable batch name shown in report header. |
QSTEP_NO |
StepNo |
INT | Active step number within the master recipe. |
QBA_EN |
BatchEN |
BOOL | Master enable; must be true for CDV to capture events. |
QOCCUPIED |
BatchOccupied |
BOOL | Unit-occupied flag; without this the message is treated as orphaned. |
BatchEN and BatchOccupied are required. Many integrators wire the enable but omit the occupied flag, which causes messages to be timestamped but not associated with any unit allocation, producing the "messages are not included" warning at compile time.To wire the EMT in the WinCC Explorer:
- Open WinCC Explorer → Alarm Logging.
- Select the message class used for batch-relevant process alarms (typically "Error" or a custom "Batch" class).
- In the Properties → Process Tags tab, add the five EMT tags above with the correct data types. The names are case-sensitive and must match the BATCH server's published tag names exactly (typically prefixed with the BATCH application name, e.g.
S7$BATCH_BAID). - Save the project, regenerate the WinCC runtime database, and restart the WinCC runtime.
4. CDV Service and SQL Server Configuration
The CDV (Central Data and Visualization) service is the Windows service that physically inserts the alarm and tag rows into the BATCH SQL schema. It is a separate SQL Server instance dependency and is therefore sensitive to SQL Server start-up order, service-account rights, and the local Windows group policy for delayed service start.
4.1 Required Windows services
| Service | Start Type | Log On |
|---|---|---|
| SQL Server (SIMATIC_BATCH) | Automatic (Delayed Start) | NT AUTHORITY\SYSTEM or domain BATCH user with db_owner
|
| SQL Server Agent (SIMATIC_BATCH) | Automatic | Same as SQL Server |
| SIMATIC BATCH CDV | Automatic (Delayed Start) | Local system account (preferred) or BATCH service account |
| SIMATIC BATCH Report | Manual / Automatic | Local system account |
4.2 Forcing SQL Server to start
If the SQL Server instance hosting the CDV database fails to start automatically, the report warning will appear for every batch until the service is brought up manually. To start it interactively:
- Open Windows Start → All Apps → Microsoft SQL Server 20xy → SQL Server 20xy Configuration Manager.
- Select SQL Server Services in the left pane.
- Right-click the SIMATIC_BATCH instance (or whatever name was assigned at BATCH installation) and choose Start.
- Repeat for SQL Server Agent (SIMATIC_BATCH).
- Confirm both services show state Running.
- From an elevated command prompt, execute
sc query "SIMATIC BATCH CDV"to verify the CDV service isRUNNING.
SQLServerMSSQLUser$ group on the OS server / BATCH server, otherwise the CDV database is unreachable even if the service is technically started.To make the startup reliable after a reboot, change the SQL Server service Start Type from Automatic to Automatic (Delayed Start) in the same Configuration Manager, and set a service dependency: SIMATIC BATCH CDV → depends on → SQL Server (SIMATIC_BATCH). This prevents the classic race condition where CDV starts before the SQL instance is ready and silently fails.
5. Alarm Logging Message 2010020 Trigger
System message 2010020 is generated by WinCC Alarm Logging when the BATCH application publishes its process-cell state. The CDV relies on this message as the master "BATCH is now active" signal. If the "Triggers action" parameter of this system message is disabled, the CDV never receives the start-of-batch handshake and the report warning is rendered.
Per the official Siemens application note on automatic generation of BATCH reports, the procedure is:
- In the WinCC Explorer, open Alarm Logging.
- Filter the message list to message number
2010020. - Open the message properties and select the Parameter tab (or in WinCC V7.x: the Properties → Options tab).
- Enable the Triggers action checkbox.
- Save the project and re-compile the OS (operator station) so the new behaviour is loaded into the runtime database.
This change is also a prerequisite for auto-generation of the BATCH PDF report after the closing transition state completes.
6. Step-by-Step Resolution
- Verify SQL Server is running. Open the SQL Server Configuration Manager and start the BATCH instance if it is stopped. Set the start mode to Automatic (Delayed Start).
-
Verify the CDV service is running. Use
services.mscor the WinCC service overview; the entry SIMATIC BATCH CDV must show Running. If it is stopped, start it manually. -
Wire the EMT process tags. In Alarm Logging, add the five fields (
BatchID,BatchName,StepNo,BatchEN,BatchOccupied) to the relevant message class, mapped to the EMT source tagsQBA_ID,QBA_NA,QSTEP_NO,QBA_EN,QOCCUPIED. - Enable "Triggers action" on message 2010020. Refer to Section 5 above.
- Rebuild the WinCC runtime database (the OS server) and restart the WinCC runtime to apply the new EMT bindings.
- Close any open batch that was started before the configuration change. The CDV only records events from the moment the BATCH process-cell state message fires; historic events are not retroactively captured.
- Start a new test batch and deliberately generate a limit violation (drive a monitored process tag outside its high/low limit).
- Close the batch and wait for the Closing → Closed transition. The BATCH report should compile automatically. The warning header must be absent, and the Limit Violations section should show a non-zero count.
7. Verification
After the steps above, perform the following checks in order:
-
Service verification:
sc query "SIMATIC BATCH CDV"returnsSTATE: 4 RUNNING. The SQL Server instance reportsRunningin SQL Server Configuration Manager. - Runtime verification: In the WinCC Alarm Control, the message list for the test batch contains a row with Batch ID and Step Number columns populated. Pre-fix, these columns are empty.
-
Database verification: Connect to the BATCH SQL instance with SQL Server Management Studio and query:
SELECT COUNT(*) FROM dbo.WinCCMessages WHERE BatchID = <test_id>;The result must be > 0. A result of 0 indicates the CDV is still not writing to the schema. - Report verification: Generate the report manually via the BATCH Control Center. The header warning must be absent, and the "Limit Violations" line must show the expected count.
8. PCS 7 V9.1 SP2 Specific Notes
The issue has been observed on PCS 7 V9.1 SP2 specifically and shares the same symptom tree. Additional points for V9.1 SP2:
- The default SQL Server version installed by the BATCH setup is Microsoft SQL Server 2017 (or 2019 on V9.1 SP2 U3+). The Configuration Manager path may read Microsoft SQL Server 2017 Configuration Manager or 2019 Configuration Manager accordingly.
- The CDV database name in V9.1 SP2 is
BATCH_CDVby default. Confirm it is online in SSMS under Databases. - If the OS server runs as a WinCC single-user / single-station install, the CDV service may run locally on the OS rather than on a separate BATCH server; in this case the SQL Server start-up is local to the OS machine and the same fix applies.
- For mixed-mode installations with a Process Historian (PH) / Information Server (IS), the BATCH report data path may be redirected through PH. In that case the report is compiled from the PH mirror rather than the live CDV schema, and the warning may be cached for up to 15 minutes after a batch closure.
9. Troubleshooting Matrix
| Symptom | Likely Root Cause | Fix |
|---|---|---|
| Warning present + Limit Violations = 0 | CDV not running / SQL Server stopped | Start SIMATIC BATCH CDV and SQL Server; set to Automatic (Delayed Start) |
| Warning present + limit violations recorded in Alarm Control but no batch context | EMT tags not wired | Add the five EMT process tags to Alarm Logging and rebuild OS |
| Warning present + batch context visible in Alarm Control but report still empty | Message 2010020 "Triggers action" disabled | Enable the parameter per Section 5 |
| CDV starts then stops immediately | Service account missing db_owner on CDV DB |
Grant db_owner via SSMS, restart service |
| Warning absent but limit violation count incorrect | Limit-violation monitor not bound to the unit's tag set in BATCH | Review Recipe → Process Values configuration; re-import |
| After reboot, warning reappears for the first batch of the day | SQL Server start order race with CDV | Set dependency: CDV → SQL Server, both Delayed Start |
10. Extended Diagnostics
For chronic or non-obvious failures, the following deeper checks are recommended.
10.1 CDV log file analysis
The CDV service writes a rotating log to %ProgramData%\Siemens\Automation\BATCH\CDV\CDVLog.txt (path may vary by PCS 7 version). Search the log for the following patterns:
-
Batch context missing— EMT binding broken. -
DB connection lost— SQL Server dropped the CDV session; check SQL Server error log for the same time-stamp. -
CDV <batch_id> closed with N messages— normal close, N should match the report count. -
No process cell active— message 2010020 trigger not firing.
10.2 WinCC Alarm Control "BATCH" columns
Open the alarm control in WinCC runtime and enable the columns Batch Name, Batch ID, Step Number and Occupied. A correctly wired system will populate all four columns for every batch-relevant message. If the columns exist but are blank, the EMT tags exist in the configuration but the BATCH application is not updating them — check the BATCH server's published tag list in the BATCH Control Center → Process Tags.
10.3 BATCH Report Server connection
The BATCH Report Server reads the schema via ODBC. Verify the ODBC data source BATCH_REPORT points to the same SQL instance as the CDV. A common mis-configuration is the report server pointing to a passive mirror (e.g. the PH sync target) which has not been refreshed yet.
11. Field-Commissioning Checklist
- SQL Server service: Running, Automatic (Delayed Start), correct service account.
- SQL Server Agent: Running.
- SIMATIC BATCH CDV service: Running, depends on SQL Server.
- EMT tags: all five process tags wired and verified in Alarm Control.
- Alarm 2010020: "Triggers action" enabled.
- Test batch: created, run, limit violation forced, batch closed.
- Report: generated, header warning absent, limit violation count > 0.
- CDV log: no error patterns on the day of test.
Why does my SIMATIC BATCH report show "WARNING! WinCC messages are not included in the report!"?
The BATCH report warning appears when the CDV (Central Data and Visualization) service has not stored any WinCC messages for the batch. The most common causes are the SIMATIC BATCH CDV service or its underlying SQL Server instance not running, the EMT process tags (BatchID, BatchName, StepNo, BatchEN, BatchOccupied) not wired in Alarm Logging, or the "Triggers action" flag disabled on Alarm Logging system message 2010020.
Do I need to wire the QOCCUPIED EMT tag in addition to QBA_EN?
Yes. QOCCUPIED (mapped to the Alarm Logging process tag BatchOccupied) is required so the message is associated with a unit allocation. Without it, the message is captured but treated as orphaned, which still produces the "messages not included" warning at report compile time. Wire it alongside QBA_ID, QBA_NA, QSTEP_NO, and QBA_EN.
How do I start the BATCH CDV service if it is not running?
Open Windows Start → All Apps → Microsoft SQL Server 20xy → SQL Server 20xy Configuration Manager, start the SIMATIC_BATCH SQL instance and the SQL Server Agent, then open services.msc and start the SIMATIC BATCH CDV service. Administrator rights are required. To make the change persistent, set both services to Automatic (Delayed Start) and add SQL Server as a dependency of the CDV service.
Why are Limit Violations reported as 0 even though alarms appeared during the batch?
The limit violation count in the BATCH report is sourced from the WinCCMessages view of the CDV database, not from the live Alarm Logging view. If the CDV is not running, or the EMT tags are not bound, the count is always 0 regardless of what the operator saw on screen. Verify the CDV service, the SQL Server instance, the five EMT process tags, and message 2010020 as described above.
Does the standard BATCH report include WinCC messages by default, or do I need a custom report template?
The standard SIMATIC BATCH report template includes a WinCC messages section and a limit-violation section out of the box. No customisation is required — the warning is a runtime data-acquisition indicator, not a template issue. Once the CDV is writing rows, the messages appear automatically in the standard report.
Is there a way to retroactively capture messages from a batch that ran before the CDV was fixed?
No. The CDV only records events that occur after a batch is started while the CDV is active and the BATCH process-cell state message (2010020) is firing. Historic WinCC alarm rows remain in the Alarm Logging archive but are not associated with the batch ID in the BATCH schema. If you need a retrospective analysis, use the WinCC Alarm Control directly to filter by time-stamp and re-export manually.