[Bug-13040]Possible Bug using tag groups to drive history

I am trying to utilize a tag group to drive history storage for tags and running into an issue with the tag group not executing. If I set the tag to on change or periodic history is stored as expected. However when I set the sample mode to tag group no history is stored for the tag. Looking at the scinfo table in the database I see two entries for scanclasses, however both have the name exempt and the drvid of both does not match the drive id of the tag when stored using the other sample modes. The tag group is set up in direct mode with a 1 second rate and a max time between samples of 10 seconds.drvTable SCinfo tagGroup

2 Likes

I was running into this issue very recently with my testing as well, I’ll get a bug report going for this.

Actually, I’m having issues reproducing this now with the latest build. Which build are you running? Also, was this an upgrade from a previous version, or a clean install?

I upgraded from 7.9.10. The version I’m running currently is b2019022202. We also have a remote gateway running the same version that is using the same database as a historian.

I updated my version this morning to b2019022702 and am still getting this same issue. On further investigation into the history tables it doesn’t appear that the scid for the tag is changing in the sqlth_te table and no matter how I change the tag group under the historical tag group parameter for the tag itself no entry for the tag group is being created in the sqlth_scinfo table.

Everything is working ok for me in the latest build, even after an upgrade. Do you have a GWBK from 7.9 that we can look at?

The chat board won’t let me upload the 7.9 gwbk as the file size is too large. Do you an email I can send it to?

I have the same issue on a test gateway. Trying to use Tag Groups for history storage works intermittently at best. I created a Tag Group and then an expression tag that changes every second. I used the new Tag Group as the History Tag Group and no history was stored for the tag. If I changed the tag to Periodic or OnChange then history would be stored. No entry for the Tag Group I created was listed in the scinfo table. I played around with editing different properties of the tag group, I switched it from direct to driven mode and back to direct and it started working. However, I cannot recreate the same thing to get a different tag group working. I have one tag that no matter what I change it will not store history or create an entry in the database for the tag or tag group. Gateway backup and DB backup are here. I am using MS SQL Server 2017 14.0.3048.4

I appreciate you providing the backup. Once loaded, everything looks to be working as intended on my local box. This led me to look at newly added Tag Groups or the changing of the Historical Tag Group potentially being the issue.

What I am seeing is if the Historical Tag Group is changed on a Tag, it doesn’t take effect until the tag is restarted (right click tag > Restart Tag or Gateway restart). This is a bug, but can you confirm that once you do this the history is logging as you would expect?

Thanks,
Garth

1 Like

It looks like restarting the tag did trigger the creation of the entry of the scanclass into the sqlth_scinfo table and that history is now storing correctly for the moment.

I can confirm the same. Using the Restart Tag seems to correct the issue. However, I have tried several gateway and OS restarts and history was never stored before issuing the Restart Tag command.

This issue was fixed in the build that was uploaded today (3/21). Please let us know if you continue to see this behavior after upgrading.

6 posts were split to a new topic: Tag history issues