Configuring Interpolated Line Styles in WinCC Comfort Trends

David Krause16 min read
HMI / SCADASiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

WinCC Comfort and WinCC Advanced (TIA Portal V13 SP1 and later) provide flexible line rendering styles for trend views. When visualizing time-series or XY data on HMI panels, the choice between interpolated, stepped, and points rendering changes how intermediate values between two sampled points are drawn. For process data sampled at low rates (1 s to 5 s is typical for HMI acquisition cycles), the interpolated style produces a continuous trace that makes trends easier to read at a glance, while stepped rendering preserves the sampled-and-held semantics typical of digital or batch values. This article walks through configuring an interpolated trend line for a single trend and then for a multi-trend view that displays three independent datasets, each containing eight sampled points (typical scenarios include three-axis machine position, three-phase electrical values, three-product batch curves, or three-zone oven temperatures).

WinCC trend views support the following rendering styles, configured per trend in the trend view configuration editor:

  • Interpolated – straight line segments between successive samples (linear interpolation).
  • Stepped – staircase / sampled-and-held, used for digital or batch processes.
  • Points – only sample markers are drawn, no connecting segments.
  • Stepped + Points – staircase with markers at each transition.
Note: The interpolation performed by the trend view is purely visual. No new samples are written to the trend buffer; the runtime draws a straight line between two existing samples when the screen is refreshed. If you need the interpolated value to be available in a script or in a tag, you must compute it in the PLC.

Prerequisites

  • Siemens TIA Portal V13 SP1 Update 4 or later. WinCC Comfort V13 SP1 ships with TIA Portal V13 SP1; later versions (V14, V15, V15.1, V16, V17, V18) follow the same configuration flow with minor dialog tweaks. Earlier V13 SP1 builds (Update 1 to Update 3) used a different trend editor and did not expose the Interpolated style as a separate selector.
  • WinCC Comfort V13 SP1 or later, or WinCC Advanced, installed and licensed on the engineering station. WinCC Basic (used for KTP400 Basic Panels) does not support trend views.
  • Supported HMI runtime: SIMATIC Comfort Panel (TP700 / TP900 / TP1200 / TP1500 / TP1900 / TP2200) or a WinCC Advanced / Professional PC Runtime. Some properties (line thickness, anti-aliasing) are panel-class dependent.
  • A configured S7-1200 / S7-1500 / S7-300 / S7-400 PLC, or ET 200SP / ET 200pro CPU, with HMI tags already exposed over the HMI connection. Tags can also be HMI-internal if the data originates in a script on the panel.
  • For the multi-trend scenario described below, you need 24 real-value tags (3 datasets × 8 points): e.g. DB_HMI.X11 ... X18, DB_HMI.X21 ... X28, DB_HMI.X31 ... X38. Real (32-bit float) or LReal (64-bit float) is required for interpolated rendering to look natural; integer tags will be cast to float before interpolation and the visual gain is lost.

Linear Interpolation in the WinCC Trend View

The trend view in WinCC does not apply a smoothing spline. It performs linear interpolation between successive sample points in the trend buffer. For two consecutive samples (x₁, y₁) and (x₂, y₂) with x₂ > x₁, the displayed y-value at any horizontal screen coordinate corresponding to x in the interval [x₁, x₂] is:

y(x) = y₁ + (y₂ − y₁) · (x − x₁) / (x₂ − x₁)

This is identical to the linear interpolation method documented in Apple's Accelerate framework reference for vDSP_vlint and vDSP_vgen, and is conceptually similar to a linear trendline on an Excel XY chart. The visual effect on the HMI is a straight line segment between every two adjacent samples, which gives a connected appearance even when the acquisition rate is as low as 0.5 s. For true curve smoothing (cubic spline, Bézier, Catmull–Rom), the trend view does not support that natively; you must sample the source at a higher rate or pre-process the data in the PLC with a smoothing FB (e.g., moving average, Savitzky–Golay, or polynomial fit) before exposing it to the HMI.

Step-by-Step Configuration

Step 1 — Create the PLC-side data block (S7-1200/1500 example)

Open the PLC's program in TIA Portal and create a global data block (DB) named DB_HMI_Trends. Declare three arrays of Real, each with 8 elements. The use of an array is optional but recommended because it allows cyclic shifting of the trend buffer from a single index register.

