IMD SolutionComputing LibraryShop main store

Comparison

VTScada Analog Statistics for previous-day high and low

Edge computing and IIoT Published 10 min read By IMD Solution engineering team

Short answer

Use a VTScada Analog Statistics tag linked to a historian-logged outside-temperature tag when your installed release supports a fixed previous calendar day window and exposes minimum and maximum properties for two numeric readouts. Switch to a VTScada History Statistics tag when you need explicit calendar-day history query boundaries instead of a rolling window. Before trusting the screen, tighten the source tag's logging deadband, confirm local midnight alignment, and verify both displayed extremes against an independent midnight-to-midnight trend across one rollover.

Two analog I/O modules on a DIN rail with channel status lights and eight-position green terminal blocks
On this page
  1. Analog Statistics vs History Statistics in VTScada
  2. How Ignition 8.1 compares for previous-day statistics
  3. Verifying a 24-hour previous-day weather window at 08:00
  4. Source-tag prerequisites before configuring any statistic
  5. Configuring the VTScada tag chain and operator readouts
  6. Diagnosing wrong, stale, or shifted daily extremes
  7. Proving accuracy across a live midnight rollover
  8. Questions asked

To display the previous calendar day's high and low outside temperature on a VTScada weather screen, start with an Analog Statistics tag tied to a historian-logged analog source tag, and move to a History Statistics tag when your installed release needs explicit fixed-day query bounds instead of a rolling span. In both cases, one historian-logged source tag feeds the calculation layer, and two operator numeric readouts bind to the resulting minimum and maximum outputs. Because a calculation built on logged history inherits every logging gap, deadband limit, and clock offset underneath it, choosing the right tag type is only half the job: you also need tight source-tag logging and a live midnight rollover check against an independent trend.

Analog Statistics vs History Statistics in VTScada #

VTScada provides two native tag types for historian-backed aggregates: Analog Statistics and History Statistics. Both evaluate stored historian records rather than instantaneous live scan values, and both compute standard summary figures such as minimum, maximum, and average. The practical difference lies in how each tag defines the time boundary and exposes results to operator graphics in your installed VTScada build.

Exact tag property names, menu locations, and period-offset controls are release-specific, so verify them in the VTScada Analog Statistics and History Statistics help topics for your installed version before wiring display bindings. The table below compares both VTScada approaches alongside Ignition 8.1's documented equivalents for teams migrating screens or standardizing across mixed SCADA plants.

Criterion VTScada Analog Statistics tag VTScada History Statistics tag Ignition 8.1 scripting and Vision
Source input One historian-logged analog tag Logged history records for a source tag One or more tag paths passed to a script or binding
Output structure Computed statistic properties bound to numeric readouts Historian-derived statistics for display tags or the History Stats Value widget A Dataset with one row per tag path and one column per calculation, or timestamp plus tag columns in Vision
Previous-day window fit Direct first choice when your release supports a fixed calendar-day offset Fallback when explicit previous-day history query bounds are required Explicit midnight-to-midnight startDate and endDate in scripting, or Historical mode in Vision
Rolling-window risk Period settings without a calendar offset drift throughout the day Must verify period anchor and midnight rollover timing Omitting time arguments defaults to 8 hours prior to current time; Vision Realtime mode is rolling
Screen binding work Bind two numeric readouts to minimum and maximum outputs Same display binding or place a History Stats Value widget Bind a Dataset-type Vision property or write "Minimum" and "Maximum" results to tags

Build the weather screen on an Analog Statistics tag first. It attaches directly to the outside-temperature analog tag and exposes minimum and maximum outputs that bind cleanly to two standard numeric readouts, mirroring legacy two-tag high/low screens without custom scripting. Switch to a History Statistics tag if your installed release's Analog Statistics period controls only provide a rolling window rather than a fixed previous calendar day from local midnight to midnight.

Keep the scope matched to the operator display requirement. When a screen only needs one peak figure on a single numeric field, follow the pattern for showing a historian maximum on an operator text field. When operators need a rolling multi-day average rather than yesterday's locked extremes, see displaying a three-day historian tag average on an HMI.

