IMDTouchKnowledge BaseShop main store

How-to

Keep a PanelView Plus Trend Logging After Screen Changes

HMI and touchscreens Published 5 min read

Short answer

A PanelView Plus Trend object only records while its screen is visible. Configure a Data Log model to start at power-up, show it through an XY trend with pen 2 as the X axis, and give the log a bounded record limit so it overwrites the oldest records instead of growing without bound.

On this page
  1. Why the trend clears when you change screens
  2. Create the data log that runs behind the screens
  3. Display the log in an XY trend
  4. Sizing the data log for a 2-minute capture at 1 sample per second
  5. Test the capture across screen changes
  6. When you need files you can manage
  7. Questions asked

A PanelView Plus Trend object samples only while its screen is visible, so the trace clears the moment you navigate away, and the time base keeps running because the runtime exposes no PLC command that stops it. Stop using the visible trend as the recorder. Configure one Data Log model, start it at power-up, and display it through an XY trend with pen 2 supplying the X axis: the log keeps sampling on every screen, and a bounded record limit makes it overwrite its oldest records instead of growing without bound. This walkthrough builds that arrangement in FactoryTalk View Studio, sizes the log for a two-minute capture, and tells you what to do when you need one file per capture.

Why the trend clears when you change screens #

A Trend object is a display object, not a recorder. It plots what it can sample while it is visible; when you leave the screen, those samples are gone from the display, and on return the trend starts from scratch. The time base belongs to the same object, and the runtime gives you no programmatic handle on it: a Machine Edition runtime supports one proprietary log per runtime, primarily for the Trend object, and that log cannot be programmatically started or stopped. The decision follows from that. Move the recording into a Data Log, and let the trend be only the viewer.

Create the data log that runs behind the screens #

  1. In FactoryTalk View Studio, open the data log setup for your Machine Edition project — the ME help documents it under "Set up data logging" with a Setup tab — and create the log model the runtime will use.
  2. Add both traced values to that model: the value you will plot as pen 1 and the value you will plot as pen 2. The runtime supports only one such log, so both values go into the same model.
  3. Set the sample period where the model defines it. That period is an input to the sizing below.
  4. Set a finite record limit on the model so a full log overwrites its oldest records instead of growing without bound.
  5. Under Project Settings → Startup, enable "Start Data Log on Startup" so collection begins when the terminal powers up, not when someone opens the trend screen.

Display the log in an XY trend #

  1. Place the trend on its screen and select the XY trend type.
  2. Assign pen 2 as the X-axis data and pen 1 as the plotted value. An XY trend plots pen 1 against pen 2 rather than against a free-running clock, which is exactly the control you could not get by commanding the time base from the PLC.
  3. Point the pens at the values held in the data log model, so the trend replays retained records instead of only what it sampled while visible.
  4. Run the application and confirm the log is collecting before you navigate anywhere.

Sizing the data log for a 2-minute capture at 1 sample per second #

Inputs:

  • Capture duration: 2 min, the requirement in this application.
  • Sample period: 1 s per sample, the value configured in the log model for this example. Substitute your own period and repeat the arithmetic with it.
  • Record limit: the value being solved for.

Rule in words: the log must hold the whole capture, so the record limit must be at least the capture duration divided by the sample period. Twice that minimum keeps a capture in progress from ever being among the oldest records in the log.

Arithmetic:

  • 2 min × 60 s/min = 120 s
  • 120 s ÷ 1 s per sample = 120 samples needed
  • Margin: 2 × 120 samples = 240 records
  • Retained window: 240 records × 1 s per record = 240 s = 4 min of history

Decision: set the record limit to 240 or higher. At 1 s sampling that holds four minutes, so a two-minute capture is always complete; a limit below 120 records rolls the log over mid-capture and the start of the trace is gone. The requirement moves with the period: halve the sample period and the record requirement doubles.

Test the capture across screen changes #

  1. With the log running, open the trend screen, navigate to another screen, and wait through part of an intended capture.
  2. Return and check that the plotted history includes the interval you were away. That history can only come from retained log records.
  3. Let a full two minutes elapse and confirm the beginning of the capture is still plotted, so rollover has not taken it.
  4. A trace that looks right only while its screen is visible proves nothing about background collection; the navigation test is the one that counts.

Before you trust retained data for anything longer than this capture, the checks in verifying HMI historical trend retention are the ones to run.

When you need files you can manage #

The bounded log answers a rolling history. It does not give you one file per capture, and no PLC instruction is documented that deletes the runtime's log file. When each capture must be its own file, insert the ME DataStore Plus ActiveX control through Object → ActiveX Control → ME DataStore Plus and let it write CSV files, an approach that pairs with displaying PLC CSV data logs on an HMI screen. For the screen-change problem itself, the power-up data log plus XY trend is the arrangement that works.

Questions asked

Can I stop the trend's time base from the PLC?

Not in this arrangement. The Machine Edition runtime runs its one built-in log on its own schedule and it cannot be programmatically started or stopped, and the Trend object's time base has no PLC command behind it. The XY trend removes the need: the X axis is driven by a logged value instead of the clock, so the trace is anchored to your data rather than to elapsed time.

Can I erase the data log file from the PLC?

No PLC method for deleting the runtime's log file is documented for this setup. Use rollover in place of deletion: a log with a finite record limit overwrites its oldest records as soon as it fills, so nothing accumulates and nothing needs erasing. When every capture must be its own file, write CSV files with the ME DataStore Plus ActiveX control and manage those instead.

How many data logs can one Machine Edition project run?

One proprietary log per runtime, and it exists primarily to feed the Trend object. Put every tag you want recorded into that single model, which in this arrangement means both pen values. CSV logging through ME DataStore Plus is a separate mechanism for when you need managed files.

Does the logged history survive a power cycle?

Treat it as untested until you try it. The documentation used here covers setup, startup and rollover, not what the trend reloads after a restart. Power the terminal down and back up with a known capture in the log, then look at what the XY trend shows before you depend on that history.

Keep reading

  • How-to

    Verifying HMI Historical Trend Retention Before Committing

    An 8-hour trend sampled every 5 minutes spans 96 intervals — 97 stored points if both endpoints are kept — so the panel needs a historical buffer of at least 97 samples per tag that repopulates the trend after screen changes. Verify the buffer depth, the interval setting, and restoration behavior on the bench before you build the screens.

    HMI and touchscreens

  • Troubleshooting

    Why HMI SFTP Cannot See the SD Card Data Log Files

    On a PanelView Plus 7 Series B terminal, the SFTP service publishes internal storage only; the SD card and USB drives never appear to a remote client. A data log whose path root is removable media cannot be retrieved remotely until you redirect it to internal storage or copy it at the terminal with the file explorer application.

    HMI and touchscreens

  • Troubleshooting

    Why HMI Data Logs Export Bool True as -1

    A Comfort Panel USB data log shows -1 for a true Boolean because the export serializes the all-ones bit pattern as a signed value. Assign the literals 1 and 0 conditionally into a separate numeric tag and log that tag; a direct copy into an Int or UInt keeps the -1. Verify the change in the raw CSV with a text editor.

    HMI and touchscreens