Alarm States in Connected Field Service Workflows
A Connected Field Service workflow is triggered by an alarm, and the blocks that decide whether to keep notifying, escalate, or stop all test the current state of that alarm. That state arrives in the workflow as the trigger field NewState, a bit field representing the alarm's condition.
Use this reference when you are writing or adjusting the expression on an Alarm, Ack, or Normal block, or on any Condition block that has to react to what the alarm is doing. Learn more
NewState Bits
Read NewState in an expression as {{triggerVariable:NewState}}. The value is a bit field, so use bittest to check one aspect of the state, or compare it with == to match an exact combination.
|
Bit |
Name |
Meaning |
|---|---|---|
|
0 |
Enabled |
The alarm condition is enabled. A disabled alarm has this bit clear. |
|
1 |
Active |
The alarm condition is currently true. |
|
2 |
Acknowledged |
The alarm has been acknowledged. |
|
3 |
Cleared |
The alarm condition has returned to normal. |
|
4 |
Shelved |
The alarm has been shelved by an operator. |
|
5 |
Suppressed |
The alarm is suppressed by design. |
|
6 |
Out of Service |
The alarm is out of service. |
|
7 |
Latched |
The alarm is latched and stays reported until it is reset. |
Bits 0 to 2 are the basic fields, present on every alarm. Bits 3 to 7 are the extended ISA fields and are set only by alarm servers that implement them.
Common Combinations
The combinations below are the ones the supplied condition blocks test for. Each value assumes the extended ISA bits are clear.
|
Value |
Bits set |
Condition |
|---|---|---|
|
|
Enabled |
Enabled and normal. The alarm is armed but not in alarm, and has nothing outstanding to acknowledge. |
|
|
Enabled, Active |
In alarm and unacknowledged. This is the state that dispatches a worker. |
|
|
Enabled, Active, Acknowledged |
Still in alarm, but somebody has acknowledged it. The condition is still active. |
|
|
Enabled, Acknowledged |
Acknowledged and no longer active. The alarm has been handled and has returned to normal. |
Expressions Used by the Condition Blocks
The Alarm, Ack, and Normal blocks each hold an editable expression. They evaluate to True or False in the same manner as ordinary conditional blocks. Unlike the standard conditional block, however, these blocks re-read the state of the triggering alarm before evaluating.
|
Block |
Evaluates to True when |
|---|---|
|
Alarm |
NewState equals |
|
Ack |
NewState equals |
|
Normal |
The alarm is acknowledged and no longer active, or is disabled. |
Each supplied expression also includes the clause {{cfscoreVariable:IsCurrentAlarm}}==0, which makes the block evaluate to True when the alarm that started the workflow has cycled into a new instance. This is what lets a loop exit, instead of continuing to notify workers about an alarm that has already been superseded.
The Alarm block therefore uses an expression of this form:
Testing a Single Bit
Comparing the whole value with == matches an exact combination, which is precise but fails as soon as an extended ISA bit is set that the comparison did not account for. To test one aspect of the state and ignore the rest, use the expression engine's bittest function instead. It takes the value and the bit number from the table above, counting from 0 at the least significant bit, and returns True or False. Learn more
|
Test |
Expression |
|---|---|
|
Is the alarm active? |
|
|
Is the alarm acknowledged? |
|
|
Is the alarm active and unacknowledged? |
|
|
Has the alarm been shelved? |
|
Other Alarm Fields Available in Expressions
NewState is one of the alarm fields the trigger carries. The expression editor in the Template Designer lists them all under the Alarm Values tab; the ones used most often in notification workflows are these.
|
Field |
Description |
|---|---|
|
|
The alarm message text. |
|
|
The tag or point that raised the alarm. |
|
|
The alarm source. |
|
|
The alarm area, commonly used to route the notification to the workers responsible for that part of the plant. |
|
|
The alarm severity. |
|
|
The alarm condition, such as Limit. |
|
|
The sub-condition, such as HiHi. |
|
|
When the alarm became active. |
|
|
Which aspects of the alarm changed in this update. |
|
|
The related values configured on the alarm. These commonly carry equipment coordinates or process values that the workflow needs. Learn more |
|
|
The comment entered with the acknowledgment. |
A field is available in an expression only if the workflow configuration's alarm subscription includes it. Add fields to the subscription on the Alarms Subscriptions tab of the workflow configuration. Learn more
Related Topics