Hello.
In Ignition 8.1.21, I run the following function to find out if a tag has alarms defined:
system.tag.exists("[default]_testIsemaren/test/Alarms")
This works fine, it returns 'true' as expected, but in the logs I get this error:
Error reading path '[default]_testIsemaren/test/Alarms.name'
Why?
Is there another way to check if a tag has alarms defined?
Best Regards.
system.tag.exists works, under the hood, by reading the .Name property and checking if the return quality is Bad_NotFound. You could simply system.tag.read the Alarm subfolder and check it's return quality yourself to do the same check and avoid the warning in the logs.
"Alarms" is not a folder, it is the property that contains the alarms defined in a tag.
I have found this way to check if a tag has alarms defined without getting the error in the logs:
system.tag.exists("[default]_testIsemaren/test/Alarms.[anyProperty]")
If there are no alarms defined in a tag, there will be no property inside "Alarms".
Best Regards.