How Ignition 8.1 compares for previous-day statistics #

Plants that evaluate VTScada alongside Ignition 8.1, or migrate weather and environmental screens between them, encounter an architectural split: VTScada packages daily aggregates into dedicated tag types, whereas Ignition 8.1 splits historical calculations between scripting and Vision UI bindings.

For scripted or scheduled daily summaries, the Ignition 8.1 tag calculation scripting documentation defines system.tag.queryTagCalculations(paths, calculations, [startDate], [endDate], [rangeHours], [rangeMinutes], [aliases], [includeBoundingValues], [validatesSCExec], [noInterpolation], [ignoreBadQuality]). The call returns a Dataset with one row per tag path and one column per requested calculation. Supported calculation strings include "Minimum", "Maximum", "MinMax", "Average" (time-weighted), "SimpleAverage", "Sum", "LastValue", "DurationOn", "DurationOff", "CountOn", "CountOff", "Count", "Range", "Variance", "StdDev", "PctGood", and "PctBad". If you omit startDate, endDate, and both range parameters, the query defaults to 8 hours prior to the current time; includeBoundingValues defaults to true, and the documentation recommends setting deadband style to Discrete Mode so raw data does not pick up seed values.

For UI-driven summaries analogous to VTScada's History Stats Value widget, the Ignition 8.1 Vision tag history binding documentation restricts Tag History Bindings exclusively to Dataset-type component properties. Those bindings return a timestamp column followed by one column per selected historical tag path and support indirect tag paths. You pair a Date Range mode, either Historical (bounded by a Date Range or Popup Calendar component, where the end date is inclusive) or Realtime (a rolling window ending at the current time), with Sample Size and Aggregation modes including Natural, On Change/Raw, Fixed, Interval, and Min/Max.

Neither VTScada statistics tags nor Vision history bindings replace a relational archive when operations need permanent end-of-day audit rows across months of weather records. For long-term daily summary records, evaluate storing end-of-day totals in a SQL row instead of the tag historian.

Verifying a 24-hour previous-day weather window at 08:00 #

This calculated example compares a fixed previous-calendar-day boundary against a rolling daily window and an unbounded scripted default at morning shift turnover. All inputs come directly from the previous-day weather display requirement and the Ignition 8.1 documentation; no site-specific sensor measurements are assumed.

Inputs:

  • Target window duration: 24 hours (one full previous calendar day from 00:00 to 24:00 local time, offset back by 1 day), set by the previous-calendar-day weather display requirement.
  • Monitored point count: 1 historian-logged outside-temperature source tag feeding 2 operator readouts (daily high and daily low).
  • Evaluation checkpoint and default lookback: 8 hours elapsed after local midnight (08:00 local time), matching the documented default lookback of Ignition 8.1 system.tag.queryTagCalculations when time bounds are omitted.

Rule in words: A valid previous-day summary covers the entire midnight-to-midnight span of yesterday with zero current-day overlap. For a rolling window of the same daily duration evaluated after midnight, the prior-day hours retained equal the full day minus the elapsed hours since midnight, while the prior-day hours dropped equal those elapsed hours (replaced one-for-one by current-day hours). For an unbounded query reverting to a shorter default lookback, prior-day coverage equals only the portion of that lookback falling before local midnight.

Arithmetic:

  • Fixed previous-calendar-day window: 24 hours - 0 hours = 24 hours of yesterday evaluated (100% coverage), with 0 hours of today mixed in.
  • Rolling daily window: 24 hours - 8 hours = 16 hours of yesterday retained (08:00 to 24:00 yesterday), dropping the overnight stretch (8 hours / 24 hours = 0.333, or 33.3% of yesterday lost) while blending that same elapsed morning span from today into the calculation.
  • Unbounded Ignition 8.1 scripted query reverting to its built-in lookback: the entire lookback falls inside the current morning, leaving 0% of yesterday evaluated (all prior-day hours omitted).

