Following the example from the manual, I am able to successfully create tags with alarms on the fly. Only problem left is trying to set the “mode” attribute - I would like the alarm trigger to be != 0. Here is what I have:
[code] system.tag.addTag(parentPath = “QA/Messages”, name = tagName,
tagType = “MEMORY”, dataType = “Boolean”, value = 1,
alarmConfig = {“QArequest”: [[“name”, “Value”, “QArequest”],
[“mode”, “Value”, “Not Equal”],
["NotificationList", "Value", notify],
["activePipeline", "Value", pipeline],
["ackMode", "Value", "Unused"],
["RequestType", "Value", type],
["RequestID", "Value", id],
["CustomEmailSubject", "Value", "QA Notification"],
["CustomEmailMessage", "Value", message]]})
[/code]
This works great except when I uncomment the 4th line I get:
QArequest exception occurred: (<type ‘com.inductiveautomation.ignition.client.gateway_interface.GatewayException’>, com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Alarm property ‘mode’ is invalid or value is an incorrect data type, <traceback object at 0x3>)
When I manually change the alarm on the tag to trigger != 0, then query the alarm properties, it returns:
QArequest
mode Value Not Equal
setpointA Value 0.0
NotificationList Value BryceEmail
RequestType Value 2
CustomEmailMessage Value QA Tasting Approval requested by STB at 11:13:53 to Begin Packaging ST4381-82 1
activePipeline Value Email Alarms
RequestID Value 28
name Value QArequest
CustomEmailSubject Value QA Notification
ackMode Value Unused
So where am I going wrong getting an invalid “mode”??
Bryce Troy
Control Systems Engineer
Left Hand Brewing Company