IMD SolutionComputing LibraryShop main store

Explainer

What a historian does in an OPC and PLC system

Edge computing and IIoT Published 7 min read

Short answer

A historian is a service on a plant PC that reads time-stamped process values from PLCs through OPC and writes them, with timestamp and quality, into a compressed time-series database. The PLC keeps the control and OPC keeps the transport; the historian turns those values into trends, reports and years of queryable process history.

On this page
  1. Where a historian sits in an OPC and PLC system
  2. What one stored sample carries
  3. How exception reporting and compression cut stored data
  4. Worked example: compression on a 0 to 100 percent level tag at a 1 second scan
  5. What the historian is used for
  6. What a historian is not
  7. Where the historian service runs
  8. Questions asked

A historian is the service on a plant PC that remembers. It reads live process values from PLCs, usually through an OPC server, and writes each one with its timestamp and quality into a time-series database built to hold years of samples and answer time-range queries quickly. The PLC keeps running the control, the OPC server keeps moving the values, and the historian adds the third layer: process history for trends, reports and diagnostics after the fact. On an operator screen the three layers look like one system, so a live display that works proves nothing about whether history is being collected. This page defines the historian's job, shows what one stored sample carries, works the compression arithmetic that decides how much detail survives, and ends with where the service runs.

Where a historian sits in an OPC and PLC system #

The path from a measurement to a stored trend has four links, and each one can fail on its own. The PLC scans the field devices and runs the control program; it holds live variables but keeps no long-term record. The OPC server exposes selected PLC variables as items that clients can read or subscribe to; it is transport, not storage. The historian collector is just another client of that server: it reads the items you configure, applies collection rules, and writes samples into the historian's time-series archive. Trend screens and report tools then read that archive back.

Layer Job What it does not do
PLC Runs control logic and holds live variables Keeps no long-term history
OPC server Exposes PLC data as readable items Stores no process history
Historian Collects, compresses and archives time-stamped values Does no control
Trend or report client Queries the archive for screens and reports Collects nothing itself

Two consequences matter in practice. The historian tag name does not have to match the PLC variable or the OPC item, so the mapping between them is a real configuration boundary: a healthy live value proves the PLC and OPC links, not that the collector is storing the same item. And because the collector is a separate client, it can fail while every operator screen still looks perfect.

To prove the chain end to end, query the archive over a known operating interval and match a known value at a known timestamp, using natural process variation or a supervised test, never by driving a live production value just to see the trend move.

What one stored sample carries #

Every record in the archive has three parts: the value, the timestamp and the quality. The value is the process measurement in engineering units. The timestamp says when the value was true, and where that time comes from is a configuration fact rather than a given: depending on the interface it can be set at the device, at the OPC server, or at the collector when the value arrives. The difference matters whenever communication is delayed or buffered, because a value can be measured at one moment and received at another. If your trends look shifted against events, check which timestamp the archive actually stores; why a PI value timestamp is not a receipt time works through one documented case.

Quality records whether the collection path considered the value valid. A communications dropout usually drives quality bad or stops the writes entirely, so the gap shows in the trend instead of being bridged by plausible-looking numbers.

How exception reporting and compression cut stored data #

Two filters sit between a changing PLC variable and the archive, and they are separate settings. Exception reporting runs at the collector: a value is sent onward only when it has moved further than the exception deviation from the last value sent, or when a maximum time elapses. Compression runs at the archive: of the values the collector does send, it keeps only those needed to redraw the trend within the compression deviation. A value can pass the first filter and still be dropped by the second.

Process historians commonly use a swinging-door method for the second filter. From the last archived value the collector tracks the steepest upward and downward slopes to the incoming values; two lines with those slopes, offset one deviation above and below the anchor, form a widening envelope. While each new value falls inside the envelope, nothing is written. The first value outside it ends the swing, the archive stores the value just before it, and the envelope restarts from there. The deviation is usually expressed as a percentage of the tag's engineering range.

Collection rate and compression work together. A one-second collection rate feeding one-minute reports from the same store is a standard pattern; log one-second trends and one-minute reports in one historian shows how both come from one archive.

Worked example: compression on a 0 to 100 percent level tag at a 1 second scan #

These are example inputs for a typical level loop; the method is the point, not the specific values.

  • Tag: tank level, engineering range 0 to 100 percent, last archived value 50.0 percent (an example case; the question behind this page names no specific plant).
  • Collection scan: one sample per second (a typical trend-logging rate).
  • Compression deviation: 1 percent of the range, so a band of one point above and below the anchor (a common starting setting for a tag like this).
  • Process behavior after the anchor: a smooth ramp of 0.1 percentage points per second (an example process).

The rule in words: the envelope starts at the anchor and widens along the ramp; every value that lands inside it is discarded, and the first value outside it stores the value just before it and re-opens the door.

