Alarm Function Block

The Alarm function generates an alarm based on the input's value in relation to the high and low limits. It is possible to create up to 32 alarm function blocks that map to nvoError.

The function block keeps track of the alarm status and delay timer from iteration to iteration. These are cleared upon power-up or reset. It is not required to connect the output of this function block to the input of another function block for this function block to function. (This is because a function block's output has no value if it is not connected).

The Alarm Function Block is unique in that it also sets or resets a nvoError bit. When the Alarm Status value is set to "true", the configured bit in nvoError is set. When the Alarm Status is set to "false", the configured bit in nvoError is cleared.

nvoError: A multi-byte network variable provided by the engineering tool indicates errors. The nvoError map can be accessed via the controller's property sheet view. The nvoError map is made up of ten one-byte fields because each byte is 8 bits long. A maximum of 80 bits can be used to indicate errors. Each bit corresponds to an alarm.

Figure 1: Alarm Function Block

Figure 2: Alarm Property Sheet

Figure 3: Alarm Logic Diagram

Inputs

Input Name

Description

Value

Input Value.

Numeric: 32-Bit floating Point value >=-inf-<inf, Default: Null

HighLimit

Input High Limit.

Numeric: 32-Bit floating value: >=-inf-<inf, Null

LowLimit

Input Low Limit.

Numeric: 32-Bit floating value: >=-inf-<inf, Null

PresetTime

Normal to Alarm delay (Sec)

Numeric: 32-Bit numeric value: 0-32767, Null

PostTime

Alarm lock on delay (Sec).

Numeric: 32-Bit numeric value: 0-32767, Null

Disable

Alarm lock on delay (Sec).

Numeric: Binary value: 0-1, Null

Table 1: Input of Alarm Function

Output

Output Name

Description

Alarm Status

Alarm Status

False (0), True (1)

Table 2: Output of Alarm Function

Parameter

Parameter Name

Description

HighLimit

(In & Par)

Input High Limit.

Numeric: 32-Bit floating value: >=-inf-<inf, Null

LowLimit

(In & Par)

Input Low Limit.

Numeric: 32-Bit floating value: >=-inf-<inf, Null

PresetTime

(In & Par)

Normal to Alarm delay (Sec)

Numeric: 32-Bit numeric value: 0-32767, Null

PostTime

(In & Par)

Alarm lock on delay (Sec).

Numeric: 32-Bit numeric value: 0-32767, Null

Out Save

Master Sync Enabled : If you set it to "true" the last output will be set as output for one cycle after the controller restarts. The application can use it to return to the same state before the controller restart.

Alarm Status: To enable or disable the Alarm Status feature.

Table 3: Parameters of Alarm Function

Examples

The alarm status is "true" if the value is constantly greater than the High Limit or less than the Low Limit for the Preset Time. When you set the alarm to "true", it stays that way for at least the Post Time. If the value is still outside of the limits at the end of the Post Time, the alarm will continue to sound. The alarm status is set to "false" if the value is within limits and the Post Time has expired.

Figure 4: High Limit Alarm

Figure 5: Low Limit Alarm

Refer to General Description for general information about IRM N4 Function Blocks.