Tag History on Fixed Interval

I have what should be a simple question. What I am trying to do is historize certain tags on 15 minute intervals (I don't care if they changed dramatically between samples, just record the value every 15 minutes).

Is this as simple as:

  • Set "Deadband Mode" to Off (we don't want the algorithm to not store a value because it is effectively the same as the last interval).
  • Set "Sample Mode" to Periodic (use the sample rate properties).
  • Set "Max Time Between Samples" to 0 (with Deadband Mode set to Off, we should still be storing every interval, so this property shouldn't affect anything).
  • Set "Sample Rate" to 15.
  • Set "Sample Rate Units" to Minutes.

In this case, I'm assuming that whenever the sample interval triggers (every 15 minutes), the value that is recorded will be whatever the value of the current tag is (it won't trigger an additional read from the device first to make sure it has the latest).

Thanks!

Yes this should work okay. Just don't forget to set the storage provider.

Keep in mind though that all of your tags won't store in syncronised way using this method.

Say for example you have twenty sensors recording like this, and export the data they might not all store at the exact same time, it just means there's a 15 minute gap between the last recording, whenever that was.

If you want them all syncronised you may need to use transaction groups.

Thanks Hayden. In my case, the spec says every 15 minutes and not on a clock (0, 15, 30, ...). We have thousands of tags to record like this, so we really don't want to go down the transaction group path... :slight_smile:

Another question on a similar subject.

It sounds like I can probably do this doing a historical tag group as well. Set up the tag group in the basic property section to "Default" (direct, rate of 5,000 ms). In the history property section, set:

  • Deadband Mode to Off (don't allow the historian to skip storing unchanged data)
  • Sample Mode to Tag Group
  • Max Time Between Samples to 0
  • Historical Tag Group to an appropriate tag group with a rate of 900,000 ms (15 min * 60 sec/min * 1000 ms/sec).

It looks like we also want to make sure that the Max Time Between Samples is also set to 0 in the Tag Group that we're using for the historical tag group.

Based on @pturmel's post, my impression is that the historical tag group will execute every 15 minutes, grab the current value of the tag, and insert it in the historian.

In theory, this would cause all tags with the same interval to store at the same time, so at least they would be in sync with each other.

Is the above correct/valid? If so, it seems to be a bit more parameters to configure, but keeps all tags with the same Historical Tag Group inserting into the database at the same time (with the potential downside of hammering SQL while doing so).

image

Bumping this up.