Top  | Previous | Next

system.tag.getAlarmStates

Description

Returns an array of alarm definitions for a specific tag.

Syntax

system.tag.getAlarmStates(tagPath)

Parameters

String tagPath - The full path to the tag. Note: you can specify the tag provider name in square brackets at the beginning of the parentPath string. Example: "[myTagProvider]MyTagsFolder". If the tag provider name is left off then the tag will be added to the default internal provider named "default".

Returns

TagAlarmDefinition[] - An array of TagAlarmDefinition.

Scope

All

Examples

# Get the alarm configuration for a tag. The prop.type represents whether the 

# value is static, bound to an expression, or bound to a UDT parameter

tagDefs = system.tag.getAlarmStates("TagAlarm")

for tagDef in tagDefs:

    print tagDef.alarm

    for prop in tagDef.getAlarmProperties():

        print prop.property, prop.type, prop.value