Hi all,
I'm working on an Ignition 8.x project and ran into an odd behavior when querying tag history.
Setup:
- Tag provider:
my_project - History provider (database):
my_project_Hist - I also have another provider:
my_proj(used for some test tags)
In my project properties, the default tag provider is set to my_project, and the default database is also my_project.
Observed behavior:
When I run:
system.tag.queryTagHistory(paths=['[my_project]test'], startDate=..., endDate=...)
→ returns no data.
But if I run:
system.tag.queryTagHistory(paths=['[my_project_Hist]test'], startDate=..., endDate=...)
→ it works correctly.
Interestingly, if I use tags under the other provider (my_proj), and those are historized to the same history provider (my_project_Hist), the query works fine — no issues.
So it seems that when the project’s default provider is used, queryTagHistory() doesn’t automatically resolve the link between the tag provider and the history provider, even though the history provider and database are configured correctly. When I explicitly use [my_project_Hist] it works.
I also noticed that the system.tag.queryTagHistory() documentation doesn’t list a historyProvider argument, so I want to confirm:
- Is this expected behavior when using a project’s default tag provider?
- Should Ignition automatically use the default history provider in this case?
- Or is it required to always specify
[<history provider>]or the fullhistprov:syntax?
Thanks in Advance😊!