IMD SolutionComputing LibraryShop main store

Troubleshooting

Why Edge historian gaps look like held values centrally

Edge computing and IIoT Published 8 min read

Short answer

The single _exempt_ row in sqlth_sce and the empty sqlth_scinfo are designed behavior: the Edge Historian neither tracks nor validates scan classes, locally or over sync, so an outage queries as a held last value on the central gateway. Add a PLC-sourced heartbeat tag, detect holes in its rows as outage windows, and subtract them from runtime totals - a weekend outage otherwise overstated runtime by 16 hours.

On this page
  1. Why does sqlth_sce show only exempt while sqlth_scinfo stays empty?
  2. Is the missing scan class data a sync fault I should fix?
  3. Why do outage gaps read as held values on the central gateway?
  4. How much can a held value overstate a runtime total?
  5. Do simple tag group settings or analog compression change it?
  6. How do I find gaps already buried in Edge history?
  7. How do I bound outages without scan class tracking?
  8. Questions asked

When an Ignition Edge gateway syncs tag history to a central gateway, an outage on the Edge side is invisible to every central query. The data is stored at the tag group rate but queried as on-change, and with no scan class record to prove a gap, a chart holds the last value across the whole outage. This is designed behavior of the Edge Historian on 8.1, confirmed by the vendor's support: it does not track or validate scan classes, locally or over sync. What works is your own evidence - a PLC-sourced heartbeat tag whose holes define outage windows, subtracted from runtime and count totals on the central side.

Why does sqlth_sce show only exempt while sqlth_scinfo stays empty? #

It is designed behavior, confirmed by the vendor's support on 8.1: the Edge Historian never creates or syncs scan class records, so the central database keeps one sqlth_sce row with scname = exempt and an empty sqlth_scinfo. Run both checks against the central history database:

SELECT * FROM sqlth_sce;
SELECT COUNT(*) FROM sqlth_scinfo;

The 8.1 database table reference describes what these tables hold on a full gateway: sqlth_scinfo stores tag group information, and sqlth_sce stores start and end times for tag groups. Compare what you see:

Table Edge-synced database Full gateway
sqlth_sce One row, scname = _exempt_ Start and end times per tag group; your groups, such as Default, are listed
sqlth_scinfo Empty Populated; it stores tag group information

The exempt name is literal: this history is exempt from scan class tracking and validation. Do not confuse this with a provisioning fault where the history data tables never appear at all - why Ignition tag historian tables are not created covers that failure; here the data tables fill normally and only the scan class tables stay empty. One caution if your checks run during heavy history traffic: sqlth_sce is also the table involved in sqlth_sce deadlocks from history reads hitting row X locks.

Is the missing scan class data a sync fault I should fix? #

No - no sync setting, tag group change, or database reconnect will populate those tables; values and timestamps arriving correctly is the sync working, and the missing scan class rows are the Edge Historian's design. Confirm the gateway version on both ends from the status pages, so a version mismatch is ruled out before you accept the design explanation. Then pull a few rows for one Edge-sourced tag from the central history data tables: if values and timestamps are present, every hop that carries data works, and the only remaining problem is what a central query can know about silence. A feature request for Edge historian scan class tracking and validation is filed with the vendor; until it ships, stop treating this as a sync defect and move to the controls below.

Why do outage gaps read as held values on the central gateway? #

Because the query engine has no record to separate a value that did not change from a period when nothing was recorded, so every silence - including a dead Edge device - reads as an unchanged value and draws a flat line. Each hop in the path either carries scan class state or drops it, and the Edge Historian is the hop that never creates it:

Hop What it does Scan class state
Device or OPC tag Sources the value and quality None
Edge tag group Sets the storage rate for the tag Rate applied, not recorded as a tracked scan class
Edge Historian Stores samples locally Not tracked or validated, local or over sync
Edge sync to the central gateway Forwards history Tag values only; no scan class rows
Central history database Receives the samples One _exempt_ row in sqlth_sce; sqlth_scinfo empty
Central query (charts, aggregates) Reads samples and fills between them Treats the tag as on-change, with nothing to prove a gap

