Problem Description
A TP1500 Comfort panel (WinCC Comfort / TIA Portal, e.g. 6AV2 124-1MC01-0AX0) configured with three HMI data logs (Level, Pressure, Temperature) writes a valid TimeString column but a corrupted VarValue column for the pressure archive. The temperature and level archives appear correct, but the pressure tags PT_01_PV and PT_02_PV show long integer strings that obviously do not belong to a single sample.
Typical observed CSV row (problematic pressure archive):
VarName;TimeString;VarValue;Validity;Time_ms
PT_01_PV;17.07.2018 11:48:45;-2847;2221;432984921;8194;44
PT_02_PV;17.07.2018 11:48:45;1157;4071;432984921;8194;44
Compared with the temperature archive (correct, single-value per row):
VarName;TimeString;VarValue;Validity;Time_ms
TT_02_PV;17.07.2018 11:48:45;26;81;4;3298492;1819;329
TT_03_PV;17.07.2018 11:48:45;26;51;4;3298492;1819;329
The number of columns in the pressure archive exceeds the configured schema. The values that the field transmitter delivers (4–20 mA, scaled 0–200 with engineering unit bar) are Real (IEEE-754, 32-bit) at runtime, but the CSV row contains up to six integer fragments per sample.
Root Cause Analysis
WinCC Comfort writes data-log samples into the *.csv file on the SD card / USB stick / internal flash of the panel. The character used as the decimal separator is taken from the active runtime language / regional locale. When the runtime is set to a locale that uses the comma as decimal separator (de-DE, fr-FR, it-IT, es-ES, etc.) and the CSV column delimiter in the file is also a comma (the WinCC default), the floating-point mantissa is broken up into multiple delimited fields.
For example, the Real value 1.1432984921819444 bar is written as the string 1,1432984921819444. When the consumer (Microsoft Excel with default CSV mapping, Power Query, or any RFC-4180 parser) reads the row using a comma as a field separator, it splits that one value into two cells:
| Written as text in CSV | Parsed cell 1 | Parsed cell 2 |
|---|---|---|
1,1432984921819444 |
1 |
1432984921819444 |
-2,847222214329849 |
-2 |
847222214329849 |
11,574071432984921 |
11 |
574071432984921 |
Each comma in the mantissa becomes a column break, which is exactly what the user observed in the pressure archive. The temperature archive in this configuration is exposed to the same hazard; if the locale and the column delimiter are both commas, any Real value will be split. The temperature rows in the reported case only appeared "clean" because the values happened to be near integer and produced no extra commas — they are not actually correct, they are simply not visibly broken.
Diagnostic Procedure
- Open the project in TIA Portal and select the TP1500 Comfort device.
- Project tree → Languages & Resources → Project languages. Note the active editing language and the runtime language list.
- Project tree → Runtime settings → Language & font. Verify the languages enabled for runtime and which one is the fallback.
- Open the pressure data log (HMI tags → Data logs → Pressure) and inspect the column Display format for the
PT_xx_PVsource tags. - Pull the SD card / USB stick from the panel and open the CSV in a hex editor or a text editor that shows the raw bytes. Look for a decimal separator character between digits of the
VarValuecolumn. If it is a comma and the field delimiter is also a comma, the locale is the cause. - Cross-check the I/O field bound to
PT_01_PVon the same screen that displays the trend. If the I/O field shows the correct real value, the tag is healthy and the bug is in CSV serialization, not in the PLC / tag chain. - Repeat step 5 for the temperature archive to confirm the same hazard exists there.
Solution 1 — Pin the Runtime Decimal Separator to a Period
The cleanest fix is to make the runtime emit a period as the decimal separator regardless of operator language. This keeps the CSV RFC-4180 compliant.
- Project tree → TP1500 Comfort → Runtime settings → Language & font.
- Click ... next to the Decimal separator field (TIA V14 SP1 and later; for V14 base, see Solution 2).
- Select Period (.) instead of From project language.
- Recompile the HMI, transfer the project to the panel, and reboot the runtime.
- Trigger a new data log entry, export the CSV, and verify the
VarValuecolumn now contains a single Real number per row.
Solution 2 — Set the Project Decimal Separator Explicitly
For TIA V14 base versions that do not expose the runtime decimal-separator switch, control the separator at the project level.
- Menu Options → Settings → General → Decimal separator.
- Choose Period (.).
- Re-open the project (TIA caches this setting on load) and recompile the HMI.
- Transfer to the TP1500 Comfort and trigger a fresh log cycle.
Verify by re-reading the CSV. Every VarValue for the pressure tags should now appear as a single floating-point string, e.g. 1.1432984921819444.
Solution 3 — Change the CSV Column Delimiter to Semicolon
If the operator UI must keep the comma decimal (European locales), change the data log delimiter so it does not collide with the decimal mark. WinCC Comfort on TP1500 allows the delimiter to be configured per data log.
- Project tree → HMI tags → Data logs → Pressure → Properties → Column tab.
- Set Separator to Semicolon (;).
- Optionally set the Decimal separator for the log to From project language so values render as
1,143...on the operator screen while the file structure stays unambiguous. - Recompile and re-transfer.
| Locale | Decimal char | Delimiter char | Real value written | Parsed as |
|---|---|---|---|---|
| en-US | . |
, |
1.1432984921819444 |
1 cell ✓ |
| de-DE | , |
, |
1,1432984921819444 |
2 cells ✗ |
| de-DE | , |
; |
1,1432984921819444 |
1 cell ✓ |
| de-DE | . |
, |
1.1432984921819444 |
1 cell ✓ |
Any of the three bottom rows is correct. The original configuration (top-right) is the bug.
Solution 4 — Verify the Tag Data Type on the Source
Even after fixing the locale, validate that the HMI tag bound to PT_01_PV is Real (32-bit float) end-to-end. A mis-typed DWord or Int tag that is then scaled in the HMI I/O field will appear correct on screen (after scaling) but the data log captures the raw register value as an integer — producing exactly the large numeric strings seen in the user's CSV.
- Project tree → HMI tags → default tag table →
PT_01_PV. - Open Properties → General. Confirm Data type = Real.
- Confirm the connected PLC tag is also Real in the S7-1200 / S7-1500 / S7-300 DB.
- If the PLC tag is
INTbut the engineering range is 0–200, scale it in the PLC (FC/FB with NORM_X / SCALE_X) and expose aREALresult to the HMI. Refer to the Siemens TIA Portal data logging documentation for the data type rules that apply to logged values.
Solution 5 — Sanitize the CSV in Post-Processing
When the panel is already deployed in the field and cannot be re-flashed immediately, fix the export pipeline instead.
- Export the CSV with a semicolon delimiter from the runtime (Solution 3) — this is supported on TP1500 Comfort from firmware V14.0.0.0 onward.
- If you must keep the comma delimiter, open the file in Microsoft Excel using Data → From Text/CSV, set the Decimal separator to
,and the Thousands separator to.in the import wizard. - For automation, use Power Query M:
= Csv.Document(File.Contents("pressure.csv"),[Delimiter=",", DecimalSeparator=","]) - For Python / pandas:
df = pd.read_csv("pressure.csv", decimal=",")
Verification Checklist
| Check | Expected result | Pass criterion |
|---|---|---|
| Open pressure CSV in a hex/text editor |
1.1432984921819444 or 1,1432984921819444 with semicolon delimiter |
Single token per VarValue cell |
| Re-import in Excel with default locale | Single column, real numeric type | No "Text"-typed columns in the import preview |
| I/O field on TP1500 Comfort screen | 1.1 bar (matches PLC) | Equal to 4–20 mA scaled value |
| Cross-check with temperature CSV | Same column count as pressure | No drift in the number of delimiters per row |
| Trend view on the panel | Smooth curve, no spikes | No NaN / Inf / -1.#IND entries in the log |
Edge Cases and Field-Proven Caveats
-
Multiple consecutive commas in mantissa: A value such as
1,001with delimiter,is interpreted as three empty cells (1, empty,001). This is the same root cause as the reported issue. It is especially insidious for tags that occasionally hold values like1.0001. -
Negative values with European locale: WinCC writes a leading
-and then the mantissa with a comma, e.g.-2,847.... Parsers should treat the dash as part of the first cell, not as a separate column. The user's CSV is consistent with this — the leading integer carries the sign. -
Time_ms drift between archives: If the panel's internal clock has not been synchronized, the
Time_mscolumn in the pressure and temperature archives can differ by a few ms even when sampled in the same scan. Sync via NTP (TP1500 Comfort supports NTP from firmware V14.0.0.0) or via PLC time stamping. - Tag data type round-trip: If the user re-reads the CSV with Excel and re-pastes the values into the HMI tag as text, the next archive entry will record a string-encoded number that the data log writer truncates. Always fix the source tag, never patch at the archive layer.
-
Storage location and write cycle: WinCC writes data logs to
/media/simatic/...on the SD card, and to internal flash when the Storage location property is set to Internal flash. For long-term trends, prefer the SD card with a 4 GB or larger card formatted FAT32. See the Siemens TIA Portal data logging overview for the storage rules and the CSV schema details. -
Firmware cross-check: The TP1500 Comfort panel requires TIA Portal V14 SP1 Update 4 (or newer) for full compatibility with the WinCC Comfort V14 SP1 data log engine. Older combinations can produce inconsistent CSV headers and stale
Time_msvalues. Update the panel image to at least16.xbefore opening a Siemens support ticket. - Audit trail: In regulated environments, the corrupted archive must be re-sampled rather than post-processed. Plan a maintenance window, fix the locale (Solution 1 or 2), and trigger a fresh data log cycle to overwrite the bad archive. Never delete a regulated archive in place; move it to an evidence folder and write a deviation note.
Frequently Asked Questions
Why are the pressure CSV values split into multiple integer columns but the I/O field on the TP1500 Comfort shows the correct real value?
The tag and the screen binding are healthy. The corruption happens when the runtime serializes the Real value into the CSV file. If the runtime language uses a comma as the decimal separator and the CSV column delimiter is also a comma, the mantissa is split at every decimal mark. Pin the runtime decimal separator to a period (Runtime settings → Language & font) or switch the data log delimiter to a semicolon.
Which TIA Portal setting controls the decimal separator written to the TP1500 Comfort data log CSV?
In TIA V14 SP1 and later, open the HMI device → Runtime settings → Language & font and override the Decimal separator to Period (.). In V14 base, use Options → Settings → General → Decimal separator. The chosen separator is then used for I/O fields, trends, alarms, and data logs alike.
Can I keep the German operator UI with a comma decimal but still produce a valid CSV?
Yes. Configure the data log column delimiter to a semicolon (;) in the data log properties and leave the runtime decimal separator tied to the project language. The CSV will look like PT_01_PV;17.07.2018 11:48:45;1,1432984921819444;1;432984921 and every parser will keep it as a single cell.
Does the tag data type of PT_01_PV need to be Real, or can it be Int with a 0.1 scale factor in the HMI?
Use Real. If the tag is an Int (e.g. raw 4–20 mA scaled to 0–2000 in the PLC), the data log will record the raw integer and the apparent "splitting" issue will resurface. Scale in the PLC with NORM_X and SCALE_X and expose a Real to the HMI. See the Siemens TIA Portal data logging documentation for the supported source data types.
How do I recover an already-corrupted pressure CSV that has split integer columns?
Re-import the file with the correct locale settings. In Excel use Data → From Text/CSV and set the decimal separator to comma. In pandas use pd.read_csv("pressure.csv", decimal=","). This recovers the original Real values from the integer fragments. Then apply one of Solutions 1–3 to prevent recurrence.