Top  | Previous | Next

Expression

The expression block contains an expression which is evaluated against each alarm that enters it. The result is expected to be a boolean value, either True or False. The alarm is passed to the corresponding output.

 

The expression executed by the block is written in the same syntax as other expressions in Ignition. However, in this context, it is possible to refer directly to properties of the alarm event that is being evaluated by using the standard "{path}" reference syntax. In addition, several functions are available to quickly determine the state of the alarm.

 

Examples

isActive()

This single function returns whether the current event is active or not. An expression block like this could be used to then dispatch to an "active" pipeline, and a "clear" pipeline (both the active and clear pipeline settings on the alarm would be set to this dispatch pipeline). This kind of setup allows you to later modify how actives are handled vs. clears in one place, without having to modify many alarms.

 

toInt({priority})>2 && {displayPath} like "*East Area*"

This block would forward all High and Critical alarms from the "east area" to the true path. The others would go to false, which may not actually be bound to another block, making this expression block act like a filter.

 

isPropertyDefined("isEscalated")

This expression checks if a property exists on the event. The "isEscalated" property is not a system defined property. Instead, in this example, it might be set using a Set Property block before forwarding back to the start of the pipeline. The first time through, this expression would fail, but the next time, it would pass, and the "escalated" behavior could be executed.