DATA_BLOCK "DB_HMI_Trends"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
NON_RETAIN
  STRUCT
   Trend_A : Array[1..8] of Real;  // first dataset (X11..X18)
   Trend_B : Array[1..8] of Real;  // second dataset (X21..X28)
   Trend_C : Array[1..8] of Real;  // third dataset (X31..X38)
   SampleTick : Int;               // incremented each acquisition
  END_STRUCT;
END_DATA_BLOCK

Step 2 — Expose the 24 HMI tags

In the HMI device configuration, open HMI Tags, create a tag group TrendData, and add 24 tags on the configured HMI connection, PLC address DB_HMI_Trends.Trend_A[1] through Trend_C[8]. Set the data type to Real (32-bit floating point). Acquisition mode should be Cyclic continuous with an acquisition cycle of 1 s by default; lower it to 500 ms if the curves need more detail, raise it to 5 s if the data is slow-changing.

Tag-type requirement: Although WinCC will accept Int and Word tags, use Real whenever the underlying value is a measurement (temperature, pressure, flow, current, position). Interpolated rendering between integer tags produces visually identical results to stepped rendering because the cast to float adds no fractional information; only the line color/width changes.

Step 3 — Add a Trend View to a screen

  1. In the project tree, expand HMI Device → Screens and double-click the screen that should contain the trend (e.g., Screen_Overview).
  2. From the Tools task card, drag a Trend view control onto the screen. The default size 200 × 120 mm is fine for a TP700/900; resize to 280 × 160 mm for a TP1200/1500.
  3. The trend view is placed with one default trend already configured. You will configure it in the next step.

Step 4 — Configure trend view properties

Select the trend view and open the Properties pane (View → Properties). The relevant property groups are:

Property group Setting Recommended value
Appearance → Background Trend background Light gray (RGB 240, 240, 240) or white for high contrast
Axis → Time axis Mode "Time" if the trend is timestamped by the panel; "Value" if you drive the X-axis from a tag
Axis → Time axis Time range / Span 5 min for fast batch, 1 h for shift overview, 24 h for daily trend
Axis → Value axis (left) Min / Max Match the physical range of the data (e.g. 0–100 °C); auto-scale only for diagnostics screens
Axis → Value axis (left) Labeling Show major grid lines every 25 % of range
Layout → Number of trends Trend count 3 (matches the three datasets)
Layout → Show legend Legend visibility On (color, tag name, current value)
Layout → Show ruler Ruler visibility On, with X and Y readouts
Misc → Update cycle Screen refresh 1 s (matches tag acquisition)

Step 5 — Configure the first trend (line style = Interpolated)

  1. In the trend view configuration, click the Trends tab (or expand Layout → Trends in the Properties pane). The default trend is Trend 1.
  2. Assign the tag: Trend 1 → Tag nameTrendData / Trend_A[1]. The trend view samples the array element at every acquisition tick.
  3. Click the Style column for Trend 1. A dialog Trend 1 – Style opens with two sections, General and Line points.
  4. In the General section, set Line type to Interpolated. The other three options (Stepped, Points, Stepped + Points) are mutually exclusive and are replaced by the selector.
  5. Set Line color to a distinct color (e.g., Siemens color 1 – deep blue, RGB 0, 0, 255).
  6. Set Line width to 2 px for a TP700/900, 3 px for TP1200 and larger. The Comfort Panel runtime renderer applies basic anti-aliasing on horizontal and vertical segments only.
  7. Optionally toggle Display of limit values and assign upper/lower limit tags if the trend needs a high/low alarm band.
Tip: The dialog you reach here is exactly the one referenced in user discussions – click the Style column for a trend row, the General section appears, and Line type exposes the Interpolated option alongside Stepped, Points, and Stepped + Points. If the dialog does not appear, right-click the trend row and choose Properties instead.

Step 6 — Add the second and third trends

  1. Click the + button in the Trends tab twice to add Trend 2 and Trend 3.
  2. For Trend 2: tag = TrendData / Trend_B[1], line type = Interpolated, color = Siemens color 2 (red, RGB 255, 0, 0), line width = same as Trend 1.
  3. For Trend 3: tag = TrendData / Trend_C[1], line type = Interpolated, color = Siemens color 3 (green, RGB 0, 176, 80), line width = same as Trend 1.
  4. Confirm with OK. The three colored line segments should now appear in the trend view's runtime preview.

Step 7 — Map the eight points per dataset

