Overview: Data Logging on SIMATIC TP700 Comfort Panels
The SIMATIC TP700 Comfort is a 7-inch widescreen HMI panel from the Siemens Comfort Panel family (6AV2 124-1GC01-0AX0 and successor variants) running WinCC Comfort/Advanced V15 and later inside the TIA Portal engineering framework. The panel supports three principal log types: alarm logs, tag logs (data logs), and audit trail logs. A data log is a comma- or semicolon-delimited CSV record persisted to a defined storage path on the panel's internal flash, an inserted SD card, or a configured network share via SMB.
This reference consolidates the field-proven procedure to: (1) view a persisted data log in Runtime through the Alarm View control, (2) inject operator- and product-specific metadata into a running log via VBScript ShowSystemAlarm, and (3) print the full log through a report template that pipes the Alarm View contents to a PCL/PostScript-compatible network printer.
Prerequisites
| Item | Specification |
|---|---|
| TIA Portal | V15.1 minimum; V17/V18 recommended for current firmware |
| WinCC Comfort/Advanced | Version aligned with TIA Portal installation |
| Panel image | Comfort Panel ≥ V15.1.0.0 (TP700 part number 6AV2 124-1GC01-0AX0) |
| Storage | SD/SDHC card (2–32 GB, FAT32) inserted before power-up if used as log path |
| Printer | Network printer with PCL5/PCL6/PostScript; panels do not support USB printing on TP700 |
| PLC tag for operator name | String (WString) tag exposed by the connected S7-1500/1200/300/400 CPU |
| PLC tag for product name | String (WString) tag exposed by the connected S7-1500/1200/300/400 CPU |
Step 1: Create the Alarm Log in TIA Portal
Open the HMI device configuration in the TIA Portal project tree and navigate to Historical data > Alarm logs. Click Add in the Name column to create a new log. The standard TIA Portal sequence for creating a data log is documented in the official Siemens TIA Portal help portal at Creating a data log (Basic Panels, Panels, Comfort Panels, RT Advanced, RT Professional).
- In the project tree, double-click HMI tags and select the Data logs tab.
- Double-click Add in the Name column. A new data log entry is created with default name
Data_log_1. - In the Inspector window, configure the Storage location:
-
Storage path:
\Storage Card SD\Logs\for SD card persistence -
Storage path:
\Flash\Logs\for internal flash (limited to 50 MB write cycles)
-
Storage path:
- Set File format to Text (CSV) and choose the delimiter: comma for English locales, semicolon for German/Italian/French locales to avoid CSV parsing collisions with decimal commas.
- Define the Log columns: map each PLC tag (timestamp trigger, operator name, product name, process value 1…n) to a column. Column order in the editor becomes the column order in the CSV file.
- Set the Trigger: On change for event-driven logging, or Cyclic at 1 s / 10 s / 60 s for periodic sampling.
Step 2: Display the Log in Runtime with the Alarm View Control
Comfort Panels treat persisted alarm entries as system alarms when re-injected, so the canonical Runtime viewer is the AlarmView control, not a generic table view. Place an Alarm View object on a screen from the toolbox under Controls.
- Drag Alarm view from the toolbox onto the target screen.
- In the Properties pane, set Display → Logged alarms to ON and Display → Unlogged alarms to OFF if you only want historical data.
- Under Alarm classes, enable the classes you want rendered (e.g., Errors, Warnings, System). Each class is color-coded and filterable.
- Set the Time column format to ISO 8601 (
yyyy-MM-dd HH:mm:ss) for unambiguous sorting. - Bind the view to the configured alarm log name (
Data_log_1). Multiple Alarm Views can be placed on different screens, each bound to a different log.
The Alarm View at Runtime behaves like a recipe or alarm view: column sort, text filter, scroll, and selection. Operators can also acknowledge (confirm) entries, which writes a ConfirmationTime field to the log without modifying the original timestamp.
Step 3: Inject Operator and Product Name into the Log
Because the data log only captures what the configured PLC tags carry, the operator name and product name must be present in PLC tags before the logging trigger fires. The TP700 also supports a second mechanism: injecting a synthetic system alarm at Runtime via VBScript, which is recorded in the alarm log with the same fidelity as a hardware-triggered alarm.
Use the VBScript function ShowSystemAlarm on a button press, scheduled task, or value-change event. The syntax is:
ShowSystemAlarm "OperatorName: " & SmartTags("PLCTAG_Operator") & ", ProductName: " & SmartTags("PLCTAG_Product")
Sample VBScript that writes the operator name and product name into the active log and confirms the entry to the user:
' === Inject header row at lot start ===
Sub OnLotStart_Clicked(ByVal Item)
Dim sOperator, sProduct, sMsg
sOperator = SmartTags("PLCTAG_Operator")
sProduct = SmartTags("PLCTAG_Product")
If Len(sOperator) = 0 Or Len(sProduct) = 0 Then
ShowSystemAlarm "WARN: Operator or product name missing before log start"
Exit Sub
End If
sMsg = "Operator:" & sOperator & "|Product:" & sProduct & "|LotStart:" & Now
ShowSystemAlarm sMsg
SmartTags("HMI_LogTrigger") = True ' sets a bool that the data log watches
End Sub
The string sent to ShowSystemAlarm is rendered as a system-class alarm and stored in the same alarm log configured in Step 1. Operators viewing the Alarm View at Runtime see it on a row identical in structure to hardware alarms. The same script attached to a value change event on PLCTAG_Operator automatically logs a new row whenever the operator changes, which satisfies shift-handover audit requirements.
Step 4: Print the Data Log via a Report Template
Comfort Panels cannot print a data log directly, but they can print a report that contains an Alarm View or a configurable layout that mirrors the log columns. The end-to-end flow is: configure a network printer, build a report, add the Alarm View control to the report, trigger the report on demand.
- Configure the printer on the panel. In the HMI device configuration open Runtime settings > Printer. Select Network printer and enter the IP address and queue name. Test page from the panel's Control Panel > Printer menu to confirm connectivity.
- Create a report. In the project tree right-click Reports and add a new report. Choose Alarm log report as the template type.
-
Add an Alarm View area to the report layout. Bind it to the same alarm log name (
Data_log_1). The report re-renders the rows visible in the Alarm View at trigger time. - Add a page header with project name, machine ID, current operator, and current product pulled from PLC tags so the printout is self-describing.
-
Trigger printing from a button using VBScript:
SmartTags("HMI_PrintReport") = 1 ' writes the trigger tag the report watchesOr directly callPrintReport "Report_1", "\\192.168.1.50\Queue1"from a VBScript to bypass the configured default printer. - On the panel, navigate to the report screen, tap the print button. The report is spooled through the network printer with the configured column layout.
For full-dataset dumps (every row in the log) configure the report's Data source to All entries instead of Current view. The latter only prints the rows currently visible in the Alarm View's scroll window.
Step 5: Verify Storage and Persistence
After the first Runtime session, verify the log is being written and is readable on a host PC.
- On the TP700, open Control Panel > Storage Management and confirm the SD card shows the configured
\Logs\directory with a file namedData_log_1.csvand a non-zero size. - Power-cycle the panel. Cold-boot persistence is a hard requirement; logs written only to RAM are lost.
- Remove the SD card and read the CSV on a Windows PC with Notepad or Excel. Confirm the column headers match the TIA Portal configuration, that the delimiter is consistent, and that operator/product rows injected via
ShowSystemAlarmare present as system-class entries. - Verify the ring buffer or file-rotation behavior. By default Comfort Panels append indefinitely; configure Number of files and File size under the log properties to prevent flash wear.
Step 6: File Layout and Storage Path Details
Default storage paths and identifiers on a TP700 with an SD card inserted:
| Logical path | Physical location | Use case |
|---|---|---|
\Flash\ |
Internal NAND (~50 MB write-cycle budget) | Configuration backup, license, small logs |
\Storage Card SD\ |
SD/SDHC card slot front of panel | Data logs, recipes, audit trails, reports |
\USB\ |
USB host port (TP1500+; TP700 has no USB host on older revs) | Service export, firmware update |
\Network\<share>\ |
SMB/CIFS share reachable from panel | Centralized log archive, OPC bridge |
The CSV produced by a data log is structured as:
"TimeStamp";"Time_ms";"OperatorName";"ProductName";"PV1";"PV2";"QualityCode"
"2026-01-14 08:00:01";"0";"J.Santos";"Widget-A-Rev3";"23.4";"ON";"Good"
"2026-01-14 08:00:02";"1024";"J.Santos";"Widget-A-Rev3";"23.4";"ON";"Good"
The QualityCode column follows OPC UA data-quality semantics: Good, Bad, Uncertain. Exposing this in the CSV is enabled by the Quality code checkbox on the data log column.
Step 7: Permissions, VBScript Scope, and Security
- VBScript on Comfort Panels runs inside a sandboxed WSH runtime. The function set is restricted to
ShowSystemAlarm,SmartTags,HMIRuntime,Trace, file I/O helpers, and a subset of string/math functions. ActiveX and external COM calls are not supported. - User-rights on the panel must be configured under Users & Roles. The Operator role by default cannot edit log paths; only the Administrator role can. The role password is set under User administration in the HMI device configuration.
- For audit-trail compliance (FDA 21 CFR Part 11, EU Annex 11), enable the Audit trail option on the project properties and configure the Audit data log. The audit log records every operator login, value change, and recipe load, and cannot be edited from Runtime.
Troubleshooting Matrix
| Symptom | Likely root cause | Corrective action |
|---|---|---|
| Alarm View in Runtime is empty | Alarm log not bound to Alarm View, or log file path is read-only | Re-bind Alarm View to Data_log_1; verify SD card is not write-protected |
ShowSystemAlarm produces no row |
Function called outside an event handler, or tag name typo | Verify VBScript is attached to a button or value-change event; check tag spelling in SmartTags("...")
|
| CSV uses semicolons unexpectedly | Regional settings on the panel set to de-DE / it-IT / fr-FR | Change the log delimiter explicitly in the data log properties, not via regional settings |
| Printout prints only the visible Alarm View rows | Report configured to Current view data source | Switch report data source to All entries; recompile project |
| Printer not responding from panel | Panel cannot resolve printer hostname, or queue name wrong | Use IP address instead of hostname; verify queue name on the print server; ping from the panel's Control Panel > Network |
| SD card detected in project but missing in Runtime | SD card formatted as exFAT or NTFS | Reformat the SD card as FAT32 with 32 KB cluster size on a Windows PC |
| Flash wear warning after extended runtime | Data log writing at < 1 s cadence to \Flash\
|
Move log to \Storage Card SD\ and enable file rotation |
| Operator name shows the previous value | PLC tag update rate too slow for the log trigger | Set data log trigger to On change on the operator tag; verify HMI tag acquisition cycle is ≤ 100 ms |
Field-Proven Tips
- Always use the SD card as the log destination for production cells; the internal flash has a finite write-cycle budget and is shared with the boot image.
- Format SD cards exclusively as FAT32 with 32 KB clusters. The TP700 firmware rejects exFAT and NTFS partitions at boot.
- Inject lot-start and lot-end markers with
ShowSystemAlarmat well-defined script points; this lets the Alarm View filter by class System and audit-trail the lot boundary without needing a separate tag. - For multi-shift environments, attach a VBScript to the value change event of the operator tag; every login/logout is automatically appended to the log with the timestamp the panel already maintains.
- When using reports for shift handover, include the operator tag, the product tag, the last 200 process values, and a totals row computed in the report layout from the same data log.
- Reserve the Alarm View filter "unconfirmed" for supervisors only; it consumes a noticeable amount of CPU on TP700 if the log has tens of thousands of rows.
FAQ
Can the TP700 Comfort Panel display a persisted data log directly in Runtime, similar to an alarm view?
Yes. Bind an Alarm View control to the configured alarm log; the view will render every row of the data log in the same column order defined in the TIA Portal editor, with sort, filter, scroll, and acknowledge behavior identical to a live alarm view.
How do I write the operator name and product name to the data log file before logging starts?
Expose the operator and product name as WString tags on the connected PLC, then either map them as columns in the data log editor or inject a synthetic system alarm at Runtime with VBScript: ShowSystemAlarm "Operator:" & SmartTags("PLCTAG_Operator") & ",Product:" & SmartTags("PLCTAG_Product"). The injected row is stored in the same alarm log and shown in the Alarm View.
Can the TP700 print a complete data log to a printer?
Yes, but not directly. Create a Report in TIA Portal, drop an Alarm View area bound to the same data log, configure a network printer under Runtime settings, and trigger the report on demand. Set the report's data source to All entries to print the full log rather than only the rows visible in the current Alarm View window.
Which storage path should I select for production data logs on a TP700?
Use \Storage Card SD\Logs\ on a FAT32-formatted SD/SDHC card up to 32 GB. The internal \Flash\ has a limited write-cycle budget and is intended for configuration, license, and short-term buffers. SDXC is not certified for the TP700 slot.
Why is the Alarm View in Runtime empty even though the data log exists on the SD card?
Three checks resolve this in 90% of cases: (1) the Alarm View is bound to the exact log name from the editor, (2) the Display → Logged alarms property is enabled, and (3) the SD card is not write-protected or formatted as exFAT. Verify the file timestamp on the SD card with the panel's Storage Management screen.