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 project default provider will be used.
-
Returns
TagAlarmDefinition[] - An array of TagAlarmDefinition.
-
Scope
All
Code Examples
Code Snippet
# 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