IMD SolutionComputing LibraryShop main store

How-to

Inhibit historian logging of one tag with a Boolean gate

Edge computing and IIoT Published 7 min read

Short answer

There is no per-tag inhibit command. $HistoricalLogging is global: writing 0 to it stops InTouch historical logging for the whole application. Instead, log a memory Real tag that copies the process tag only while a Boolean permits, keep the live tag updating for display and alarms, and force one catch-up copy when the inhibit clears.

On this page
  1. Is there a per-tag inhibit command?
  2. Which system is actually recording the tag?
  3. How do I split the live tag from the logged tag?
  4. How does the Boolean gate the copy?
  5. What does the historian store while the gate is closed?
  6. Should I force bad quality on a second tag instead?
  7. How do I prove the gate works?
  8. Questions asked

No per-tag inhibit switch exists. In InTouch, the documented on/off control is the $HistoricalLogging system tag, and writing 0 to it stops historical logging for the whole application. The pattern that does what you asked for is a memory Real tag that mirrors the process tag only while a Boolean allows it: the live value keeps updating for display and alarms, and history holds its last permitted value until the inhibit clears.

Is there a per-tag inhibit command? #

No. The documented control is $HistoricalLogging, and it is global: writing 0 to it stops WindowViewer from writing entries to the historical log file for every logged tag in the application. Per-tag enrollment stops at the Log Data option on the tag itself.

A tag joins historical logging through the Log Data option in its configuration, and the application-level settings live in the Historical Logging dialog opened from Special, Configure, Historical Logging. Nothing in that chain accepts another tag's value as a condition, so the inhibit has to be built at the point where the logged value is produced.

Use $HistoricalLogging = 0 only when the entire application must go silent, such as a controlled window around a historian migration. For one Real tag it is the wrong scope: every other logged tag stops with it.

Which system is actually recording the tag? #

Check the trend's data source before changing anything, because a screen can read live values through one connection and history through another, and a working numeric display proves nothing about which subsystem stores the tag's past.

What you inspect Where it lives What it tells you
Trend data source Trend configuration Which historical system and tag name the display queries
Log Data option Tag configuration Whether InTouch historical logging records the displayed tag
Acquisition and storage settings Historian tag configuration, where used The value, quality and sampling the historian receives
$HistoricalLogging InTouch system tags Global on/off only, never a per-tag selector

Confirm that the tag named in the trend is the tag whose logging you intend to gate, then pick one unrelated logged tag as a control. The control must keep recording through the whole test, which is how you prove you inhibited one tag rather than logging as a whole.

How do I split the live tag from the logged tag? #

Create one memory Real tag, move the logging enrollment to it, and leave the process-connected Real tag untouched for display, alarms and everything else that needs current data.

The memory tag breaks the direct link between controller updates and the value offered to history. The Boolean then decides when copying happens rather than whether the process connection is healthy, so an inhibited interval never reads as a tag fault on the operator screen.

Role Implementation Behavior
Live Real tag Existing driver or controller connection Updates continuously for display and alarms
History Real tag Memory tag enrolled in logging Changes only when the gate permits
Inhibit Boolean Existing Boolean source with declared polarity Decides whether copying is allowed

Declare the polarity before scripting: true means inhibit, or true means enable, one meaning everywhere. The same split works in any historian that enrolls logging per tag against a configured provider, so the pattern travels beyond one package. Before adding logic, verify both halves: the live tag still follows the controller, and the logging system reads the memory tag.

How does the Boolean gate the copy? #

Build the gate from one data-change action on the live Real tag and one on the inhibit Boolean; together they cover value following, holding, the catch-up copy and startup in five steps.

  1. On a value change of the live Real tag, read the new value and the inhibit Boolean.
  2. If the Boolean permits copying, write the live value into the memory Real tag.
  3. If the Boolean inhibits copying, write nothing; the memory tag holds its last permitted value.
  4. On the Boolean's transition to permitting, copy the current live value immediately. The process can move and then sit still during inhibition, so waiting for the next value change can leave history stale for hours.
  5. At application startup, apply the same decision before the memory tag is first read, so a restart during inhibition does not smuggle in an update.

That is the logic sequence, not script syntax: implement it with your configured tag names in the scripting your application supports, tied to the live tag's updates.

What does the historian store while the gate is closed? #

No new entries in InTouch historical logging, because entries are deadband-driven: an entry is written only when a value changes by more than its log deadband, and a held memory value changes by zero.

Worked example with illustrative numbers. A flow tag updates from the controller every 5 s and swings about 0.8 m³/h between updates; its log deadband is 0.5 m³/h; the inhibit is active for 30 min.

  • Ungated: 30 min × 60 s/min = 1800 s, and 1800 s ÷ 5 s per update = 360 updates. Each change of 0.8 m³/h exceeds the 0.5 m³/h deadband, so 360 entries.
  • Gated: the memory tag changes by 0.0 m³/h, which never exceeds the deadband, so 0 entries.
  • Catch-up: the live value moved from 71.2 to 73.6 m³/h during inhibition, a change of 2.4 m³/h, so the copy written on release is exactly 1 entry.