On a full gateway, the start and end times in sqlth_sce are what let the query engine tell two identical-looking cases apart. The samples themselves are written to the Edge gateway's local store before sync; where the Ignition Edge tag historian writes its data maps that side of the path. Three events that look the same in the data table:

Event on the Edge side Rows in the data table Central query returns
Value steady; deadband or compression suppresses writes None Held value (correct)
Power loss; Edge gateway down None Held value (wrong: nothing was recorded)
Edge Historian stalled while the gateway runs None Held value (wrong)

Only the first row is a correct held value. The other two are outages the query cannot see.

How much can a held value overstate a runtime total? #

By the full length of every outage in which the state tag last read ON - in the confirmed case, a weekend power outage overstated weekly machine runtime by 16 hours. The confirmed facts are the weekend outage and the 16-hour overstatement; the clock times and the weekly total below are representative, so the arithmetic transfers to your timestamps.

  • Last stored sample of the run-state tag: Saturday 18:00, value 1 (running).
  • Power failed just after; the machine did not run again before recovery; the Edge gateway resumed recording Sunday 10:00.
  • Gap in the data table: Saturday 18:00 to Sunday 10:00 = 16 h (18:00 + 16 h = 10:00 the next day).
  • The central query holds value 1 across the gap, so the runtime aggregate counts 16 h that never ran.
  • Reported weekly runtime: 92 h. Corrected: 92 h - 16 h = 76 h.

The formula generalizes: runtime_corrected = runtime_reported - (sum of held-ON outage durations). Treat every runtime, count, or time-weighted average computed on the central gateway from Edge sources as unvalidated for any window that can include an outage until this correction is applied. Where corrected totals feed maintenance or compliance reporting, back the largest windows with the site power event log, not just the gap query.

Do simple tag group settings or analog compression change it? #

Neither changes it: fixed-rate tag groups still store at the tag group rate and query as on-change, and analog compression makes legitimate silences longer, so a compressed flat line and an outage stay indistinguishable. Reworking Edge tag groups into simple fixed-rate settings creates no tracking data, because the Edge Historian records no scan class state at all - spend that effort on the heartbeat in the last section instead. Compression is the harsher case: a compressed analog tag legitimately writes few rows while the value stays inside its deadband, and on a full gateway it is the scan class record that lets the query engine trust those long stretches. Keep compression if you need it; read every long flat stretch from an Edge source as unproven until a heartbeat covers it.

How do I find gaps already buried in Edge history? #

