Embedding Trend Views in TP1500 Comfort HMI Reports

David Krause19 min read
HMI / SCADASiemensTechnical Reference
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

Embedding Trend Views in TP1500 Comfort HMI Reports

Including a live trend view or a bitmap snapshot of an active trend in a scheduled or event-driven HMI report on a SIMATIC TP1500 Comfort panel paired with an S7-1200 CPU 1214C is a recurring engineering requirement. The SIMATIC Comfort Panel runtime does not expose the trend view object as a reportable element the way WinCC Runtime Professional does, so the standard "drop the trend into a report template" approach fails. This reference documents why the limitation exists, what is officially supported in TIA Portal V17 through V21, and which workarounds produce deterministic, auditable output on a TP1500 Comfort panel.

Platform scope. All procedures in this article apply to SIMATIC Comfort Panels (TP700 / TP900 / TP1200 / TP1500 / TP1900 / TP2200) running WinCC Comfort / WinCC Advanced. RT Professional behaviors are called out explicitly to avoid confusion. The companion controller family is the SIMATIC S7-1200 (CPU 1211C, 1212C, 1214C, 1215C, 1217C); the article is written against the CPU 1214C DC/DC/DC (6ES7214-1AG40-0XB0) used in the original system, but the HMI-side logic is identical for all S7-1200 CPUs.

1. System Identification and Engineering Environment

Before configuring reports, confirm the exact catalog numbers and firmware combination. The runtime behaviors of the report designer, the VBScript engine, and the trend view depend on the TIA Portal version used to compile the HMI project and the panel image version installed on the TP1500.

