Ignition Exchange | Inductive Automation
1、As docs I set the browsePath "histprov:postgres:/drv:ignition-27c1c261c5d2:default:/tag:test"
2、As docs I add Custom Properties "HistoricalAlias" in Tag.
3、Then change bingds "tags =browseTags('[default]TEST')"
4、I can see charts in PowerChart.
histprov:postgres:/drv:ignition-27c1c261c5d2:default:/tag:test/tag2
5、But in this project ,not effect?
Is there other settings?
In Gateway -Config-Tags-Realtime Tag Providers ,must add HistoricalAliasProvider
2. Add a tag provider to your gateway name "HistoricalAliasProvider"
3、* Open the tag editor and add a custom property to the tag called"HistoricalAlias"
In Version: 8.1.24 (b2023011208)
import re # 导入正则表达式模块
path = 'histprov:postgres:/drv:ignition-win10-2022wcacw:default:/tag:'
results = system.tag.browseHistoricalTags(path).getResults()
tagsAddedCount = 0
print results
for result in results:
# if result is a folder, run the function again for that folder
if result.hasChildren():
print("hasChildren")
print('----------------path----------------') # histprov:postgres:/drv:ignition-win10-2022wcacw:default:/tag:/pwgz
print(result.path)
print('----------------newpath----------------') # histprov:postgres:/drv:ignition-win10-2022wcacw:default:/tag:pwgz
# Action! Path is different ! Newpath history is Right!
print(re.sub(':/tag:/', ':/tag:', str(result.path)))
Change this , it will right.