[IALabs] Scripting Module

Updated module to version 1.0.1

Added ability to configure alarm states when adding / editing tags.


Current version: 1.0.1
Download link: IA Labs Scripting-module_1.0.1.modl
Cost: This module will be free.
Dependencies: OPC-UA module.


New optional argument for addTag and editTag called alarmList that is a string. Here is an example of adding a tag with a digital alarm:system.tag.addTag(parentPath="", name="N7_0", tagType="OPC", dataType="Int4", attributes={"OPCServer":"Ignition OPC-UA Server", "OPCItemPath":"[MLX]N7:0", "AlertMode":1, "AlertDisplayPath":"Machine A", "AlertNotes":"Notes for the alert", "AlertAckMode":2}, alarmList="Out of Range;Medium;1.0;1.0;0;;;0.0;SEC$")Example of adding a tag with analog alarm:system.tag.addTag(parentPath="", name="N7_0", tagType="OPC", dataType="Int4", attributes={"OPCServer":"Ignition OPC-UA Server", "OPCItemPath":"[MLX]N7:0", "AlertMode":2, "AlertDisplayPath":"Machine A", "AlertNotes":"Notes for the alert", "AlertAckMode":2}, alarmList="Lo Lo;High;0.0;5.0;0;;;0.0;SEC$Lo;Low;5.0;15.0;1;;;0.0;SEC$Hi;Medium;85.0;95.0;4;;;0.0;SEC$Hi Hi;High;95.0;100.0;0;;;0.0;SEC$")Example of editing a tag:system.tag.editTag(tagPath="N7_0", attributes={"AlertMode":1, "AlertDisplayPath":"Machine A", "AlertNotes":"Notes for the alert", "AlertAckMode":2}, alarmList="Out of Range;Medium;1.0;1.0;0;;;0.0;SEC$")The alarmList property is a string where each alarm state is separated by a $ character. Each individual alarm state has 9 values separated by a ;. Here are the values:

StateName,Severity,LoSP,HiSP,Flags,LoTagPath,HiTagPath,TimeDeadband,TimeDeadbandUnits

If you export a tag in the Ignition designer to a CSV file you will see an example in the “AlarmStates” column.