Table 1 — Hardware and software baseline for this reference
Component Catalog number / version Role in report workflow
SIMATIC TP1500 Comfort (15.6" widescreen, multitouch, 1280×800) 6AV2124-0MC01-0AX0 (and successor variants 6AV2124-0MC02-0AX0, -0MC03-0AX0) HMI runtime that hosts the trend view and the report scheduler
SIMATIC CPU 1214C DC/DC/DC 6ES7214-1AG40-0XB0 (Firmware V4.4 / V4.5 / V4.6) Process data source for the trend tags
TIA Portal engineering suite V17 (entry point in the source thread), tested through V21 with HSPs Configures HMI tags, trends, reports, and VBScript
WinCC Comfort / Advanced runtime Matches TIA Portal major version, with HMI image patches installed on the panel Renders the report PDF, executes scheduled jobs, and exposes the VBScript host
Firmware alignment rule. The HMI image on the TP1500 must be from the same TIA Portal version family as the project. A project compiled in V17 SP1 will not load a trend view compiled by V19 with new tag data types. Match the engineering suite, the HMI image, and the HMI HSP collection before commissioning the report.

2. Architecture: How Reports Work in a Comfort Panel

The WinCC Comfort report system is a server-side subsystem inside the HMI runtime. It consumes data from logged tags, archives, recipe data, alarm logs, and a small set of object types that the runtime can serialize into the report template at runtime. The architecture is intentionally different from WinCC RT Professional.

CPU 1214CTag values (DB, M, I/Q) HMI Tags (WinCC)Tag manager with cycle / acyclic LoggingTag / alarm / recipe logs Report Template (.rpl)Designed in TIA Portal Report SchedulerTrigger / cycle / event Supported Report ObjectsTables, I/O fields, texts, bars, status, alarm lists, archive tables Unsupported on ComfortTrend view, f(x) trend, Control Hardcopy

The report designer in TIA Portal exposes a fixed set of objects that can be placed on a report template. For Comfort panels these include tag tables, archive tables, alarm views, I/O fields, texts, date/time fields, and graphic I/O fields. The trend view object that you can place on a process screen is not a member of this object set on Comfort panels. The "Control Hardcopy" object, which is a different system object that is bound to a screen and prints the visible contents of that screen into the report, is documented in the WinCC V17 manual and subsequent versions, but it is restricted to WinCC Runtime Professional. A Comfort panel ignores or refuses to compile a Control Hardcopy placed in a report template.

Reference: WinCC V17 manual — Working with Reports (TIA Portal Help entry 109798671).

3. Why the Trend View Cannot Be Embedded Directly

The runtime is built around a strict separation between interactive screen objects and reportable data sources. The trend view on a process screen is rendered by the screen manager and lives in a graphical layer; the report designer only resolves pointers to logged values, not to graphical widgets. Two specific limits apply:

  1. No trend widget in the report toolbox. The Comfort report object palette does not include a "Trend view" or "f(x) trend view" object. The f(x) trend view is documented for WinCC Runtime Professional and PC-based systems; see the TIA Portal help f(x) trend view in reports (RT Professional).
  2. No Control Hardcopy on Comfort. Control Hardcopy is a runtime object that targets a named screen on a Professional runtime and rasterizes the current contents. The Comfort runtime does not implement the same object model, so a Hardcopy reference compiles as a placeholder or is rejected.
  3. VBScript cannot serialize a live trend widget. The VBScript host on a Comfort panel (since V14 SP1) can read and write tags, control the screen, call HMIRuntime functions, and use the screen item collection only for the items exposed on the current screen. It does not expose a method to capture the raster image of a trend view as a portable bitmap that can be re-rendered into a report.

The combination of these three constraints is what motivates the workarounds below. The next sections walk through each approach in order of engineering cost.

4. Workaround A — PrintScreen Function (Lowest Cost)

The PrintScreen function is built into the Comfort panel firmware. It captures the currently displayed screen as a PNG bitmap and either prints it to a configured printer, or — more usefully for report workflows — saves it to a USB stick, a network share, or a local path on the panel file system. The print/save trigger is fired by an event, a button, or a scheduled job.

Reference: PrintScreen function on SIMATIC Panels (Entry ID 58205602).

4.1 Enabling PrintScreen in the project

  1. In TIA Portal, open the HMI device configuration for the TP1500.
  2. Navigate to Runtime settings > Screen > Print (or Printer settings on newer TIA versions).
  3. Enable PrintScreen function and select the output target: Network printer, USB printer, or file export.
  4. For PDF or file workflows, configure the storage path under Storage media. The panel supports SMB network shares (\\server\share\folder) and the local /media/simatic/<USB> path.
  5. On the screen that contains the trend, place a button and wire the Press event to the system function PrintScreen.

4.2 Scheduled PrintScreen for trend reports

The PrintScreen function can be triggered by the scheduler. Combine the scheduler with a screen change to make sure the panel is on the trend screen when the capture fires.

  1. Open Schedules in the HMI project tree.
  2. Create a new trigger, e.g. "Daily_Trend_Report" with the desired cycle (every 5 minutes, shift change, etc.).
  3. Add the events:
    — ActivateScreen with screen name Trend_Overview
    — PrintScreen with output configured for PDF or file
Layout limitation. PrintScreen captures the active screen at its native resolution (1280×800 for the TP1500). The resulting document is therefore in landscape orientation. This is the constraint that the original poster in the source thread was working around. If portrait output is required, see Workaround D.

4.3 Page-format parameters

Table 2 — PrintScreen output parameters (TIA V17 / V21)
Parameter Typical value (TP1500) Notes
Output format PDF, PNG, PCL, PostScript PDF and PNG are the most common for archival
File name pattern \\_ Wildcards resolve at runtime
Color depth 24-bit color or grayscale Grayscale reduces file size by ~70%
DPI Native panel resolution (no upscaling) Comfort does not re-rasterize
Storage path \\nas01\hmi\reports\ or USB SMB share must be reachable from the panel subnet

5. Workaround B — VBScript Screen Capture with HMIRuntime

For a fully automated, dynamic workflow that does not require operator intervention, VBScript can be used to drive the panel through the sequence "change screen → wait for redraw → call PrintScreen → notify the controller". This keeps the capture on the panel and does not depend on a separate PC, but it inherits the landscape-output limitation of PrintScreen.

5.1 VBScript on a scheduled task

Place this script in a function block on the HMI and call it from a scheduler event. It uses the public VBScript APIs that have been available on Comfort panels since TIA V14 SP1.

'==========================================================
' TrendReport_Capture.vbs
' Purpose: switch to the trend screen, printscreen it as a
' named PDF file, then return to the home screen.
' Tested: TIA V17 SP1 / V18 / V19 / V20 / V21 with
'         TP1500 Comfort image 17.0.0.x through 21.0.x
'==========================================================
Const HOME_SCREEN   = "Screen_Home"
Const TREND_SCREEN  = "Screen_TrendOverview"
Const REPORT_DIR    = "\\\\nas01\\hmi\\reports\\"
Const FILE_PREFIX   = "Trend_"

Sub TriggerTrendReport()
    Dim sDate, sTime, sFile, sPath

    ' 1. Switch to the trend screen so the PrintScreen
    '    captures the active trend view, not the home screen.
    HMIRuntime.BaseScreenName = TREND_SCREEN

    ' 2. Build a deterministic file name from date / time.
    sDate = Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2)
    sTime = Right("0" & Hour(Now), 2) & Right("0" & Minute(Now), 2)
    sFile = FILE_PREFIX & sDate & "_" & sTime & ".pdf"
    sPath = REPORT_DIR & sFile

    ' 3. Configure the PrintScreen output. The SmartTag
    '    "@TrendReportTarget" can be set from the S7-1200
    '    to swap storage location per shift.
    HMIRuntime.Trace "Capturing " & sPath & vbCrLf
    HMIRuntime.PrintScreen sPath

    ' 4. Return to the home screen.
    HMIRuntime.BaseScreenName = HOME_SCREEN

    ' 5. Notify the CPU 1214C that a report is available.
    '    The PLC then reads the file via SMB or waits for
    '    a heart-beat tag increment.
    SmartTags("ReportFileName") = sFile
    SmartTags("ReportReady")    = True
