Create a data log with a defined number of entries and a storage location, assign logging tags with an acquisition cycle, then add a trend view control and select the logged tag for historical curves or the PLC tag directly for a real-time curve. A circular log overwrites the oldest data; a segmented log creates a new file when the log is full.
- Log at the rate the process changes, not at the fastest rate the panel allows; over-logging fills storage and slows the panel.
- Real-time trends read the tag directly and disappear on restart; historical trends need a data log behind them.
- Storage media matters: an industrial SD or USB rated for continuous writing is not optional for a log that runs every shift.
Real-Time Trends Versus Logged Trends
A Comfort panel can draw two different kinds of curve, and choosing the wrong one is a common first mistake.
- Real-time curve: reads the tag directly and plots values as they arrive. It needs no configuration beyond the tag, but the history exists only in panel memory and is lost when runtime restarts.
- Logged curve: reads from a data log stored on the panel media. It survives a restart, can be scrolled back over hours or days, and can be exported for analysis.
Use a real-time curve for a commissioning screen where an engineer is watching a valve respond right now. Use a logged curve for anything an operator or supervisor might want to look back at, such as a temperature profile through a batch.
The values must be scaled correctly in the PLC before they are logged. Logging raw analog counts and converting them later makes the archive almost useless; see PLC analog input scaling in TIA Portal.
Creating a Data Log
Open Historical data → Data logs in the HMI device tree and create a log. The properties decide how much data you keep and what happens when the log is full.
| Property | Meaning | Practical guidance |
|---|---|---|
| Number of entries | Maximum records in the log | Calculate from cycle time and the period you need to keep |
| Storage location | SD card, USB stick or network path | Use industrial-grade media rated for continuous writing |
| File format | CSV or RDB | CSV opens in Excel; RDB is faster for large logs |
| Logging method: circular | Oldest entries overwritten when full | Continuous process monitoring |
| Logging method: segmented | New file created when the log is full | Batch records that must be kept separately |
| Logging method: display message | Warning at a fill level, then stop | Where losing data is unacceptable |
| Enable logging at start | Log starts with runtime | Normally enabled for process logs |
Work out the size before you commit. Ten tags logged every second for one shift is over 280,000 values. The same tags logged every ten seconds still show every meaningful process change and use a tenth of the space.
Assigning Logging Tags and Cycles
Each HMI tag has a Logging section in its properties where you select the data log and the acquisition mode.
- Cyclic: a value is written every acquisition cycle, giving evenly spaced samples.
- On change: a value is written only when it changes by more than a defined amount, which suits slow processes.
- On demand: logging is triggered by a script or an event, which suits batch end records.
Choosing the cycle
| Process | Typical cycle | Reason |
|---|---|---|
| Oven or furnace temperature | 10 to 30 seconds | Thermal mass changes slowly |
| Tank level | 5 to 10 seconds | Fill and empty rates are gradual |
| Line pressure | 1 to 2 seconds | Faster transients matter |
| Motor current during start | 200 to 500 ms | Start peak lasts only seconds |
| Production counters | On change or per shift | Values step rather than drift |
Only log what someone will look at. A log with two hundred tags is not a diagnostic tool, it is a storage problem. Pick the process values that explain machine behaviour and leave the rest in the PLC.
Set up logging and trends on real hardware
Softwell HMI and WinCC sessions cover data logs, archives and trend controls with live process signals.
Configuring the Trend View Control
Add a trend view from the toolbox and open its properties. The control can display several curves at once, each with its own source and axis.
- Add a curve and choose the source: real-time cyclical for a live tag, or logged values for a data log entry.
- Assign the value axis with a range that matches the measurement, not an automatic scale that changes under the operator.
- Set the time axis to a useful window, typically 30 minutes to 8 hours for a shift view.
- Enable the ruler so the operator can read exact values at a point in time.
- Add the toolbar buttons for scrolling, zoom, start and stop of the display.
Plot the setpoint on the same axis as the process value. A temperature curve on its own says the oven is at 178 degrees; the same curve with the setpoint drawn beside it says the oven has been two degrees low for the last hour, which is the information a process engineer needs.
Use distinct line colours and keep them consistent across every screen. On a monochrome or bright shop floor screen, also vary line thickness so curves remain distinguishable.
For plant-level historical analysis across many machines, the same principles scale up to SCADA archives; see SCADA trend configuration.
Hands-On Lab: Log a Process Value and Trend It
Hands-on- TIA Portal with WinCC Comfort and a panel or panel simulation
- One analog process value and its setpoint available as PLC tags
- An SD card, USB stick or a simulated storage path
- Estimated time: 35 minutes
Create the data log
Add a data log with 5,000 entries, CSV format, circular logging and enable it at runtime start.
Assign the logging tags
Set the process value and setpoint tags to cyclic logging with a ten second acquisition cycle.
Add a trend view
Place a trend view on a screen and add two logged curves, one per tag, sharing a value axis with a fixed range.
Configure axes and toolbar
Set the time axis to one hour, enable the ruler and add scroll and zoom buttons.
Test persistence
Change the process value, let it log, then stop and restart runtime.
Data is written at a sensible cycle, the log survives a runtime restart, setpoint and process value share one axis, and the operator can scroll and read exact values.
Frequently asked questions
What is the difference between a real-time and a logged trend?
A real-time trend plots the tag as it changes and keeps no permanent record. A logged trend reads from a data log stored on the panel media and survives a runtime restart.
Circular or segmented logging, which should I use?
Circular suits continuous monitoring where only recent history matters. Segmented creates a new file when the log fills, which suits batch records that must be archived separately.
How fast should I log a temperature?
Usually every ten to thirty seconds. Thermal processes change slowly, and faster logging produces large files without adding information.
Why has my panel become slow after adding logging?
Too many tags at too fast a cycle, or unsuitable storage media. Reduce the number of logged tags, lengthen the acquisition cycle and use industrial-grade storage rated for continuous writing.
