Tags Historical logging Sampling rate Issue

Dear All,

Hope you all are doing well.
I am facing a very weird issue when using the tag history feature in Ignition 8.1 perspective. When, I enable historical logging in a tag (float datatype) and do the configuration i.e. make the the sampling mode “On Change”, Minimum Sampling Time 1 sec and Maximum Sampling time 3 Hr (picture below).

After doing this, when the tag starts running and getting different values in it, no values are logged in the database and on Power Chart the trend of that tag starting operating real-time with respect to the tag value (no history maintain). And, as I turned off the tag value the trend also stopped and in database no values were stored.

Tag History Issue_1
Tag History Issue_2

When I am getting Okay Result???

When I changed the Maximum Sampling time to 1 sec, 2 sec, 500 ms. I started getting values in the database according to the above set rate and the tag history starts maintaining. Also, the Power chart is showing historical trend.

The thing I know is, maximum Sampling time is for the max sampling rate. The sampling of tag values should be depend on “Minimum sampling rate”. But I don’t know why this is happening :neutral_face:

I also tried deleting the tag, testing this on other tags…But the issue is same. Kindly, help me out in this please.

Did you notice that History has a separate deadband?

The minimum time between samples prevents tags that update/change faster than this rate to only sample at that rate. For instance, if you set this to 5 seconds and your tag changes every second, it will only be logged once every 5 seconds. the max time between samples ensures that a value that doesn’t change outside of the historical deadband gets logged at least once per that period. In your instance, it will force it to be logged every 3 hours even if it doesn’t change outside of the deadband range.

It also looks like you are scaling this raw value from a range of 0-100 to a scale of 0-1. Since your historical deadband is 0.1, this requires the raw value to move by units of 10 for new values to be logged as well.

Hi, what if the min time between sample is 5 sec. The tag changed at 3 sec, after the last recorded value. After that the tag did not change for 10 sec..
Will the tag value at 3 sec be recorded at the 5th sec?
Assuming change is more than deadband.

Example.

Deadband is 1.0
Min time between samples is 5 sec.
Last log value was 5.0 at time 0 sec.
At time 3 sec. value change to 7.0
At time 5 sec. value remain 7.0
will 7.0 be logged?

I would suggest looking at this page in the user manual, it goes over the compression algorithm used by tag history.

In your example though, assuming the deadband style is set to analog (the default for float values) and no Max Time Between Records is at play, then whether or not the value 7.0 is stored will depend on the next value the tag receives. For the time being, the tag value of 7.0 along with the upper and lower slope values will be stored in memory for comparison when the next value comes in. Setting the tags.execution.actors.history logger to TRACE level in the gateway logs will show the value being received and processed and then whether it's going to be stored. I might not set that if you have a lot of tags storing history because it will spam your logs, but if you just have a tag or two it's a good logger to get some insight.

You can also check the values being stored in memory that will be used for comparison by going to the tag diagnostics in the tag editor.

1 Like

Thanks for your fast response.
The short version on what the manual saying is that, for analog, ignition use an algorithm to predict the value to be logged in the database. It implies that the data logged to the database is not necessarily always the data that was actually received from remote devices.

Is my understanding some what correct?

Not quite right.

In analog mode, as data points arrive, they are held in memory. If still on the trend line, the prior held value is discarded. If off the trend line, the prior held value is recorded (with its timestamp). This causes values to be recorded at discontinuities in the trend for best interpolation results when querying.

1 Like

I see. But when data points arrive, and still on trend line, and satisfy the min time. will it logged the data?

No. That's how Ignition conserves storage space. It would have to hit the max time to be forced to record. (Min time prevents recording until at least that much time has passed. Max time forces recording if that much time has passed.)

Thank you. That lightens up my assumption.