Run an interval query on tags with a predictable minimum write rate - a heartbeat, a counter, a continuously changing process value - and read intervals past a threshold as candidate outages; never on steady or compressed tags. Work through these steps:

  • Identify the data table for the month under review in the central history database, and verify the column names your schema uses; the query below assumes tagid and t_stamp in epoch milliseconds.
  • Set :threshold_ms above any legitimate silence for that tag, as a multiple of its write rate. Example: a tag group rate of 5000 ms gives 10 x 5000 = 50000 ms.
  • Run the interval query (month_data_table below is a stand-in for the month's data table in your database):
SELECT tagid, prev_ts, t_stamp, (t_stamp - prev_ts) / 1000.0 AS gap_s
FROM (
  SELECT tagid, t_stamp,
         LAG(t_stamp) OVER (PARTITION BY tagid ORDER BY t_stamp) AS prev_ts
  FROM month_data_table
) d
WHERE (t_stamp - prev_ts) > :threshold_ms
ORDER BY gap_s DESC;
  • Cross-check each hit against known events - power loss, Edge gateway restarts, a stalled historian - before calling it an outage.
  • Correct affected totals with runtime_corrected = runtime_reported - (held-ON portion of each confirmed outage).

Dividing the millisecond difference by 1000.0 returns seconds, so gap_s reads directly against the threshold. For the 16-hour case, the query must return an interval of about 57600 s on the run-state tag's table (16 h x 3600 s/h = 57600 s), or on any continuously changing tag from the same Edge device; if it does not, the overstatement has another cause and the troubleshooting is not done.

How do I bound outages without scan class tracking? #

Historize your own heartbeat - a value that changes every evaluation, sourced from the PLC so it keeps advancing while the Edge box is down - and let holes in its rows define the outage windows. Three controls, built from practice rather than Edge Historian features:

  • Heartbeat tag: historize a PLC free-running register or clock on the Edge gateway. Rows in it prove the Edge was recording; a hole is an outage window that needs no inference from process data. Sourcing it from the PLC matters for the stall case: the value keeps advancing, so the first write after recovery brackets the hole cleanly.
  • Outage-window table: on the central database, run the interval query above with the heartbeat's tagid on a schedule, and store the start and end timestamps in a small table. That table is your replacement for sqlth_sce.
  • Aggregate correction: subtract or exclude the outage windows in every runtime, count, or average report that reads Edge sources, and keep the window table with the report so the correction is reproducible.

The decision: put the heartbeat in before the next outage. It is one historized tag against an error class that no central query will flag on its own.

Questions asked

Does the missing scan class data also affect history viewed on the Edge gateway itself?

Yes. The limitation is not in the sync: the Edge Historian does not track or validate scan class information at all, locally or over sync. A gap queries as a held value on the Edge gateway exactly as it does on the central gateway, so charts and aggregates run at either end need the same heartbeat evidence and the same correction.

Will a newer gateway version populate sqlth_scinfo for Edge-synced tags?

Not on any 8.1 release documented so far. The behavior was confirmed by the vendor's support on 8.1.3 gateways, and a feature request for Edge historian scan class tracking and validation has been filed. Before relying on a newer build, run the two table queries against a test pair of gateways on that exact version and read its release notes.

Should I turn analog compression off on my Edge tags?

No. Compression is doing its job when the value sits inside its deadband, and disabling it inflates row counts without fixing anything. Keep compression, and treat any flat stretch from an Edge source as unproven: a heartbeat tag is the evidence that separates a steady value from an outage, and it costs one historized tag.

What gap threshold should I use for the heartbeat tag?

Set it from the heartbeat's own write rate, not from the process tags. With a heartbeat that writes a new row every 60 s, a threshold of 5 x 60 s = 300 s marks any stop longer than five minutes as a candidate outage. Cross-check each hit against power events and gateway restarts before subtracting it from a runtime total.

Keep reading

  • Troubleshooting

    Historian stores zero after an MQTT edge node reconnects

    A 0 stored just before the true value at every MQTT edge reconnect is a reported pattern on Ignition 8.1.5 through 8.1.15 with the MQTT Transmission and Engine modules 4.0.6 through 4.0.10. Confirm it by querying stored records around each reconnect, exclude those zeros from process data, and remove them with a timestamped rule instead of a blanket zero filter.

    Edge computing and IIoT

  • Explainer

    Where the Ignition Edge tag historian writes its data

    Ignition Edge has no configurable path for its local tag historian: the store and its store-and-forward buffer both write to the volume Ignition is installed on. For a 7-day history on fewer than 100 tags, add 3 to 5 GB of headroom to the main partition; an external SQL database connection is the only supported way to choose the volume.

    Edge computing and IIoT

  • Troubleshooting

    Why Ignition MQTT shows tagid None and what to key on

    tagid is None because the MQTT payload never carries it: tag IDs are indexes inside the Ignition tag history provider, assigned and retired as tag configuration changes. Key the lake on a site-scoped tag path with the site identity in the MQTT namespace, and trace duplicate sqlth_data_ table sets through their driver IDs in sqlth_drv before stopping the extra writer.

    Edge computing and IIoT