IMD SolutionComputing LibraryShop main store

Comparison

Getting Wonderware Historian data into Ignition Edge for MQTT

Edge computing and IIoT Published 6 min read

Short answer

Yes — Ignition Edge can publish this data as MQTT Sparkplug, but through two separate routes. Live values come from the existing DAServer acquisition layer behind a DA-to-UA gateway, because Edge's OPC client is UA-only. History and aggregates come from SQL queries against the Historian Runtime database, using its documented stored procedures.

On this page
  1. What the historian exposes
  2. The DA-to-UA boundary
  3. Live values through the acquisition server
  4. History and aggregates from the Runtime database
  5. Publishing both from one edge box
  6. Decisions
  7. Questions asked

Yes — Ignition Edge can collect this data and broadcast MQTT Sparkplug from it, but not by pointing Edge at the historian as though it were a single source. A 2012-era Wonderware Historian reaches its Siemens PLCs through a DAServer speaking OPC DA, and Edge's OPC connection is OPC UA: those are different interfaces, so the live path needs a DA-to-UA gateway in front of the acquisition server. Stored history is a separate route — query the Historian Runtime database over SQL and publish the rows as payloads. Run both when the supervisor wants live values and reports.

What the historian exposes #

The historian sits behind an acquisition layer, not in front of one. PLC values arrive through a DAServer — on a Siemens line that is the SIDirect one — and the historian stores what that server collects into its Runtime database. Two doors exist, and they answer different questions:

The supervisor needs Where Edge reads it Interface Verify before committing
Current values that track the process The existing DAServer OPC DA, fronted by a DA-to-UA gateway Timestamps and quality survive the gateway
Stored samples over a time range Historian Runtime database SQL, through documented stored procedures Tag, value, timestamp and quality columns; a poll checkpoint
Aggregates such as averages and totals Historian query facilities SQL Results match the historian client for the same range
A path that avoids both doors Direct Siemens driver in Edge Native PLC protocol Controller connection load, measured before and after — fallback only

Live values come through the acquisition layer; history and aggregates come from the database. Do not query stored rows to stand in for a live display, and do not poll the database for values the PLC is holding right now.

The DA-to-UA boundary #

OPC DA and OPC UA are different client/server interfaces, not two dialects of one protocol. DA rides on Windows COM/DCOM addressing; UA uses endpoint URLs with its own session, subscription and security model. A UA client cannot discover, browse or subscribe to a DA server, so entering the DA host name in Edge's OPC UA endpoint field fails at discovery. That is why the idea of pointing Edge straight at the historian's OPC stalls.

The resolving move is a DA-to-UA gateway: software that acts as a DA client to the DAServer and a UA server to Edge. Run it on the same host or subnet as the DAServer so the DCOM leg stays local, and let Edge reach it over the network it already uses.

Live values through the acquisition server #

Converting the protocol is not enough; the gateway must carry what makes a process value meaningful. OPC UA Part 4 (OPC 10000-4) requires the source timestamp to be generated as close as possible to the value's origin and always set by the same physical clock. A gateway that stamps values with its own read time destroys the one field a supervisor needs to judge staleness, so verify timestamps and quality, not just numbers.

  1. Browse one representative item in Edge through the gateway and confirm it matches the historian's acquisition definition for that tag.
  2. Subscribe to it and watch transitions against the existing operator display while the process is changing normally.
  3. Check that the timestamp tracks the acquisition time rather than the gateway read time, and that bad-quality periods arrive as bad quality, not as zero.
  4. Add the rest of the tag list in groups, checking the acquisition server's diagnostics after each group.

If Edge reaches the gateway across a routed boundary, the endpoint's advertised hostname has to match what Edge connects to — configuring OPC UA endpoint URL hostnames behind NAT covers that fix. From there Edge publishes exactly as in bridging OPC UA PLC data to MQTT with an edge PC: subscribe UA, publish Sparkplug.

A second client on the DAServer is not a second poll of the PLC. A DA server polls devices on its configured update rates and serves additional subscribers from cache, so the controller sees the same traffic — until you request items outside the rates the historian already uses, which adds device reads for those items only. Stay inside the collected tag list and PLC load is unchanged. A direct driver connection from Edge is a new session on every PLC it touches; that is the fallback, not the first choice. Keep the whole chain read-only: this path feeds a supervisor, and nothing downstream should be able to write back through the gateway into the PLCs.

History and aggregates from the Runtime database #

Point a database connection in Edge at the Runtime database and use the documented stored procedures: per the historian's documentation, they return tag-definition information and narrow the scope of queries on the data storage tables. Hand-written wide selects against storage tables are how slow queries happen. The installed documentation for your build lists the exact procedure names, arguments and result columns, and those differ by version.

