Overview: The Vertical Trend Problem in SIMATIC HMI
SIMATIC HMI trend controls shipped with TIA Portal (Comfort Panels, WinCC Runtime Advanced, and WinCC Unified) are designed around a horizontal time axis. The process variable is plotted on the Y-axis, time advances left-to-right on the X-axis, and the controller does not expose a property that rotates the plot 90° so that "newest sample" appears at the top and "oldest sample" at the bottom. Engineers who request a vertical trend view are usually trying to mimic the layout used in older third-party SCADA packages, or to align the trend with a vertical P&ID-style tank, column, or stack-level diagram drawn on the same screen.
The vertical trend is not a configuration toggle. It is achieved by replacing the standard f(t) trend with an f(x) trend, mapping the time tag to the X-axis and the process tag to the Y-axis, and reversing the direction of the X-axis so that time flows from bottom to top. The result visually matches a vertical trend without modifying the trend control's source code or invoking a non-Siemens ActiveX control.
Prerequisites
| Item | Required Version / Specification |
|---|---|
| TIA Portal | V13 SP1 Update 2 or higher (V15.1, V16, V17, V18, V19, V20 confirmed compatible) |
| Comfort Panel firmware | WinCC Comfort V13 SP1 or higher image on the panel |
| Project HMI device | TP700 / TP900 / TP1200 / TP1500 / TP1900 / TP2200 or KP-series |
| Runtime | WinCC Runtime Advanced (PC-based) or Comfort Panel RT |
| Licensing | Standard HMI configuration license; no add-ons required for f(x) trends |
| Tags required | 1 process tag (any numeric type) plus 1 time-source tag (typically the system time, an internal "Time_ms" tag, or a controller-derived time) |
Reference the official Siemens knowledge base article 109481693 - Creating an f(x) trend view for Comfort Panels and WinCC Runtime Advanced for the canonical project walkthrough, and the attached PDF 109481693_DOC_v10_en.pdf for the procedure PDF.
Why a Standard f(t) Trend Cannot Be Rotated
The default trend control in TIA Portal binds the horizontal axis to time. The trend direction is implicit and cannot be rotated through the Properties pane. Inspecting the property list under Properties > Axis > X axis shows only standard items: Display name, Selection mode, Range from / to, Color, Line style, and Autoscale. There is no Direction = Vertical property. Attempting to swap the tag assignments in an f(t) control does not change the rendering direction because the axis itself is fixed to the time dimension.
The f(x) trend control, by contrast, treats the X-axis as a user-defined numeric value. The tag assigned to Value column 1 drives the X coordinate, and the tag assigned to Value column 2 drives the Y coordinate. Because both axes are now data-driven, the axis direction properties become meaningful and the X-axis can be reversed so that older samples render above newer ones.
Solution Architecture: Mapping Time onto X
To simulate a vertical trend:
- Provide a monotonically increasing time-source tag (for example, an internal
TimeSecondstag updated every 100 ms by the PLC, or a configured WinCC tag derived from the panel's system clock scaled to seconds). - Bind that time tag to the X-axis (Value column 1) of the f(x) trend.
- Bind the actual process tag (level, pressure, temperature, etc.) to the Y-axis (Value column 2).
- Set the X-axis Direction property to "Bottom to top" so that older samples appear at the top and the trace grows downward as time advances.
- Configure the X-axis range so that the visible window matches the desired trend time-span (e.g., X from 0 to 300 for a five-minute history at 1 Hz).
The visual outcome is a vertical trace that scrolls downward in real time, matching what the user originally asked for in the forum post.
Step-by-Step Configuration
Step 1 - Open the Project and Add an f(x) Trend Control
Open the TIA Portal project containing the HMI device. In the project tree, navigate to HMI device > Screens > [target screen] and double-click the screen to open the editor. From the Toolbox under Controls, drag an f(x) trend view (not the standard trend view) onto the canvas. Position and resize the control to match the screen layout.
Step 2 - Declare the Internal Time Tag
If the project does not already contain a seconds-resolution time tag, create one:
- In the HMI tag table, add a new tag named
HMI_TrendTime_swith data typeReal(32-bit float) and acquisition modeCyclic continuouswith a 100 ms update cycle. - In the Properties of the tag, set Acquisition cycle to 100 ms. At runtime the tag will hold the elapsed seconds since the screen started, but TIA does not natively provide an "elapsed seconds" tag, so a derived PLC tag or an HMI script must populate it.
- Alternative: in the PLC, add a counter
TimeCounter_sincremented every scan and write it to the HMI tagHMI_TrendTime_svia a PUT/GET or via the HMI connection. This avoids any scripting.
If using a S7-1200/S7-1500 controller, the following Structured Text block in a cyclic OB (e.g., OB1 or OB35) is sufficient:
IF "TimeCounter_s" > 1.0e+9 THEN
"TimeCounter_s" := 0.0;
END_IF;
"HMI_TrendTime_s" := "TimeCounter_s";
Ensure the HMI tag HMI_TrendTime_s is mapped one-to-one to the PLC tag of the same name over the HMI connection.
Step 3 - Bind the Process Tag
Add or reference the process tag to be displayed, for example TankLevel_pct (data type Real, range 0..100). Verify it is also visible to the HMI connection.
Step 3 - Configure the Trend Channels
Select the f(x) trend control on the canvas. In the Properties window, expand Properties > Trend > Trends. By default the f(x) trend accepts two value columns (X and Y). Configure as follows:
| Property | Setting |
|---|---|
| Value column 1 (X) | Tag: HMI_TrendTime_s
|
| Value column 2 (Y) | Tag: TankLevel_pct
|
| Number of value pairs | 600 (10 min at 1 Hz, or adjust to project requirements) |
| Update mode | Cyclic continuous |
| Sampling interval | 1000 ms |
Step 4 - Reverse the X-Axis Direction
This is the critical step that yields the vertical-trend visual. Navigate to Properties > Axis > X axis and set:
- Direction: Bottom to top
- Range from: 0
- Range to: 300 (for a 5-minute visible history; equivalent to "time elapsed since the left edge of the visible window")
- Label format: HH:mm:ss or pure seconds depending on the time tag scaling
For the Y-axis, set the typical engineering-units range for the process variable, e.g., 0..100% for a level, -50..+150 °C for a temperature, etc.
Step 5 - Configure Aesthetics and Tooltips
Under Properties > Appearance, set the trace color, line width (1 px for thin traces, 2 px for emphasis), and the gridline spacing. Enable the value tooltip so that touching or hovering a data point returns both coordinates. This is essential because the standard f(t) tooltip is time-stamped; in f(x) it returns the X-Y pair which is precisely the time-value pair needed.
Step 6 - Compile and Download
Compile the HMI station (Right-click HMI device > Compile > Software (all)) and download to the Comfort Panel. Verify the panel firmware matches the project version; mismatched firmware triggers alarm 130002 - "Firmware version of HMI device differs from the configured version" in the TIA Portal diagnostics.
WinCC Unified Equivalent (TIA Portal V17 / V20)
Unified Comfort Panels and WinCC Unified V20 do not ship a distinct "f(x) trend view" object. The vertical-trend effect is achieved using the standard Trend control (RT Unified) with a configured tag pair and an inverted time-axis property set. Reference the official WinCC Unified - Trend control documentation.
For Unified panels, configure:
- Add a Trend control to the screen.
- Under Properties > Traces, add a single trace bound to the process tag.
- Switch the time source from "System time" to a user-defined time tag (
TrendTime_s) and bind it to a custom X-axis via Properties > Time axis > Time source = Tag. - Set the Direction of the time axis to Bottom to top.
The Unified Trend control also exposes a Curve type property with values Stepped, Interpolated, and Points only. For a moving real-time trace, leave this at Interpolated. For a historical archive replay, switch to Stepped to avoid spurious interpolation between archive entries.
Tag and Parameter Mapping Table
| Property Path | Comfort Panel Value | WinCC Unified Value |
|---|---|---|
| Control type | f(x) trend view | Trend control (RT Unified) |
| X-axis tag | User-defined time tag (Real, seconds) | User-defined time tag OR system time |
| Y-axis tag | Process tag (Real/Int) | Process tag |
| Number of samples | 1..10000 (depends on panel RAM) | 1..100000 (depends on archive) |
| X-axis direction | Bottom to top (set via Direction property) | Bottom to top (set via Time axis > Direction) |
| Curve type | Interpolated only | Stepped / Interpolated / Points |
| Tooltip | Yes - returns X-Y pair | Yes - returns time-value pair |
| Export to CSV | Yes via control's context menu | Yes via property ExportDataTrigger |
Verification Steps
After downloading the project to the panel, perform the following checks:
- Initial render: Power-cycle the panel and confirm the f(x) trend control displays with the X-axis labeled and the process variable trace visible within the configured Y-range.
- Direction check: Allow the trend to run for at least 30 seconds. Confirm that older samples accumulate at the top of the control and newer samples at the bottom. If the trend grows upward instead, the X-axis Direction property is set to "Top to bottom" and must be inverted.
- Tag update verification: Force the process tag to step through 0%, 25%, 50%, 75%, 100% in the PLC watch table. Verify that each value appears in the trend within the configured acquisition cycle (default 1 s).
- Tooltip check: Touch a point on the trace. The tooltip should show the time value (X) and the process value (Y). The X value should be the cumulative seconds since the time tag was last reset.
- Memory check: On the Comfort Panel web server (https://<panel-ip>/main), navigate to Diagnostics > Memory. With 600 samples at 4 bytes per Real pair, expect ~2.4 KB per trend control. Large sample counts (10,000+) can exhaust the 12 MB working memory on TP700 panels.
- Compile warning check: In TIA Portal, open Project tree > HMI device > Compile output. Warnings 130004 (insufficient memory) or 130005 (tag not connected) must be cleared before deployment.
Performance and Memory Limits
Comfort Panels allocate the trend sample buffer in working RAM, not the remanent memory. For a TP700 with 12 MB of working memory, do not exceed 5,000 sample pairs across all f(x) trend controls on the same screen. A TP2200 with 64 MB can host 50,000+ pairs without contention. The WinCC Runtime Advanced PC-based runtime is bounded only by host RAM, but the PLC-HMI tag update bandwidth becomes the practical ceiling; do not exceed 1,000 tag updates per second per HMI connection on PROFINET.
Troubleshooting Matrix
| Symptom | Likely Root Cause | Remediation |
|---|---|---|
| Trend renders horizontally regardless of axis settings | Standard f(t) trend view used instead of f(x) | Replace the control on the canvas; ensure the toolbox item is "f(x) trend view" |
| Trace grows upward instead of downward | X-axis Direction is "Top to bottom" | Switch to "Bottom to top" |
| All samples stack at the same Y value | Process tag is constant or HMI connection is offline | Check PLC tag value; verify HMI connection status via Diagnostics |
| Tooltip returns wrong values | Value columns swapped (Y bound to time, X bound to process) | Swap the tag assignments in Value column 1 vs Value column 2 |
| Compile warning 130004 | Sample count exceeds available working memory | Reduce Number of value pairs or split the trend across multiple screens |
| Compile error 130002 | Project compiled with V18 but panel firmware is V16 | Update panel firmware via ProSave or recompile in TIA V16 |
| Stale samples on the trend | Acquisition cycle too long for the time-tag update rate | Reduce Sampling interval to match the time-tag update cycle |
| Trend blank after panel restart | Internal time tag was not reset to zero on startup | Add initialization in OB100 of the PLC to reset the time counter |
Edge Cases and Field-Proven Caveats
-
Tag type mismatch: If the time tag is declared as
DIntinstead ofReal, the trend will still render but the axis labeling will round to integers. Convert toRealfor sub-second resolution. - Clock rollover: The PLC-derived time tag will overflow after approximately 136 years for an unsigned 32-bit counter. In practice reset the counter every shift or every 24 hours via a scheduler block to avoid axis range surprises.
- Multi-trend screens: Multiple f(x) trend controls on the same screen share the same acquisition cycle, so a 100 ms update on five controls results in 50 acquisitions per second per control. Monitor the HMI station's CPU load in Diagnostics > Performance; above 80% CPU, increase the cycle or split the controls across screens.
- Touch ergonomics: Vertical trends on KTP400 monochrome panels are difficult to read because the screen height is only 240 pixels. Use the technique only on TP700 and larger.
- Archive compatibility: f(x) trend samples are not written to the panel's process value archive by default. Enable Properties > Trend > Archive and add an archive of type Tag logging slow if historical persistence is required.
Frequently Asked Questions
Can a standard SIMATIC trend view be rotated 90° without using f(x)?
No. The standard f(t) trend control has no exposed property to change the axis direction. The only documented method is to switch to the f(x) trend view and bind the time tag to the X-axis, then reverse the X-axis direction to "Bottom to top".
Which TIA Portal versions support f(x) trend views on Comfort Panels?
Any version from V13 SP1 Update 2 onward supports f(x) trend views, including V15.1, V16, V17, V18, V19, and V20. For Unified Comfort Panels and WinCC Unified, the equivalent vertical trend is achieved with the Trend control (RT Unified) object as documented in the TIA Portal V20 help.
How many sample pairs can a Comfort Panel f(x) trend store?
The practical limit depends on the panel's working memory: approximately 5,000 sample pairs on a TP700 (12 MB RAM) and up to 50,000 on a TP2200 (64 MB RAM). Each Real pair consumes 8 bytes (two 32-bit floats).
Where can I download the official Siemens f(x) trend procedure?
The canonical article is Siemens support entry 109481693, "Creating an f(x) trend view for Comfort Panels and WinCC Runtime Advanced", available at support.industry.siemens.com. The attached procedure PDF is 109481693_DOC_v10_en.pdf.
Why does my tooltip show swapped values after migration from f(t) to f(x)?
In f(t) the time is implicit and the tooltip returns (time, value). In f(x) the tooltip returns (X-column value, Y-column value). If the time tag is bound to Value column 1 (X) and the process tag to Value column 2 (Y), the tooltip's first number is time and the second is the process value. Swapping the two columns will swap the tooltip output.