Result: At the morning shift check, a rolling daily window drops 33.3% of the previous calendar day (specifically the pre-dawn stretch when outside air temperature typically hits its daily low) and mixes current-morning temperatures into both extremes. An unbounded scripted default misses 100% of yesterday. Only an anchored midnight-to-midnight previous-day boundary captures 100% of yesterday with 0 hours of today.

Decision: Set your acceptance threshold at 0 hours of current-day overlap and 100% coverage of yesterday's midnight-to-midnight span. If any portion of today enters the readout (overlap above 0 hours) or either extreme shifts between morning and afternoon, reject a rolling configuration: keep VTScada Analog Statistics only when your release's period and offset lock strictly to the prior calendar day, switch to History Statistics when explicit fixed-day query bounds are required, and pass explicit midnight-to-midnight startDate and endDate values in Ignition 8.1 rather than leaving bounds omitted or choosing Realtime mode.

Source-tag prerequisites before configuring any statistic #

A historian-driven statistics tag cannot correct missing, filtered, or corrupted source data. Before building an Analog Statistics or History Statistics tag, confirm four conditions on the outside-temperature analog tag:

  • Continuous historian logging: Verify that historian logging is enabled on the source tag and that an unbroken prior calendar day of records already sits in the archive before judging either screen readout.
  • Logging deadband matched to display resolution: On-change logging with a wide deadband discards short peaks and troughs smaller than the deadband width, which pushes the computed high downward and the computed low upward relative to actual ambient swings. Tighten the source tag's deadband to match the temperature increment operators expect to see; on companion Ignition 8.1 historians, also set the deadband style to Discrete Mode so raw queries avoid seed values.
  • Scaling and engineering units at the source: Define engineering units and raw-to-scaled conversion on the outside-temperature tag itself so every downstream statistics tag and trend inherits consistent units without ad-hoc math in display expressions.
  • Quality filtering and spike prevention: Confirm that sensor dropouts or PLC communication losses do not write out-of-range spikes or bad-quality values into the historian. A physically impossible daily maximum on an operator weather screen almost always traces to a single logged communication spike rather than a calculation error inside the statistics tag.

Configuring the VTScada tag chain and operator readouts #

Once the outside-temperature source tag has clean, continuous history, build and test the display path in this sequence:

  1. Open the VTScada Analog Statistics and History Statistics help topics for your installed release to verify the exact statistic selection options, calendar-day window and offset settings, and output property names.
  2. Confirm on a historian trend that the outside-temperature tag logged continuous data across the entire previous local calendar day.
  3. Create an Analog Statistics tag pointing to the outside-temperature tag as its input, or create a History Statistics tag if your release requires that tag type to lock the window to the previous calendar day.
  4. Enable minimum and maximum statistics for the fixed previous-day boundary; if your release computes one statistic per tag instance, configure two companion tags (one for maximum and one for minimum) so each operator readout maps to a dedicated tag.
  5. Add two numeric readout objects to the weather screen, bind one to the maximum output property and one to the minimum output property (or deploy a History Stats Value widget where it fits your display layout), and label both with the source engineering unit.
  6. Save the page and test it inside the runtime client rather than relying on editor previews, confirming that both readouts populate from live historian records.

Diagnosing wrong, stale, or shifted daily extremes #

When the weather screen shows blank fields, equal extremes, or numbers that drift after sunrise, separate display-binding errors from historian window and clock faults before rebuilding tags.

Operator screen symptom Likely root cause Where to check first
Readout shows blank or zero Display binding points to an unresolved tag name or wrong output property Numeric readout expression against the release's documented property names
High and low readouts match Calculation span is too narrow, or only a single sample exists in history Statistic window configuration and source-tag trend for logging gaps
Values change during the day Window is rolling rather than anchored to the previous calendar day Period and offset settings on the statistics tag
High or low is physically impossible One-sample sensor spike or bad-quality record logged during a comm loss Source-tag historian trend and sample quality flags
Extremes shift by hours at midnight Server time-zone, UTC offset, or daylight-saving mismatch against local midnight Server operating-system clock settings and trend time axis
Values stay frozen after midnight Recalculation schedule does not trigger automatically on day rollover Tag update or calculation schedule settings in the runtime client