End Sub
Threading on Comfort. VBScript on Comfort panels executes on the HMI's main UI thread. A PrintScreen call that takes 3–8 seconds blocks redraws. Schedule reports at intervals > 10 s and avoid firing them during operator input windows.

5.2 Triggering from the CPU 1214C

The S7-1200 can set a tag that the HMI polls via the standard area pointer "Coordination" or via a direct tag connection. The HMI script fires when the bit transitions 0→1. A typical SCL snippet on the CPU 1214C side:

// SCL — request a trend report from the panel
// Tags: "HMI_RequestTrendReport" (HMI boolean, write from PLC)
//       "HMI_ReportReady"         (HMI boolean, read by PLC)
//       "HMI_ReportFileName"      (HMI WString, read by PLC)

IF "RequestTrendReport" AND NOT "HMI_ReportReady" THEN
    "HMI_RequestTrendReport" := TRUE;     // edge-triggered on the HMI
ELSE
    "HMI_RequestTrendReport" := FALSE;
END_IF;

IF "HMI_ReportReady" THEN
    // Pull the file or archive the path in a string DB
    "LastReportName" := "HMI_ReportFileName";
    "HMI_ReportReady" := FALSE;
END_IF;

6. Workaround C — Migrate the Report Subsystem to RT Professional

If the application genuinely needs trend objects and Control Hardcopy in the same report, the supported path is to move the report layer to a PC runtime. The trend view and f(x) trend view are first-class report objects in WinCC Runtime Professional, so the same TIA Portal project can host a Comfort panel as the operator screen and a PC station running RT Advanced / RT Professional as the report server.

6.1 Topology

CPU 1214C TP1500 Comfort PC: RT Professional NAS / PDF S7-1200 LAN Operator HMI Report server Same TIA Portal project, two HMI devices, shared tags Trend view + Control Hardcopy available

6.2 Engineering steps

  1. Add a PC station to the TIA project. Right-click Project > Add new device > SIMATIC PC > WinCC Runtime Professional.
  2. Select the WinCC RT Professional option (license key required, e.g. 6AV2105-xxxxx-xxxx for an RT Professional 4096 PowerTag license).
  3. Reuse the HMI tag set from the TP1500 by exporting the HMI tags from the Comfort device and re-importing them on the PC station, or by configuring shared tags via a project library.
  4. Build the report template on the PC station. The trend view object is now available in the report toolbox; place a trend view and a Control Hardcopy that targets the same trend screen.
  5. Configure the report scheduler on the PC station to print to PDF, email, or a network share.
  6. The Comfort panel remains the operator face; the PC station is invisible to the operator and acts as a silent report engine.
Cost of ownership. A PC station is an additional Windows industrial PC, a licensed runtime, and a service item. For most shop-floor applications the PrintScreen workflow is sufficient; reserve the RT Professional migration for systems that already need a PC-based HMI for other reasons (vision, MES gateway, multiple screen clients).

7. Workaround D — External Report Generation from the S7-1200 Archive

A common alternative is to log the trend tags in the S7-1200 data block or in a Comfort archive, then generate the report on a separate system that can render trends. The panel acts purely as a tag provider; the report is produced by a SCADA layer, a Node-RED server, a Python script, or a TIA-connected WinCC Unified client.

7.1 S7-1200 data log block

