IMD SolutionComputing LibraryShop main store

Troubleshooting

Tag historian not logging zero: deadband and max time decide

Edge computing and IIoT Published 7 min read

Short answer

A tag stuck at zero writes nothing because minimum time only throttles writes and the deadband suppresses unchanged values. Set Max Time Between Samples to the longest gap you accept in the trend (at least 1000 ms), and use the Discrete deadband style for signals that swing between zero and non-zero. Keep Min Time as the throttle; it never forces a row.

On this page
  1. The five hops a sample takes to a zero row
  2. Check 1: can the deadband swallow the step to zero?
  3. Check 2: are Min Time and Max Time doing the jobs you think?
  4. Check 3: did logging stop entirely, or only the zero?
  5. Apply Discrete style and prove it with a forced transition
  6. Worked example: the heartbeat decision for this tag
  7. Questions asked

A rollformer speed tag in FPM stored rows roughly one second apart while the line ran, then stopped. The newest row in the SQL table is about 3 hours old with a value above 100, the live tag reads 0 with Good quality, and no zero row exists. The cause is sample evaluation, not the database: minimum time between samples only throttles writes, the deadband suppresses a steady value, and only Max Time Between Samples forces a row while the value is unchanged. Set it to the longest gap you accept in the trend (documented minimum 1000 ms) and switch the deadband style to Discrete for a signal that swings between zero and non-zero.

The five hops a sample takes to a zero row #

A stored value passes through five hops, and a missing zero means one of them dropped it.

Hop What it does Reading that clears it
1. PLC to tag Driver delivers value and quality Live value 0, quality Good
2. Sample evaluation Deadband and min/max time decide whether to store Settings match the intent
3. Store-and-forward Buffers rows if the database is unreachable No backlog or provider fault
4. SQL write Row inserted with a timestamp Direct query shows rows after the last run value
5. Query and display Trend or table reads the table Same result from raw SQL

In this case hop 1 is clear: the tag browser shows 0 with Good quality. If quality were Bad or Stale, the historian would record quality-coded rows or none, and you would fix the driver or comms path first. The remaining checks work hops 2 through 5 in order.

Check 1: can the deadband swallow the step to zero? #

The Analog deadband style stores a new sample only when the value moves more than a threshold from the last stored value. It suits signals that sit away from zero, such as temperature or tank level. The last stored row here is above 100 FPM and the new value is 0, a change of more than 100 engineering units, so the configured deadband would have to exceed that to hide the step outright.

Read the configured deadband and compare it to the tag's working range. A deadband far smaller than 100 FPM cannot explain the missing zero on its own; a deadband comparable to or larger than the working range will suppress zero or skip the final deceleration steps, and you should reduce it or switch style. The documented behavior of the deadband styles is described on the configuring tag history page of the user manual, including why the choice is not obvious from the names alone. Treat the deadband as one contributor and go to the timing settings, which are the decisive factor for a steady zero.

Check 2: are Min Time and Max Time doing the jobs you think? #

This is the root cause in the reported case. Minimum time is a throttle: it limits how fast rows are written, which is why the running data appears about 1 s apart with a 1 s minimum. It does not force a write while the value is steady. Maximum time is the heartbeat: the user manual states that Max Time between samples bypasses the deadband and forces a record at the next sample, and that it must be at least 1000 milliseconds.

Setting Effect on a stopped line
Min time 1 s, max time unset or very long At most one row on the transition; nothing while steady at 0
Max time set to the heartbeat you want Periodic rows at 0, so the trend shows a flat line, not a gap

Set Max Time Between Samples to the longest gap you accept in a trend while the line is idle. For this speed tag, 60 s is a reasonable heartbeat: it writes one row per minute per tag during idle, so a weekend of downtime adds roughly 2,880 rows (60 rows per hour times 48 hours), which is trivial against the same tag writing about 3,600 rows per hour at the running throttle while running. A max time set down at the minimum spacing, by contrast, writes a row every second per tag for the whole idle period, about 26,000 rows overnight, for no extra information in the trend.

Note the interaction: max time bypasses the deadband but not the sample evaluation rate, so if your scan or subscription rate is slower than the max time you set, the heartbeat row lands at the next sample, not exactly at the interval. Max time also only helps if history is still enabled and the tag is evaluating on an active scan class; a disabled tag or stopped scan class writes nothing at any setting.

Check 3: did logging stop entirely, or only the zero? #

A rollformer decelerates through intermediate speeds before it reaches 0. The newest rows in the SQL table, queried directly and ordered by timestamp descending, decide the branch:

  • Deceleration rows present, only the 0 missing: the pipeline kept writing and sample evaluation dropped the final value. Work Checks 1 and 2.
  • Last row is the high run speed with nothing after it, no decel values: the pipeline stopped writing at that moment. Check the history provider and database connection status for faults or a store-and-forward backlog around the last row's time, and confirm buffered rows were forwarded after any database outage.

A row at the right timestamp in SQL but absent from the chart is a display problem, not a logging problem: check the trend's time window, row limit and aggregation mode before touching tag settings.