SQL changes the meaning of every row. A query result is a stored record, not evidence the PLC holds that value now, so each published row carries its tag name, value, source timestamp and quality, and the poll carries a checkpoint so repeated queries neither duplicate nor skip rows at the range boundary.

Calculated example, illustrative inputs: 50 tags stored on a fixed 5-minute logging interval.

  • Samples per tag per hour = 60 min ÷ 5 min = 12 samples/h per tag.
  • Rows per hour = 50 tags × 12 samples/h = 600 rows/h.
  • Polling every 30 s = 3600 s ÷ 30 s = 120 polls/h, so the average poll returns 600 ÷ 120 = 5 rows.
  • A checkpoint written as "timestamp ≥ last checkpoint" re-reads the boundary row each poll — up to 50 duplicated rows per hour at this scale. "timestamp > last checkpoint" duplicates zero rows by construction.
  • A 24-hour backfill = 600 rows/h × 24 h = 14,400 rows, fetched in one ranged query instead of 2,880 polls.

Decision from the numbers: poll at 30 s with a strict greater-than checkpoint, and batch backfills as single ranged queries. The basis is the 5-minute interval — exception-based logging tied to a deadband moves the row count with the process's change rate, so re-run the first line of the arithmetic with your measured samples per hour before sizing the poll.

Hand-built JSON for the history topic has its own failure modes; fixing extra characters in a PLC MQTT JSON payload walks the usual ones. And if the supervisor really wants a historian feed rather than MQTT messages, how to move Wonderware Historian data into Canary Historian is the route that applies.

Publishing both from one edge box #

Keep the two streams on separate topics. Live values belong on the Sparkplug side, where a rebirth after a reconnect republishes current state; stored history belongs on its own JSON topic with the source timestamp inside every payload, so a stored sample can never be read as a fresh one. Both routes run comfortably on a fanless mini PC in the control cabinet, next to the acquisition server they read from.

Decisions #

  • Live values only: put a DA-to-UA gateway in front of the DAServer, subscribe in Edge, publish Sparkplug. Do not poll the Runtime database for current values.
  • History or aggregates only: query the Runtime database through the documented stored procedures, with a strict greater-than checkpoint and batched backfills.
  • Both: run both routes on the same edge box, keep the payloads on separate topics, and keep each route's timestamps native to it.
  • No gateway permitted and the database off limits: connect Edge's Siemens driver directly to the PLCs, accepted only after measuring controller connection load before and after.

Questions asked

Why does Edge reject the DAServer host when entered as an OPC UA endpoint?

Because the two interfaces never meet. A UA discovery request expects a UA endpoint URL and a discovery response; a DA server registers as a Windows COM component addressed through its program identifier, so nothing answers. There is no setting on either side that bridges them — that is exactly the job of the DA-to-UA gateway.

Does polling the Runtime database load the PLC?

No. Queries execute on the historian server against stored data, so the PLCs see no new traffic at all. The cost lands on the historian server and its database: keep the tag list and time range narrow, prefer the documented stored procedures over wide selects on the storage tables, and run large backfills outside peak production hours.

Should history ride the same Sparkplug topics as live values?

No. Sparkplug is a current-state protocol: after every reconnect it rebirths the newest values, and old stored rows on those topics would be overwritten or leave the supervisor reconciling stale data. Publish live tags through the OPC route as Sparkplug and push history as JSON payloads on a separate topic, with the source timestamp inside each record.

Can we read from the InTouch SCADA node instead of the historian?

Yes, as another live source, under the same boundary. If the SCADA node serves its tag database over OPC DA, it needs the same DA-to-UA conversion before Edge can subscribe. You gain a second already-gathered live path; you do not gain history — stored records still come only from the Runtime database.

Keep reading

  • How-to

    Bridging OPC UA PLC data to MQTT with an edge PC

    Keep the OPC UA server on the PLC side and give MQTT publishing its own role on a separate edge PC that acts as the OPC UA client and MQTT publisher. Commission the two links independently — first a verified tag read, then a verified subscriber message — and only then widen the tag set.

    Edge computing and IIoT

  • How-to

    Expose historian latest values over OPC UA or MQTT

    Yes — connect an integration gateway to the historian's classic I/O Server over SuiteLink (application name aahiosvrsvc, topic TagName) and publish the current values as OPC DA and MQTT. After a historian restart the I/O Server and the Live table return nothing until the source sends a new value, so a true last-known-from-disk read needs T-SQL or the historian SDK.

    Edge computing and IIoT

  • Comparison

    Opcenter integration interfaces: OData, OPC UA or MQTT

    Opcenter Execution supports OData 4.0 for application data and OPC UA for equipment communication; MQTT is not a native interface and comes only from a documented connector or an integration application built on the Foundation stack. Use OData for records, OPC UA for the line, and publish to a broker only from a component that reads one of them.

    Edge computing and IIoT