The original question lists X11..X18, X21..X28, X31..X38 as eight distinct real values per dataset. To plot all eight points as a single line you have two design options:

  • Option A — Single trend with array tag: Store the eight values in a PLC array (Trend_A[1..8]). The trend view samples the array element pointed to by the Index tag, which is incremented on every acquisition tick. The result is a single connected line of eight points, drawn with linear interpolation between them. This is the cleanest option for batch data and matches the layout of the user's question.
  • Option B — Eight separate trends: Create eight tags per dataset (24 total) and assign each tag to its own trend. The trend view will draw 8 lines per dataset, each with one point. To get a single line you must additionally set the trend's Line type to Interpolated and enable Connect sample points across all trends of this group (only available in WinCC Advanced / Professional, not in WinCC Comfort).

For the user's scenario, Option A is the recommended path. Use a small index register on the PLC side and let the HMI cycle through the array elements. The acquisition cycle and the index increment must be identical, or the horizontal spacing between points will be uneven.

Step 8 — Compile, download, and verify

  1. In the project tree, right-click the HMI device and choose Compile → Software (rebuild all). Resolve any tag or connection errors reported in the inspector.
  2. Download the HMI software to the panel: right-click the device → Download to device → Software. The panel will restart the runtime.
  3. On the panel, navigate to the screen with the trend view. You should see three lines, each rendered with straight-line segments between successive points, all in the colors you configured.
  4. Toggle the line type of Trend 1 to Stepped to confirm that the line style is the only thing changing; the underlying data and the tag connection remain identical.

Tag Configuration Best Practices

  • Use acquisition mode = Cyclic continuous for sampled-and-stored data. Use "On demand" / "On change" only when the data is event-driven (e.g., batch end-of-step), otherwise the trend will be sparse.
  • Set the acquisition cycle equal to the PLC's SampleTick period. Mismatched rates cause the line to compress or stretch horizontally even though the data values are correct.
  • Define the trend buffer length to match the number of points you want to retain. The default is 600 samples. For 8 points × 50 ms acquisition, the default buffer covers 30 s, which is fine for a process overview.
  • Use a timestamp tag (PLC-side) for highly accurate time correlation, especially when the panel and PLC clocks drift. Without a timestamp tag, the trend view uses the panel's local time and can jump after a daylight-saving change.
  • Group the 24 tags into a single HMI tag folder so that the connection drop-out is reported once, not 24 times.

Performance Considerations

Interpolated rendering is the most expensive of the three line types because the renderer must compute a y-value for every horizontal pixel between two sample points. On a TP700 with three trends at 1 s acquisition and a 200 × 120 mm trend area, the runtime spends a non-trivial fraction of its CPU time on trend redraws; on a TP1200 with six trends and 500 ms acquisition the trend area becomes the largest single redraw cost on the screen. To keep the panel responsive:

  • Limit the number of trends per trend view to 8 (Comfort Panel hard limit) or 16 (Advanced runtime soft limit).
  • Use stepped or points rendering for digital or batch values where the interpolated visual is misleading anyway.
  • Reduce the trend's redraw rate to the same value as the acquisition cycle; setting a faster redraw cycle (e.g., 100 ms for 1 s data) wastes CPU without adding information.
  • For map-like 2D plots, consider switching to a WinCC Advanced PC Runtime and using the Function trend control with an XY axis – the function trend does the same linear interpolation and supports more flexible axis configuration.

Troubleshooting Matrix

Symptom Likely cause Resolution
Line type "Interpolated" is greyed out in the Style dialog Trend view is bound to a Basic Panel runtime that does not support interpolation Use a Comfort Panel (TP700 or higher) or a WinCC Advanced Runtime; Basic Panels support only stepped and points styles
Trend line is drawn but looks identical to stepped Tag data type is Int / Word; float cast adds no fractional information Change the HMI tag data type to Real and re-link the trend, or sample at a higher rate in the PLC
Only the last sample is visible; no historical trace Trend buffer is empty or acquisition is event-driven ("On change") Switch acquisition to Cyclic continuous and verify the tag is actually being updated by reading it from the PLC
Three lines are drawn but only one tag is updated All three trends are bound to the same HMI tag (e.g., copy/paste error) Open the trend view configuration and verify the tag name on each row; re-link Trend 2 and Trend 3 to Trend_B[1] and Trend_C[1]
Horizontal spacing between points is uneven PLC SampleTick period does not match the HMI acquisition cycle Set both to the same value (e.g., 1 s) and ensure the PLC updates the index register on a fixed-period OB (e.g., OB35 with 1000 ms)
Trend shows a flat line at the value-axis minimum Tag PLC address is wrong or the connection is not established Open Connections in the HMI device and run Check consistency; verify the partner (PLC) is online and the DB is not optimized-access-blocked
Line is jagged / aliased on a TP700 Hardware line drawing is low-DPI Acceptable: TP700 is 800 × 480. For smoother rendering use TP1200 (1280 × 800) or higher; do not use the trend view for a "true" chart on small panels
Line type selector not visible at all WinCC Comfort V13 SP1 build is older than Update 4 Install TIA Portal V13 SP1 Update 4 (or move to V14+); earlier builds had a different trend editor
Compiler warning "Tag not updated because address is in optimized block" S7-1500 optimized-block access; symbolic access path is correct but raw offset cannot be computed Disable optimized block access for DB_HMI_Trends, or use the symbolic HMI tag view (TIA Portal V14+); the trend will still work symbolically, the warning is informational only

