IMD SolutionComputing LibraryShop main store

Troubleshooting

What decides the historian trend average retrieval mode

Edge computing and IIoT Published 6 min read

Short answer

The retrieval mode is decided by the client request, not by the tag binding or the drawing. If your trend client only supports Cyclic and Full, no setting on the historian tag gives you Average; request the average through a query interface that supports it, with an explicit averaging interval.

On this page
  1. Confirm what the client can actually request
  2. Separate a binding fault from a retrieval fault
  3. What Average retrieval must mean in your query
  4. Worked example: time-weighted versus sample mean over one interval
  5. Choosing the interval from what the operator must see
  6. How to apply the fix
  7. Questions asked

If your trend pen pulls Historian tags and you want the historian to return calculated averages, the decision is not made on the tag and cannot be inherited by wishful thinking: the retrieval mode travels in the query the client sends. When the client only supports Cyclic and Full retrieval, no pen property or tag setting turns the request into Average, and a smoother line on screen proves nothing about what the historian actually calculated. Separate three questions: which tag the pen binds, what mode and resolution the request carries, and how the client draws the returned points. Then route the average through an interface that supports it.

Confirm what the client can actually request #

For AVEVA Historian 9.0 and later, the historian supports a range of retrieval modes, but the Trend Client documentation states it supports only Cyclic and Full data retrieval. That single documented fact settles the common case: a pen inside that client cannot request Average, no matter what the tag configuration says.

Check in this order:

  1. Pick one pen and a fixed historical interval with visible variation. Record the tag reference, the displayed start and end times, and any exposed retrieval or resolution settings. Use a closed interval, not the moving live edge, so incoming values do not change the comparison.
  2. If the application exposes request diagnostics, read the actual retrieval mode and resolution sent to the historian. This is the only direct evidence of the mode in force.
  3. If diagnostics are not available, run the same tag over the same interval through a historian query tool that lets you select the mode explicitly, and compare the returned timestamps and values with the plotted trace.

An average request returns one value per interval boundary; a Full request returns the stored samples with their original timestamps. If the point density matches the raw sample rate, the request is Full regardless of how smooth the drawing looks.

Separate a binding fault from a retrieval fault #

Three different faults look alike on screen and need different fixes:

  • A binding fault selects the wrong item or fails to connect the pen to its source. The pen shows nothing or the wrong signal. Resolve the tag reference, access and time range first; test the tag independently before touching retrieval settings.
  • A history fault means the correctly selected item has gaps, bad quality or unexpected stored values. Trace back toward the driver and controller only here. Averaging cannot repair missing acquisition data.
  • A retrieval-setting problem means the stored history is valid but the request summarizes or does not summarize it. Fix it in the request, not in the PLC and not in a display setting.

A correct live value on the pen proves neither that history storage exists nor that the historical request addresses the same item.

What Average retrieval must mean in your query #

Average retrieval summarizes values over time intervals, and the averaging method matters. An arithmetic mean of returned samples and a time-weighted average give different answers when timestamps are unevenly spaced; the historian retrieval documentation defines the method, the treatment of boundary values and how quality flags are handled. Read that definition before comparing two clients, and use the same start time, end time and interval boundaries in both, or different groups of samples will produce different averages even when both requests say Average.

The resolution parameter also needs its units read before a value is entered: depending on the interface it may be a time interval, a requested point count or another sampling control. Historian documentation describes several ways to retrieve summary data such as an average, including aggregate retrieval modes and database-level aggregation functions; pick the one your client's documented interface accepts.

Worked example: time-weighted versus sample mean over one interval #

The case: one flow tag, sampled at uneven spacing, drawn over a 30-minute window from 10:00 to 10:30. Inputs:

  • Stored samples: 10 units at 10:00, 20 units at 10:10, 30 units at 10:30 (values from a stored history of this shape; the interval spacing is the point).
  • Requested window: 30 minutes, so 1800 seconds.

The rule: a time-weighted average weights each sample by how long it held until the next sample; a sample mean divides the sum of samples by their count.

Time-weighted arithmetic: the value 10 held for 10 minutes (600 seconds), the value 20 held for 20 minutes (1200 seconds). Weighted sum = 10 × 600 + 20 × 1200 = 6000 + 24000 = 30000. Divide by the window: 30000 ÷ 1800 = 16.7 units.

Sample mean: (10 + 20 + 30) ÷ 3 = 20 units.