Time-boundary faults are the most common post-commissioning surprise because the displayed numbers look plausible until someone overlays a trend. If both extremes agree with the source trend only when you shift the cursor forward or backward, start by checking the UTC offset when a historian shows values hours off. In multi-vendor facilities running parallel daily weather or process summaries on other SCADA stations, the same midnight-boundary and archive-timing checks apply when fixing previous-day data logging values in WinCC RT Professional.

Proving accuracy across a live midnight rollover #

Configuration alone is not commissioning proof; confirm the displayed figures against an independent historian reading across at least one full day transition:

  • Open a historian trend of the outside-temperature source tag bounded strictly from local midnight to local midnight for the previous calendar day.
  • Use trend cursors to record the highest and lowest logged values along with their timestamps and quality indicators.
  • Compare both cursor readings against the weather screen's high and low readouts; the values should match within the source tag's logging deadband and display rounding.
  • Leave the runtime client open through the next local midnight boundary and verify that both readouts update automatically to the newly completed day's extremes without a manual screen reload, then remain unchanged during the rest of the day.

Where ambient temperature extremes drive automated freeze-protection or chemical-dosing interlocks rather than informational weather readouts, execute that control logic inside the PLC with validated sensor-fault detection instead of tying machine control to a historian summary tag.

Questions asked

Should previous-day high and low temperatures use separate tags or one multi-property tag?

Use a single statistics tag exposing both minimum and maximum properties when only local operator readouts consume the values, because it halves tag maintenance. Create two separate tags when you need independent high and low alarm limits, distinct write or security permissions, or one-to-one mapping to an external reporting interface or PLC register that expects a single scalar tag per point.

How do daylight-saving spring-forward and fall-back transitions affect a previous-day display?

A local spring-forward day contains 23 elapsed hours, whereas a fall-back day contains 25 elapsed hours. If a statistics tag subtracts a fixed block of elapsed seconds rather than anchoring to local calendar midnight, the spring rollover shifts forward and the fall rollover overlaps an extra hour. Verify tag behavior against trend timestamps across both seasonal transitions rather than assuming standard-day tests cover daylight-saving dates.

Can a VTScada statistics tag recover accurate daily extremes after a historian server outage?

If the historian missed samples while the server was offline and no buffer backfilled them, the statistics tag can only evaluate surviving records and may understate the actual daily temperature range. After missing samples return through store-and-forward synchronization or manual backfill, confirm whether the statistics tag recalculates completed windows automatically or needs a manual refresh before trusting the updated high and low.

Why can Ignition tag history calculations differ from raw logged temperature samples?

In Ignition 8.1, mismatches between calculated extremes and raw sample lists usually trace to three documented query behaviors: bounding values are included by default unless disabled, interpolation and bad-quality filtering depend on optional parameters, and historian deadband styles other than Discrete Mode can introduce seed values into raw data. Align those query flags with your trend view before investigating a historian storage fault.

Keep reading

  • Troubleshooting

    Why an Ignition Easy Chart loads slowly on 15-day history

    A five-minute chart for six tags over 15 days is almost never server load. Confirm whether the pens read Tag Historian tables or transaction-group tables, capture the slow statement in a bounded PostgreSQL logging window, and read its EXPLAIN plan. Tag Historian tables ship with timestamp indexes; transaction-group tables need one you add, and postgresql.conf comes last.

    Edge computing and IIoT

  • How-to

    Why end-of-day totals belong in a SQL row not the tag historian

    No second tag set is needed. Keep the live tags bound to the marquee and have the push button call one script library function that checks tag quality and inserts the three values as one timestamped row in a SQL table with system.db.runPrepUpdate or a named query, with a unique date key so a second press cannot duplicate the day's record.

    Edge computing and IIoT

  • Explainer

    Correlating historian tags with product type in Ignition

    The Ignition tag historian stores each tag independently and offers no correlation feature. Capture flow and product type together in one transaction-group row (SQL Bridge module), keep the flow tag historized for Power Chart, and get per-product minimum, maximum and average flow with one SQL GROUP BY query.

    Edge computing and IIoT

Tag historian not logging zero: deadband and max time decide