Computing Library
Earlier articles
How-to
Connecting InTouch HMI tags to Wonderware Historian by version
The installed InTouch release decides the path: on 2020 R2 or newer, configure the Historian connection inside InTouch and enable its store-and-forward; on earlier releases, let Historian's IDAS collector read the running InTouch application. Verify with one stored value before expanding the tag set.
How-to
Retrieve manually inserted historian values into InTouch tags
Manual-acquisition tags are stored by the Historian but never pass the runtime window that the InTouch access name aahiosvrsvc serves, so the live-value connection returns nothing. Retrieve the newest sample of each tag with a windowed SQL query against the Runtime history view, then assign each row to its InTouch tag by TagName in script.
Troubleshooting
Fix Citect Historian 2016 CTAPI data source connection error
First confirm the machine running the SCADA 2016 runtime is the one Historian sits on, because 127.0.0.1 is loopback. Then set [CTAPI]Remote=1 and [CTAPI]AllowLegacyConnections=0 in that runtime's citect.ini, restart, and retry the data source: Historian 2016's V7.50 CTAPI client needs only Remote=1.
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.
Troubleshooting
MQTT TLS connects but no CONNACK: find the failing hop
The connect callback fires only when the broker returns a CONNACK, so with TCP ESTABLISHED and no callback the failure is in the TLS handshake or between TLS and MQTT. Run openssl s_client against the listener, then mosquitto_sub -d with the same CA file and credentials; wrong credentials are not the cause, because the broker answers those with a CONNACK that fires the callback with a return code.
Troubleshooting
Why the historian query tool keeps freezing after restart
The freeze recurs because a failed snapshot merge left a .skip marker and a backlog of unmerged snapshots that every retrieval must scan; a service restart only resets state. Read original-merge.log for the recorded reason, correct that cause with the vendor's documented recovery, then re-check the block after one hour before calling it fixed.
How-to
Moving AVEVA Historian 2020 from 500 to 5000 licensed tags
Yes, as a path: InTouch Unlimited Professional is documented with a 5,000-tag Historian capacity, so it fits a move from 500 tags once the AVEVA distributor confirms in writing that the entitlement covers the installed Historian 2020. Apply the confirmed license, then configure and prove collection of the additional tags separately — a bigger license never configures tags by itself.
Troubleshooting
Why a CYCLIC historian query shows AUTOSUMMARYDATA wrongly
wwOptions reports AUTOSUMMARYDATA for a CYCLIC query because that is the OLE-DB provider's preferred mode for BESTFIT, MIN, MAX, CYCLIC, INTEGRAL and AVERAGE — not the block that served the rows. With Auto Summary disabled the retrieval falls back to primary data. Confirm the real path by re-running the identical query with wwOption='PRIMARYDATA' and comparing values and elapsed time.
How-to
Show mixed-case tag names in a historian tag selector
The historian stores one normalized lowercase path per tag in sqlth_te, so a selector that displays that column shows lowercase. Do not re-case the table: keep the stored path as the selection value and join a display label, populated from each tag's Tooltip, from a table your application owns.
How-to
Publish one MQTT event when a PLC bit rises
Publish on the transition, not the level. Retain the previous valid sample of the PLC Boolean and publish one MQTT event only when the pair reads false then true. An acquisition cycle cannot see a pulse shorter than itself, so latch short pulses in the PLC and reset the latch after the event publishes, and make the consumer tolerant of duplicate deliveries.
Troubleshooting
Fix unequal paths and aggregates in Ignition historian queries
system.historian.queryAggregatedPoints pairs the paths and aggregates lists entry by entry, so len(paths) must equal len(aggregates): two tags and three aggregates must be flattened into six index-aligned pairs. On Ignition 8.3.2 and 8.3.3 that six-and-six request is reported to cross-join into 36 calculated columns plus t_stamp and tagPath, so query each pair as a singleton and key the results yourself.
Explainer
WinCC runtime archives versus a central process historian
Each WinCC server archives its own tags at runtime; SIMATIC Process Historian is a separate central tier that collects the long-term-relevant tags and messages from multiple WinCC servers into its own SQL Server database. Keep runtime archiving on, keep archives on each server, and point long-term and cross-server queries at the historian.