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

0x0001

Enabled

Enabled and normal. The alarm is armed but not in alarm, and has nothing outstanding to acknowledge.

0x0003

Enabled, Active

In alarm and unacknowledged. This is the state that dispatches a worker.

0x0007

Enabled, Active, Acknowledged

Still in alarm, but somebody has acknowledged it. The condition is still active.

0x0005

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 0x0003—the alarm is enabled and active, and is not acknowledged.

Ack

NewState equals 0x0007, 0x0005, or 0x0004—the alarm is acknowledged, whether or not it is still active, and whether or not the condition is enabled.

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:

x=( {{triggerVariable:NewState}} == 0x0003 || {{cfscoreVariable:IsCurrentAlarm}}==0 )

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?

bittest({{triggerVariable:NewState}}, 1)

Is the alarm acknowledged?

bittest({{triggerVariable:NewState}}, 2)

Is the alarm active and unacknowledged?

bittest({{triggerVariable:NewState}}, 1) && !bittest({{triggerVariable:NewState}}, 2)

Has the alarm been shelved?

bittest({{triggerVariable:NewState}}, 4)

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

Message

The alarm message text.

OriginalSource

The tag or point that raised the alarm.

SourceName

The alarm source.

AREA

The alarm area, commonly used to route the notification to the workers responsible for that part of the plant.

Severity

The alarm severity.

ConditionName

The alarm condition, such as Limit.

SubConditionName

The sub-condition, such as HiHi.

ActiveTime

When the alarm became active.

ChangeMask

Which aspects of the alarm changed in this update.

RELATED_VALUE_01 to RELATED_VALUE_20

The related values configured on the alarm. These commonly carry equipment coordinates or process values that the workflow needs. Learn more

ACK_COMMENT

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