Apply Discrete style and prove it with a forced transition #

Open the tag's history configuration and change Deadband Style from Analog to Discrete. The Discrete style treats any change in value as a sample, which is the usual choice for signals that move between zero and non-zero, such as motor speed or pump flow; Analog is reserved for signals that stay non-zero. Keep the minimum time at its current throttle setting.

  1. Set Max Time Between Samples to your chosen heartbeat, for example 60 s (the documented floor is 1000 ms).
  2. Create a test memory tag with an identical history configuration, so the production tag is untouched.
  3. Write a non-zero value such as 120 to the test tag, wait for a row, then write 0.
  4. Query the SQL table for the test tag: confirm a row with value 0 appears after the transition, followed by zero rows spaced at the max time interval.
  5. Run and stop the real line, then query the table again: the deceleration values and the final 0 should all appear in SQL, not just on the trend.

If the test tag stores the zero but the real tag does not, the difference is in the real tag's configuration or its data path. Diff the two history configurations field by field, then re-check the provider status.

Worked example: the heartbeat decision for this tag #

Given: a speed tag idled at 0 for 3 hours, a 1 s minimum time, no maximum time configured, and a trend where a 60 s gap during idle is acceptable.

  • Rows while running at that throttle: about 3,600 rows per hour per tag.
  • Rows while idle with no max time: 0 rows, so the last row stays over 100 FPM and hours old, exactly the reported symptom.
  • Rows while idle with max time 60 s: 3 hours times 60 rows per hour equals 180 rows, a flat zero line on the trend.

The decision: for any tag that sits at zero between runs, set Max Time Between Samples to the idle gap you want on the trend (60 s here, at least 1000 ms), use the Discrete deadband style, and leave Min Time as the running throttle. When you later need to cut stored data for older periods, the same trade-off between resolution and row count applies, as covered in reducing historian resolution for old data. If the root cause turns out to be elsewhere, the storage-growth effects of deadband behavior are covered separately in why deadband style delays double tag history storage.

One safety note: a trend gap is a data problem, but if the same tag feeds an interlock or operator decision, verify the live tag and quality at the machine before trusting a historical flat line.

Questions asked

Why does my historian store the run speed but never a steady zero?

While the value changes faster than the deadband, every new sample differs enough from the last stored one to be written. Once the line stops, the value stops changing, so nothing differs from the last stored row and the deadband suppresses all further samples. Only Max Time Between Samples can force a row while the value is steady, and it only works if you set it.

What should Min Time and Max Time Between Samples be set to?

Min Time is a throttle: keep it at your fastest useful spacing, for example 1 s on a speed tag. Max Time is the heartbeat: set it to the longest gap you accept in a trend during idle periods, for example 60 s. The documented floor for Max Time Between Samples is 1000 ms, so it cannot be shorter than that. Max time bypasses the deadband but not the sample evaluation rate.

Which deadband style suits a speed or flow tag?

Discrete. It treats any change in value as a sample, so the step from over 100 FPM down to 0 is logged. Analog is meant for signals that stay away from zero, such as temperature or tank level, where logging only movements beyond a threshold saves rows without losing the shape of the curve.

How do I prove the fix without touching the production tag?

Create a test memory tag with the same history settings, write a non-zero value, wait for a row, then write 0. Query the SQL table directly: you should see the zero row at the transition and further zero rows spaced at the max time interval. Then run and stop the real line and confirm the deceleration values and the final zero appear in the table.

How do I tell a deadband problem from a database problem?

Look at the rows during deceleration. If intermediate speeds are stored and only the final zero is missing, sample evaluation is the cause. If the last row is a high value with nothing after it and no deceleration rows, the pipeline stopped writing at that moment: check the history provider status, store-and-forward backlog and the database connection.

Keep reading

  • How-to

    Setting historian pruning and retention for Ignition tag history

    Prune tag history on the history provider, not with the transaction group's delete setting: in the Gateway's tag history configuration, enable data pruning and set a retention period in days. At 250 MB per day of growth, 30 days of retention holds about 7.5 GB and a full year about 91 GB. Deadband and Max Time Between Samples decide most of the daily rate, and QC records from transaction groups keep growing on a separate budget.

    Edge computing and IIoT

  • Troubleshooting

    Why Auto deadband style delays Double tag history storage

    Under Auto, the historian gives Float and Double tags analog compression: a changed value becomes a stored record only when a later sample leaves the compression window, so the newest history row can lag the live value. Set the tag's Deadband Style to Discrete and size the deadband to the change magnitude when every qualifying change must be recorded immediately.

    Edge computing and IIoT

  • How-to

    Get the timestamp of a max value in a historian report query

    A tag history aggregation returns the maximum value alone and drops the row that set it, so there is no timestamp to bind. Add a Script data source below the Tag Historian Query, scan the returned rows with a strict greater-than comparison that carries each row's t_stamp, and bind the report to that pair; or query the history partitions directly with the tie rule written into the SQL.

    Edge computing and IIoT