The two methods differ by more than 3 units on the same data, about 17 percent of the time-weighted result. The decision that follows: when the operator's number must represent what the process actually did over the interval, request the historian's time-weighted Average mode explicitly and state the interval; when you only need a quick character of the samples, the mean is cheaper but it is not the process average, and neither method repairs a gap spanning part of the window.

Choosing the interval from what the operator must see #

The averaging interval is a process decision, not a display one. A longer interval suppresses short changes and hides brief excursions; a shorter one approaches the raw trace. Keep a path to unsummarized history for investigating peaks, trips and short disturbances, and keep interval boundaries identical when comparing results. Also check gaps and bad-quality spans: a smooth averaged line drawn across a data gap misleads the operator about continuity, so read quality alongside the returned averages.

One sizing reference point for planning storage on platforms that pre-calculate aggregates: Siemens documents the average storage requirement per aggregate as approximately 128 bytes in the SIMATIC Process Historian information system. That figure lets you estimate archive growth when you enable pre-calculated averages alongside raw storage, but it is a Process Historian figure, not a generic historian constant.

How to apply the fix #

Prefer native Average retrieval in the client that requests it: the historian performs the aggregation and the pen displays that result, with one quality path. Where the trend client cannot request it, as with Cyclic-and-Full-only clients, supply the averaged series through a component whose documented interface accepts aggregated query results, and verify the runtime license on the deployed target supports that retrieval mode before promising it in continuous service.

Cosmetic smoothing is a different solution: it changes how returned points are drawn, not which values the historian returned. It is acceptable when the operator only needs a readable shape, but it must never be presented as calculated averages, and it is the wrong tool when a number from the trend feeds a report or a decision.

Verify the result the only way that counts: request a known tag over a known window, confirm the returned point count equals the number of interval boundaries, and check one interval's average by hand against the stored samples, as the worked example above does. When that check passes, the mode is Average and the smoothing is real; until then, a smooth line is only a drawing.

For the surrounding pipeline, tracing a tag from controller to historian display is covered step by step in article:trace-a-plc-tag-from-controller-to-historian-display, and if the returned trace looks empty rather than unsmoothed, the point-count failure mode is a different fault, covered in article:historian-trend-flat-line-check-query-row-limit.

Questions asked

Does a smoother plotted line prove the historian calculated averages?

No. The client can draw returned Full-retrieval points with straight or curved segments, and a wider window or fewer points alone looks smoother. Confirm the mode by reading the request diagnostics or by comparing returned timestamps: an average request returns one point per interval boundary, a Full request returns the stored samples.

What retrieval modes does the Historian Trend client support?

So the pen cannot be pointed at Average from inside that client; you need a query path that exposes the Average mode.

Where does the averaging interval come from?

From the query, not from the tag or the display. When you request aggregated data you state the interval explicitly, for example one average every 60 seconds over the requested range. A display width or a drawing setting is not an averaging interval, and its units may be a point count rather than a time span, so read the interface definition before entering a value.

Can a setting on the historian tag push Average down to the pen?

Only through a documented inheritance or binding mechanism that supplies retrieval settings to the client. A shared tag name or a shared data source does not create that mechanism. If the client documentation lists no such binding, the tag setting affects nothing the pen requests.

Should smoothing go into the PLC instead?

No. Full and Average describe history retrieval choices, not controller behavior. If the stored values are correct and only the display needs smoothing, fix the history request. Averaging cannot repair missing acquisition data, gaps or bad-quality samples; those must be fixed where the data is collected.

Keep reading

  • Explainer

    Historian data retrieval speed: what actually decides it

    An indexed historian returns a year-old sample about as fast as yesterday's, so data age is the wrong variable to optimize. Retrieval speed is set by the requested window, returned point count, retrieval mode, archive storage tier and client rendering. Benchmark candidates with identical query semantics before choosing one.

    Edge computing and IIoT

  • Explainer

    How many trend pens fit in one historian client window

    The AVEVA Historian Client Guide documents no pre-set limit on tags in a trend: the count is bounded by the client computer's resources. The 12,000-tag license sizes the server and the concurrent-user license sizes sessions, so neither caps pens. The figure to commit to a customer is a tested operating point — the highest pen total that populates within the agreed acceptance time with the full window layout open.

    Edge computing and IIoT

  • Troubleshooting

    Citect Historian 2016 slow retrieval as SQL tables grow

    Retrieval slow in both the Citect Historian Excel tool and a direct SQL query is a response-time problem in the SQL history tables, which grow with every historized row. Lower over-fast storage rates, purge to your retention, reindex, and start the migration to AVEVA Historian, since end of support for Citect Historian has been announced.

    Edge computing and IIoT