Verification Checklist

  1. Visual: three colored lines, each drawn as a sequence of straight segments.
  2. Numerical: tap a point on any line with the ruler – the Y-value must match the source tag, or its linearly interpolated value between two samples.
  3. Timing: the X-coordinate of each sample must be exactly one acquisition-cycle apart; measure by tapping the ruler at two adjacent points.
  4. Color / width: confirm that Trend 1 is blue, Trend 2 is red, Trend 3 is green (or the colors you chose); change one and re-download to confirm the property is wired correctly.
  5. Style toggle: switch Trend 1 from Interpolated to Stepped and re-download. The line should become a staircase while the other two remain interpolated. This proves the line-type property is per-trend and not a view-level setting.
  6. Load: check the panel's CPU load from the System → Resource usage screen. Interpolated rendering on three trends should keep the load comfortably below the Comfort Panel's 70 % safety threshold.

Design Notes — From a Single Trend to a Multi-Axis Map

The original question mentions a "map" with three lines between three datasets. In WinCC Comfort, a multi-trend view is the closest equivalent to a multi-line XY plot. If you need a true 2D map (X = horizontal position, Y = vertical position, one line per dataset, all sharing the same value axes), migrate to WinCC Advanced or Professional and use the Function trend control with the Index property set to a tag that walks the array index 1..8. The function trend also supports linear interpolation between samples; the configuration path is Function trend → Data source → Tag name = <array tag>, Index tag = <index register>, then the Style column exposes the same Interpolated / Stepped / Points selector described above.

For full cross-platform support, the same configuration logic is available in the TIA Portal Help system under Editing HMI projects → Configuring trends → Configuring the trend view → Trend display modes. The TIA Portal Help is the authoritative reference for dialogs that may shift slightly between V13 SP1 and V18.

Operational tip: If the panel is rebooted while the trend is filling, the unsampled points are lost. Persist the array to a retentive DB on the PLC side if the trend must survive a power cycle.

FAQ

What is the difference between Interpolated, Stepped, and Points trend styles in WinCC Comfort?

Interpolated draws a straight line between every two adjacent samples (linear interpolation). Stepped holds the previous value until the next sample arrives (staircase, used for digital or batch values). Points plots only the sample markers with no connecting line. The choice is set per trend in the trend view configuration's Style dialog under General → Line type.

Can I configure three independent trend lines on one trend view in WinCC Comfort V13 SP1?

Yes. Set Layout → Number of trends to 3, then add three rows in the Trends tab. Assign each row a different HMI tag (e.g., Trend_A[1], Trend_B[1], Trend_C[1]), set each line type to Interpolated, and pick a distinct color and width. The runtime will draw all three lines on the same value axis.

Why does my interpolated trend look the same as a stepped one?

Most often the source tag is integer-typed, so casting to float adds no fractional information and the line drops back to the same staircase shape. Switch the HMI tag data type to Real and re-link the trend, or sample the underlying value at a higher rate in the PLC so successive samples differ.

Do I need WinCC Advanced to get a smooth (cubic) interpolation, or does WinCC Comfort support it?

Neither supports true cubic interpolation. Both WinCC Comfort and WinCC Advanced use linear interpolation for the Interpolated line type. For cubic / spline smoothing you must compute the smoothed values in the PLC and expose the smoothed array to the HMI, or sample the process at a higher rate so the linear segments approximate a curve.

How do I plot eight points (X11..X18) as a single line on a Comfort Panel?

Store the eight values in a PLC array (e.g., Trend_A : Array[1..8] of Real), create a single HMI tag pointing to the array's index register, and assign that tag to one trend row. The trend view samples the array element at every acquisition tick, producing eight connected points rendered as a single line. Alternatively, create eight trends per dataset and enable Connect sample points across all trends of this group (WinCC Advanced / Professional only).

Back to blog