Hello,
I’m using V7.8.0 and I’ve got a problem when I try to create a boolean tag from a global shared module.
following is the script tested with the Console without problem
[i]
[color=#0080FF]Path=“Email/Site1”
Name=“ALM”
value =0
system.tag.addTag(parentPath=Path, name=Name, tagType=“MEMORY”,dataType=“Boolean”, value=value, alarmConfig={"Alarm ":[[“name”, “Value”, "Alarm "], [“setpointA”,“Value”, 1]]})
[/color][/i]
the tag is created with the alarm
so my next step was to create a script that i could call from any project like this in the global shared script library.
[color=#FF0000]d[i]ef EmailTag (Path,Name,value):
Path1 = Path+’/’
Tag=Path1+Name
if system.tag.exists(Tag):
system.tag.write (Tag, value)
else:
system.tag.addTag(parentPath=Path1, name=Name, tagType="MEMORY",dataType="Boolean", value=value, alarmConfig={"Alarm ":[["name", "Value", "Alarm "], ["setpointA","Value", 1]]})[/i][/color]
but something strange happened when i call my module the tag is well created but not the alarm config. Am I missing something ?
Regards