Use a data block with a circular buffer for high-resolution trending. A 1 kB DB with 100 records of 8 real values is a typical starting point:

// SCL — circular trend buffer (fragment)
// DB "TrendBuffer"
// 100 records, each with timestamp and 4 process values

DATA_BLOCK "TrendBuffer"
{ S7_Optimized_Access := 'TRUE' }
AUTHOR : Siemens
FAMILY : 'trend'
NAME : 'TrendBuffer'
VERSION : 0.1
  STRUCT
    Head  : INT;       // 0..99, next write index
    Count : INT;       // number of valid records
    Rec   : ARRAY[0..99] OF STRUCT
      t_ms   : DINT;   // milliseconds since cycle start
      Temp1  : REAL;
      Temp2  : REAL;
      Press  : REAL;
      Flow   : REAL;
    END_STRUCT;
END_DATA_BLOCK

On the PC side, use the open S7 communication library (snap7, libnodave, or the S7 protocol over TCP port 102) to read the DB on a schedule and render the trend in matplotlib, a Node-RED dashboard, or a WinCC Unified trend object. The WinCC Unified client supports the trend view object natively in reports, so a Unified PC runtime is the lowest-friction upgrade path that preserves the Comfort panel investment.

8. Designing the Report Template in TIA Portal

For completeness, the report template configuration steps on a Comfort panel are listed below. The template is the file that determines what each scheduled report contains.

8.1 Creating a report

  1. In the project tree, expand Reports under the HMI device.
  2. Double-click Add new report to create a new template.
  3. Open the report in the editor; the editor opens with an A4 portrait page (the report template page size, not the screen size).
  4. From the toolbox, drag the available objects: I/O field, Tag table, Archive table, Alarm view, Text field, Date/time field, Graphic I/O field.
  5. For each object, configure the data source in the properties window. For an archive table, point it at the logging tag archive that contains the trend data; configure the time range (e.g. "last 1 h" or "since last report").
  6. Save the report template. It is compiled into the HMI image and deployed with the project.

8.2 Triggering a report

Reports are triggered by any of:

  • Scheduler — daily, weekly, minute-by-minute, shift change.
  • Event (PLC tag) — boolean tag rising edge, integer threshold, bit mask.
  • Function list on a button — operator-initiated ad-hoc report.

Each trigger executes a configured function list that calls PrintReport with the report name and the output target.

9. Parameter Mapping for the Common Trend-to-Report Flow

Table 3 — Mapping of trend object parameters to report object parameters
Trend view property Equivalent on Comfort report Equivalent on RT Professional report
Tag (process value source) Use a logging tag, then point the report's archive table at the archive Trend view in the report bound to the same tag
Time range (X axis) Archive table's "Time range from ... to ..." property Trend view's "Time range" property
Y axis scaling Defined on the logging tag; not editable in the report table Editable on the trend view object
Number of curves One column per tag in the archive table Add up to 16 trend views, one per tag
Color per curve Not configurable in archive tables Free per-trend styling
Update at report time Always pulls the live value at the moment the report is generated Same, plus optional live preview

10. Verification Procedure

After deploying the report configuration to the TP1500, run a verification sequence that confirms the trend data is reaching the report and the file is being written to the expected target.

  1. Force a manual report by pressing the trigger button on the panel. Confirm the panel screen changes to the trend screen first (if using the VBScript workflow).
  2. Check the configured storage path for the PDF or PNG. File name pattern should match the configured prefix and the local time of the panel.
  3. Open the generated file and verify the trend curve, the time stamps, and the legend values match the live process values displayed on the panel.
  4. From the CPU 1214C, read the ReportFileName and ReportReady tags; they should match the file written to disk.
  5. Test a scheduled trigger (e.g. 1-minute interval) and confirm the cadence of files matches the schedule.
  6. Test the error path: temporarily unmap the network share. The panel should write the report to the local /media/simatic path (if configured) and the ReportReady tag should still toggle, so the PLC records the failure as a separate state.

11. Troubleshooting Matrix