The arithmetic: the band around the anchor runs from 49.0 to 51.0 percent. A ramp of 0.1 points per second needs 1.0 point divided by 0.1 points per second, which is 10 seconds, to travel from the anchor to the upper edge. At one scan per second that is 10 scans inside the band; the 11th scan, at 51.1 percent, breaks the envelope, so the archive gains one value, at the band edge. From the new anchor the same geometry repeats, with the next break ten scans later.

The result: a steady ramp that would write one sample per second instead writes about one per ten seconds, a 90 percent cut in stored rows for this stretch, with the trend shape intact.

The decision it leads to: the deviation sets what becomes permanently invisible, because any change smaller than the band can be skipped. Set the compression deviation below the smallest change you will ever need to see in that trend: if a half-point step on this level matters, set the deviation to half a percent of range or less. Keep it wider than the tag's noise band, though; noise that crosses the band every scan writes almost every sample and defeats compression, which you fix with filtering at the source or a slower exception rate instead.

What the historian is used for #

Four uses pay for the service. Trends give operators and engineers the shape of a variable over minutes or months. Reporting pulls from the same archive: because every sample is time-stamped, you can calculate OEE from historian data without adding instrumentation. Post-mortem diagnostics answer what changed just before a trip, from timestamps and quality rather than memory. And the archive feeds other systems: many sites serve a historian's latest values over OPC UA or MQTT so downstream clients stop polling the PLCs.

What a historian is not #

It is not the OPC server and not the SCADA runtime: stop the PLC or the OPC server and live screens freeze while the archive keeps what it already has; stop the historian service and the screens keep working while history quietly stops accumulating. It is not a relational database either, because a historian stores time-stamped samples in an engine tuned for time-range reads, not arbitrary joins. Not every site needs one: do you need a historian or just an OPC tag server separates the installations where a plain tag server is enough. Nor is it an MQTT broker: a broker moves messages and normally retains nothing you can query back, and whether an MQTT broker stores historic data you can query covers that boundary.

Where the historian service runs #

The historian runs as a background service on a Windows or Linux host: on a small site often the SCADA PC itself, on larger sites a dedicated server once tag counts, scan rates and client numbers grow. Disk growth is set by two inputs, the stored-sample rate after compression and the retention period, and query load sets memory. For a small installation the archive can run on a compact fanless mini PC mounted in the control cabinet beside the network switches, given the same UPS and disk-health discipline as any always-on host. Because the archive becomes the site's process memory, keep it on the OT side of the network and publish outward only through a controlled path.

Questions asked

Does a historian replace logging to SQL Server?

No. A relational database stores whatever rows your own code inserts, so you build the table, the insert logic and every time-range query yourself. A historian ships the collector, the compression and the time-range queries already built, and it is tuned for high sample rates. Many sites run both: the historian for high-rate trends and diagnostics, the relational database for batch records, lab results or reports that need joins to non-process data.

Can the historian and the SCADA host share one PC?

Yes on a small site: the historian is a background service and can run on the SCADA PC itself, serving operator screens and history from one machine. As tag counts, scan rates and client numbers grow, archive writes and disk growth usually justify moving the historian to its own server, so a heavy trend query cannot slow collection. Whichever host you choose, watch free disk space: it is the first thing a historian runs out of.

What happens to logged values when the PLC link drops?

The collector stops receiving fresh values, so the archive either stops writing or records samples flagged with bad quality; in a trend the gap is visible rather than silently bridged with plausible numbers. Collectors that support store-and-forward buffer values locally during the outage and backfill them with their original timestamps once the link returns. Whether your collector buffers is a configuration fact to confirm before you rely on gap-free history.

Do historians also store alarms and events?

Many do. Beyond analog values, products in this class archive discrete changes, alarm activations and returns, and operator actions, each with its own timestamp, so questions such as which alarm fired first in a batch can be answered from the archive. Retention and the query interface for events differ between products, so confirm how long events are kept before you build reports on them.

Keep reading

  • Troubleshooting

    Why Wonderware System Platform tags do not reach Historian

    When Historian shows only system tags, attribute historization alone is not the end of it: System Platform submits application data only when the Platform-level Log to Historian setting is on, with Engine historian node information and the Galaxy-to-Historian configuration in place. PLC tags acquired directly bypass this chain and are configured in the System Management Console instead.

    Edge computing and IIoT

  • How-to

    Do you need Citect Historian for alarms and trends

    No. Citect SCADA 7.2 stores alarm and trend history natively: a trend tag samples each variable and an alarm category controls logging. Add Citect Historian only for report generation and retention beyond the disk you size.

    Edge computing and IIoT

  • Selection guide

    Historian alternative for PLC batch tracking records

    Simple batch tracking needs one row per completed batch, not a tag historian. Size the choice with batches per day, retention and concurrent viewers: memory-card logging covers CSV-only jobs, a PC acquisition package adds web viewing and export with no report code, and a companion PC writing to SQL Server Express hands reporting to a database owner — the storage math is megabytes either way.

    Edge computing and IIoT