IMD SolutionComputing LibraryShop main store

Troubleshooting

Why Historian SDK events never show in AlarmClient mode 2

Edge computing and IIoT Published 5 min read

Short answer

Yes, this is expected behavior. The Historian SDK stores records in dbo.Events and never raises transactions in the Alarm and Event system, so AlarmClient mode = 2, which lists recent alarms and events from the alarm provider, cannot show them. AlarmApp in Historical mode reads the Historian database directly and displays the same rows with their custom messages; only Application Server events such as write success reach recent mode.

On this page
  1. What each view actually reads
  2. Rule out a write fault first
  3. The 992 requirement against the 900 cap
  4. Worked example: fitting a 992-priority audit event under the 900 severity-four cap
  5. The comment-first sequence
  6. Verify after a test write
  7. Pitfalls that recur
  8. Questions asked

Yes, the absence is correct behavior, and no tag, binding or display setting will change it. Events sent through the Historian SDK are stored as historical records in dbo.Events; they are never raised as transactions in the Alarm and Event system. AlarmClient mode = 2 is the recent alarms and events view, and its only source is the alarm provider, so it lists the Application Server object's own write success events and nothing your SDK wrote. AlarmApp in Historical mode queries the Historian database directly, which is why the same rows appear there with their custom messages. The correction is procedural: keep the audit trail on the SDK path and review it historically.

What each view actually reads #

The SDK path ends at storage. You create a historian connection proxy object, separate or combined, and send events to the historian through it; the retrieval documentation describes the Events view as a view referencing the History table, used to track alarms and other events. Nothing in that sequence publishes a transaction to the alarm provider.

The two controls therefore read different sources:

What you see Where it comes from
Custom event rows in AlarmApp, Historical mode The rows exist in dbo.Events; the control reads the Historian database
The same rows absent in AlarmClient mode = 2 The SDK write bypasses the alarm provider
Only write success events in recent mode Raised by the Application Server object, which does use the provider
A script event always at priority 999 LogDataChangeEvent assigns 999 and exposes no priority parameter

Mode = 2 is working as designed when it shows provider events only. Nothing is broken in the client, the control or the database.

Rule out a write fault first #

Query the events table after one test write. Rows present with the expected message text and priority mean the data path is healthy and the symptom is pure visibility, not a fault. Rows absent mean the write itself failed: check the connection proxy object, the account the writing application runs under, and the fields of the event record before touching either control. The discipline is the same as writing calculated tags to AVEVA Historian readable via SuiteLink: prove the stored record first, then argue about the client reading it.

The 992 requirement against the 900 cap #

The requirement in this deployment: audit events at priority 992, no operator alarm raised, and the reason comment stored before the value changes. Two constraints block the obvious routes. The configured severity ladder caps severity four at 900, so severity-based configuration cannot produce 992. LogDataChangeEvent writes 999 with no parameter to change it, and closing that gap is an enhancement to the event primitive and the event script, not a setting.

Path Shows in mode = 2 Priority written Where it is reviewed
Historian SDK event write No The value stored in the record, 992 included AlarmApp in Historical mode
Object script using LogDataChangeEvent Yes 999, fixed The recent alarms and events list

The decisions fall out directly:

  • Audit trail at exactly 992 with no alarm: the SDK write, reviewed in AlarmApp in Historical mode. It is the only path that stores the required priority and the custom text.
  • Recent-mode visibility mandatory: LogDataChangeEvent, accepting 999, with the customer's written acceptance of that value.
  • Recent mode at exactly 992: not achievable with the current function. File the enhancement request for optional parameters on LogDataChangeEvent, priority first, with matching support in the event primitive.

Worked example: fitting a 992-priority audit event under the 900 severity-four cap #

Inputs:

  • Required audit priority: 992 priority points, from the customer rule in this deployment.
  • Severity-four ceiling: 900 priority points, from the configured severity ladder.
  • Script-function output: 999 priority points, fixed by LogDataChangeEvent.

Rule in words: a logging path passes only if the priority it writes equals 992 exactly. Compare each path's written priority with 992, and check the severity route against the 900 ceiling.

Arithmetic:

  • Severity route: 900 - 992 = -92. The ceiling sits 92 points below the requirement, so no severity-four setting writes 992.
  • Script route: 999 - 992 = 7. The fixed value overshoots the requirement by 7 points and cannot be tuned.
  • SDK route: 992 - 992 = 0. The record carries the required priority exactly.

