Skip to content

Historians, gaps and quality

Tag pens read history through Ignition 8.3's tag history API (TagHistoryManager) on the gateway. So any historian provider works: the Core historian, SQL historians, the Mustry TimescaleDB historian, Factry and others. The configuration's Allowed Historians limits which ones a chart may read.

A pen reads every stored value in the range, not a resampled grid. When a range holds more points than the chart is wide, the gateway asks the historian for one slice per pixel, with its mean, minimum and maximum, and draws a line with a min/max band. Zoom in and the raw points come back.

The read starts with the last value stored before the range, so a line or step starts at the left edge (the gateway looks it up itself on historians that do not return it).

Stored Drawn
Good The line.
Uncertain The line; the x-trace marks the value as uncertain.
Bad A gap with a red band.
An aggregated slice of only bad samples A gap.
An aggregated slice with some bad samples Uncertain.

Historians count differently. The Core historian's Count aggregate counts every sample, bad ones too. The TimescaleDB historian's leaves out bad samples and Good codes below 192, so such a slice has a count of 0 beside its numbers. The gateway then reads the stored values to tell, up to 200,000 per pen (and 50 reads), and draws a slice it could not tell as uncertain, never as empty.

A value that does not change is not stored again, and no historian tells that apart from a time when nothing was stored (the gateway was down). So the tag's own history settings decide where a gap is, for every historian alike:

  • Max Time Between Samples (historyMaxAge): the tag stores at least that often;
  • sample mode Periodic with a historical deadband of 0: the tag stores every sample, also an unchanged one. With a deadband (the default 0.01) an unchanged value is not stored, so the rate says nothing.

A gap is more than twice that (and at least 10 seconds more). The line stops at the last value, the x-trace says "nothing stored since 05:36", and a range with nothing stored says "No data in this range".

A tag with neither setting has no gaps: a long time without a stored value is the value holding. To show outages for such a tag, give it a Max Time Between Samples. Bound pens say the same with gapAfter.

Live values continue the line as they come, however far apart.

Bars are read from every stored value, bad ones left out, up to 2,000,000 values per pen. Above that, or on a historian that cannot count its values, the bars come from the historian's own aggregates and are marked "These bars may include bad-quality values".

Core historian TimescaleDB historian Other historians
Count Every sample, bad too Good samples (192 and up) As the historian says
Average from aggregates Sum over Count The historian's own average of a whole period The historian's own average of a whole period
Aggregate slices Windows on multiples of their length since 1970 (UTC) Rollups of 5 minutes and hours on UTC Windows on multiples of their length since 1970 (UTC)

A period the historian gives no usable aggregate for has no bar, and the legend says "Some periods have no bar". The full rules are in the bars reference.

Notes are annotations in the pen's historian, read and written with the platform's annotation API. Any historian that keeps annotations works. The Core historian stores annotations through store and forward, so a note can take a moment before a read finds it.

The gateway reads a tag's historian before and after each read. When they differ, or the historian is no longer allowed, the data is not sent and the chart reads again.

  • While an Ignition trial has expired, the Core historian stores nothing and reads return Bad_TrialExpired: the history then has a gap.
  • system.historian.storeDataPoints stores a quality of Good_Unspecified (0) as Good (192), on the Core and the TimescaleDB historian alike.
  • Neither the platform's history API nor its parameters have a timeout or a cancel (8.3.6). A read a historian never ends keeps a query thread after the chart has had its answer. See Limits and performance.