Table 4 — Common failures when embedding trend views in TP1500 Comfort reports
Symptom Likely root cause Corrective action
Control Hardcopy object is greyed out in the report toolbox Project targets a Comfort panel, not RT Professional Use PrintScreen, or migrate the report layer to a PC station with RT Professional
Trend view object is not in the report toolbox Same as above — Comfort panels do not expose trend objects in reports Reference f(x) trend view in reports (RT Professional); or replace with an archive table
VBScript cannot find the trend as a ScreenItem The trend view runtime object is not exposed to the VBScript ScreenItem collection on Comfort panels Use the PrintScreen approach to rasterize the screen
PrintScreen produces a blank PDF The active screen is the home screen, not the trend screen, at trigger time Issue ActivateScreen to the trend screen before PrintScreen
PDF orientation is landscape and cannot be changed Comfort PrintScreen captures the screen at native resolution Use a post-processing step (PDF rotate) or move the report to RT Professional
SMB share reports a permission error Panel user is "Admin" only when the operator is logged in; share ACLs block other users Create a dedicated service account on the NAS and use it in the panel storage path
Scheduler fires but the file is never written Storage media not configured, or USB stick not formatted with FAT32 / ext4 Verify Runtime settings > Storage media and re-format the USB stick
Report shows an empty table where the trend was expected The logging tag is disabled or has no acquisition cycle Open HMI tags > Logging and confirm "Logging active" and a cycle ≤ acquisition cycle
VBScript hangs during PrintScreen VBScript runs on the UI thread; a long PrintScreen blocks redraw Schedule at intervals > 10 s and avoid firing during operator input
Compiled report fails to download to the panel Target HMI image is older than the TIA Portal version Install the matching HMI image and HSPs from the TIA Portal DVD or the SIOS support pages

12. Field-Proven Caveats

  • Tag data type mismatch. A logging tag of type DInt on the S7-1200 must be matched by an HMI tag of the same type and the same length on the TP1500; a one-byte truncation silently corrupts the trend curve.
  • Time zone. The panel uses its own local time for the report file name. If the panel is in UTC and the operator reads the file in local time, the file name will appear "off" by the offset. Use a time-zone-aware post-processing step or set the panel to the plant time zone.
  • Storage media wear. USB sticks on industrial panels wear out. Prefer a network share for long-term trend reports; reserve USB for short-term operator exports.
  • Archive size. The Comfort panel's internal archive is limited (typically 50 MB usable). Long-range trends fill the archive in days. Configure the archive's circular mode and consider an external historian for long retention.
  • VBScript licensing. VBScript on Comfort panels has been licensed since TIA V14 SP1. Older panels may need a firmware update to enable the script host.

13. Decision Summary

Table 5 — Workaround selection
If you need ... Then use ... Cost
Landscape PDF of the trend screen, scheduled, no PC PrintScreen (Workaround A) Low — built-in
Landscape PDF with PLC-initiated trigger VBScript + PrintScreen (Workaround B) Low — script only
Portrait PDF, full trend object in the report, multiple trend types WinCC RT Professional (Workaround C) High — PC station + license
Custom report with external rendering and long-term data retention External report server reading the S7-1200 DB (Workaround D) Medium — IT integration

FAQ

Can a trend view be placed inside a report on a TP1500 Comfort panel?

No. The WinCC Comfort / Advanced report toolbox does not include the trend view object. The trend view in a report is only available on WinCC Runtime Professional, as documented in the TIA Portal help entry f(x) trend view in reports (RT Professional).

Why is the Control Hardcopy object greyed out in my Comfort panel report?

Control Hardcopy is implemented only on WinCC Runtime Professional. On a Comfort panel project, the object is not in the report toolbox. To get a screenshot of the trend screen into a report on Comfort, use the built-in PrintScreen function (see SIOS entry 58205602).

Can a VBScript on the TP1500 read a trend view and write it as a graphic?

No. The Comfort panel VBScript host exposes the standard HMIRuntime API and the current screen's ScreenItem collection, but the trend view is a non-enumerable widget on Comfort panels and does not provide a bitmap export. Use PrintScreen via the system function, not a ScreenItem read.

What is the lowest-cost way to schedule a trend screenshot from a CPU 1214C?

Have the CPU 1214C set a boolean tag connected to the HMI, and on the HMI side trigger a function list that calls ActivateScreen to the trend screen, then PrintScreen to a network share or PDF printer. The SCL example in section 5.2 shows the CPU side; the VBScript in section 5.1 shows the HMI side.

How do I get a portrait-oriented PDF report of a trend on a Comfort panel?

PrintScreen captures the screen at native resolution (landscape on a widescreen TP1500), so portrait output is not directly supported on Comfort. The supported path to a portrait PDF with a true trend view object is to move the report subsystem to a WinCC Runtime Professional PC station (Workaround C).

Back to blog