Only the SDK record writes 992. Any path whose written priority differs from 992 by a single point fails this rule, so the audit trail goes on the SDK path with Historical-mode review; 999 in recent mode only with sign-off; recent mode at 992 waits on the enhancement.

The comment-first sequence #

The client must make it impossible to change the value without a reason reaching the historian first:

  1. Present a mandatory reason before the write: free text or a combo box of predefined event messages.
  2. Block the value write until the comment is non-empty, in the logic that issues the write, not only by disabling a button.
  3. Store the event through the SDK with the comment text and the chosen priority.
  4. Write the process value only after the SDK call returns success; on failure, abort the value write and show the operator the error.
  5. Confirm the value change itself is recorded, so each comment row can be matched to a data change by timestamp.

Verify after a test write #

  • Query the events table: one row per change, with the expected message text and priority.
  • Open AlarmApp in Historical mode over the test window: the same row must appear with its custom message.
  • Open AlarmClient mode = 2: the SDK row must be absent and the write success events present. That combination confirms both paths behave as designed.
  • Where LogDataChangeEvent is in service, confirm its event shows in recent mode at 999 and raises no alarm.
  • Force the SDK call to fail once and confirm the process value does not change; this is the one check that proves no value in this galaxy can change without its reason reaching the audit record first.

Pitfalls that recur #

  • Troubleshooting the AlarmClient binding when the rows are already in the events table. Query the table first.
  • Expecting a priority above the cap to be remapped downward. The 900 ceiling is a configuration boundary, not a scaling rule, and 992 sits outside it.
  • Firing the value write and the comment write in parallel from one script. Sequence them explicitly.
  • Operators hunting the audit entries in recent mode. Document that SDK entries live on the historical page.

Questions asked

Can we record the same change through both the SDK and LogDataChangeEvent?

No. One operator change then leaves two records with different priorities, your chosen value in the events table and the fixed 999 in recent mode, and that mismatch is the first thing an auditor will query. Pick one path per event: the SDK row for the historical audit trail, LogDataChangeEvent only when recent-mode visibility is mandatory and 999 has been signed off.

Why does a direct SQL query of the events table fail on one of our servers?

On some Historian versions, direct SQL against event storage is refused and the native message reads 'Event History no longer supports queries', while other deployments query dbo.Events without trouble. The Events view is documented as a view referencing the History table rather than a plain table. If your version refuses the query, verify the rows with AlarmApp in Historical mode instead of concluding the write failed.

If even the write success events disappear from mode 2, what has changed?

Then the fault is in the alarm provider path, not your SDK code. Write success events are raised by the Application Server object through that provider, so their disappearance points at the link between the galaxy objects and the alarm system. Your SDK rows are unaffected either way, because they never travelled that path.

Free-text comment or predefined messages: which survives an audit better?

Predefined messages from a combo box. They cannot be misspelled, abbreviated or left vague, so every row in the events table carries text an auditor can group and count. Offer free text only for genuinely unclassifiable reasons, and make the predefined list the default so the common cases are always clean.

Keep reading

  • Troubleshooting

    Fix a DeltaV embedded trend that shows no PI history

    The error names the chart's own PI history connection, PI1, failing to open — the data is not missing. Process History View working on the same workstation proves the server, network and stored interval are good, so stop cycling hostname, IP and defaulthost and reconcile the chart's Historical Data Server entry and the PI1 connection definition against the viewer's working path.

    Edge computing and IIoT

  • Troubleshooting

    Historian trend empty: PLC tag collection troubleshooting

    A live PLC value proves nothing about what the historian stored. Work one known, changing tag through four boundaries — controller to data server, server to collector, collector to point, point to chart — and with a 2 s update rate, a 1% deadband on a 200 in span and a 24 in/h fill, a 20 min window must show about 4 stored events. Zero events means the collector; four events with a flat chart means the display.

    Edge computing and IIoT

  • Troubleshooting

    Historian trend flat line: check Query Row Limit

    A historian trend that draws one straight value in history mode while live mode and a direct SQL query both return good data is truncating rows client-side. The tag's Query Row Limit on the graph was set to 2 instead of the documented default 0, so only two samples came back. Set it to 0, then confirm the trend's saved row count matches the SQL count.

    Edge computing and IIoT