Stored history for the window is the last pre-inhibit entry, one catch-up entry, and nothing between. A collector that samples on a time basis rather than on deadband can still store the held constant, so check the storage rules for the tag, including whether timestamps come from the data source or the server. If this history supports a quality or compliance record, choose the no-samples outcome rather than a held constant, because an interpolated line is indistinguishable from a genuinely steady process.

Result you need Mechanism Acceptance check
No value changes stored Gated memory tag History input holds its last permitted value
No samples stored at all Collector storage controls No records inside the inhibited interval
Interval shown as unavailable Quality handling and trend rendering Trend separates a gap from a constant

When the interval must be visible, enroll the inhibit Boolean in logging too: its two transitions bracket the held window on the same trend.

Should I force bad quality on a second tag instead? #

Only when you must store no samples at all and the gated memory tag is not acceptable, because this variant breaks a driver binding on purpose and depends on the collector's bad-quality policy.

The construction is a second process-connected tag on the same data source, enrolled in logging, with its reference set to a blank value so its quality goes bad for the duration. Whether that suppresses storage is a collector policy rather than a rule: a historical system may keep quality events or retain invalid samples, and recovery when the reference is restored has to be tested. One way quality changes what a query returns is covered in why a bad quality update hides Historian values.

  • Save the working reference before blanking it.
  • Observe the logged tag's value and quality after the change.
  • Inspect the stored records for the interval.
  • Restore the reference and confirm acquisition recovers.

Commit to the gated memory tag for production: it never touches the binding, and its catch-up behavior is deterministic. Keep the bad-quality route for cases where sample suppression is a hard requirement and the policy test passed on your system.

How do I prove the gate works? #

Run three separate input changes and inspect stored samples, not the plotted line, with the unrelated control tag confirming that logging as a whole stayed on.

  1. Gate open: change the live value by more than the deadband; the memory tag follows and an entry appears.
  2. Gate closed: change the live value again; only the live tag moves, the memory tag holds, and no entry appears.
  3. Gate reopening with the live value stationary: the memory tag catches up at once and exactly one entry appears.

A tag that stops recording with no gate configured is a fault, not inhibition; why Ignition historian tags stopped recording but live data is good works through one such diagnostic path.

Questions asked

Does writing 0 to $HistoricalLogging stop AVEVA Historian collection too?

It stops InTouch historical logging, the WindowViewer function that writes entries to the historical log file when a tag crosses its log deadband. It is not a per-tag selector, and it is not a storage-rules setting for AVEVA Historian. If the trend reads Historian through its own acquisition path, verify that path separately before assuming the write affected it.

Will the trend show a visible gap during the inhibited period?

Usually not. Most trend clients draw a straight interpolated line between the last entry stored before the gate closed and the catch-up entry after it reopens, so a process that wandered during the window looks like a smooth ramp. Turn on sample markers or query the raw records for the interval to see the two entries that actually exist.

Can one Boolean gate several tags at once?

Yes. The gate is ordinary application logic, so one inhibit Boolean can control any number of live-to-memory copy pairs. Give each pair its own data-change action, and put the catch-up copy in a single action that runs when the Boolean clears, so every memory tag is refreshed in the same sweep instead of waiting for individual value changes.

Do I need the memory tag if the historian already skips bad-quality values?

If the collector's documented policy discards bad-quality data and you have tested recovery, a second process-connected tag with its reference blanked can suppress storage completely. The memory tag remains the production choice, because it never breaks a driver binding and its catch-up behavior is deterministic rather than dependent on quality handling you had to verify.

What log deadband should the memory tag use?

Start with the same deadband the process tag used, because the gate changes when values are copied, not how entries are judged. An entry is written when the copied value changes by more than the deadband, so widening it during inhibition adds nothing, and narrowing it only adds entries once copying resumes.

Keep reading

  • Explainer

    How many trend pens fit in one historian client window

    The AVEVA Historian Client Guide documents no pre-set limit on tags in a trend: the count is bounded by the client computer's resources. The 12,000-tag license sizes the server and the concurrent-user license sizes sessions, so neither caps pens. The figure to commit to a customer is a tested operating point — the highest pen total that populates within the agreed acceptance time with the full window layout open.

    Edge computing and IIoT

  • Troubleshooting

    Ignition historian logs memory tags but not OPC tag changes

    Memory tags record because their history subscription was created fresh; the migrated OPC tags carry a stale recording subscription that a storage-provider field edit alone does not rebuild. Fix one tag first: disable history, save, re-enable history with the production provider, and save again, then verify with one safely forceable fault before batching across the remaining tags.

    Edge computing and IIoT

  • Troubleshooting

    Running redundant InTouch historians with parallel tag logging

    InTouch has no dual-Historian target, so a partner Historian configured for redundancy stays empty. Log process data in parallel: the same tag list imported into both Historians, an IDAS on each node reading the OI Server. Handle historical alarms separately with A2ALMDB, because IDAS failover does not carry alarm data.

    Edge computing and IIoT