Digital Alarm (ALMD)
This information applies to the
CompactLogix
5370, ControlLogix
5570, Compact GuardLogix
5370, GuardLogix
5570, Compact GuardLogix
5380, CompactLogix
5380, CompactLogix
5480, ControlLogix
5580, and GuardLogix
5580 controllers. Controller differences are noted where applicable.The Digital Alarm (ALMD) instruction provides alarming for any discrete Boolean value.
Available Languages
Ladder Diagram
Function Block
Structured Text
ALMD (ALMD,In,ProgAck,ProgReset,ProgDisable,ProgEnable)
Operands
Ladder Diagram
Operand | Type | Format | Description |
---|---|---|---|
ALMD tag | ALARM_DIGITAL | Structure | ALMD structure |
ProgAck | BOOL | Tag
Immediate | On transition from false to true, acknowledges alarm (if acknowledgment is required). |
ProgReset | BOOL | Tag
Immediate | On transition from false to true, resets alarm (if resetting is required). |
ProgDisable | BOOL | Tag
Immediate | When True, disables alarm (does not override Enable Commands). |
ProgEnable | BOOL | Tag
Immediate | When True, enables alarm (takes precedence over Disable commands). |
MinDurationPRE | DINT | Immediate | Specifies how long the alarm condition must be met before it is reported (milliseconds). |
MinDurationACC | DINT | Immediate | Indicates the current accumulator value for the alarm’s MinDuration timer. This value is not used in versions 29 and later of the Logix Designer application. The value is always 0. |
Function Block
Operand | Type | Format | Description |
---|---|---|---|
ALMD tag | ALARM_DIGITAL | structure | ALMD structure |
Structured Text
Operand | Type | Format | Description |
---|---|---|---|
ALMD tag | ALARM_DIGITAL | Structure | ALMD structure |
ProgAck | BOOL | Tag
Immediate | On transition from false to true, acknowledges alarm (if acknowledgment is required). |
ProgReset | BOOL | Tag
Immediate | On transition from false to true, resets alarm (if resetting is required). |
ProgDisable | BOOL | Tag
Immediate | When True, disables alarm (does not override Enable Commands). |
ProgEnable | BOOL | Tag
Immediate | When True, enables alarm (takes precedence over Disable commands). |
MinDurationPRE | DINT | Immediate | Specifies how long the alarm condition must be met before it is reported (milliseconds). |
MinDurationACC | DINT | Immediate | Indicates the current accumulator value for the alarm’s MinDuration timer. This value is not used in versions 29 and later of the Logix Designer application. The value is always 0. |
See Structured Text Syntax for more information on the syntax of expressions within structured text.
ALMD Structure
Input Parameters
Input Parameter | Data Type | Description |
---|---|---|
EnableIn | BOOL | Ladder Diagram: Corresponds to the rung state. Does not affect processing. Function Block: If cleared to false, the instruction does not execute and outputs are not updated. If set, the instruction executes. Default is true. Structured Text: No effect. The instruction always executes. |
In | BOOL | The digital signal input to the instruction. Default is false. Ladder Diagram: Follows the rung condition. Set to true if the rung condition is true. Cleared to false if the rung condition is false. Structured Text: Copied from instruction operand. |
InFault | BOOL | Bad health indicator for the input. The user application may set InFault to indicate the input signal has an error. When set, the instruction sets InFaulted (Status.1). When cleared to false, the instruction clears the InFaulted (Status.1) to false. In either case, the instruction continues to evaluate In for alarm conditions. Default is false (good health). |
Condition | BOOL | Specifies how alarm is activated. When Condition is set to true, the alarm condition is activated when In is set to true. When Condition is cleared to false, the alarm condition is activated when In is Cleared to false. Default is true. |
AckRequired | BOOL | Specifies whether alarm acknowledgment is required. When set to true, acknowledgment is required. When cleared to false, acknowledgment is not required and Acked is always set to true. Default is true. |
Latched | BOOL | Specifies whether the alarm is latched. Latched alarms remain InAlarm when the alarm condition becomes false, until a Reset command is received. When set to true, the alarm is latched. When cleared to false, the alarm is unlatched. Default is false. A latched alarm can only be reset when the alarm condition is false. |
ProgAck | BOOL | Set to true by the user program to acknowledge the alarm. Takes effect only if the alarm is unacknowledged. Requires a false-to-true transition. Default is false. Ladder Diagram: Copied from the instruction operand. Structured Text: Copied from the instruction operand. |
OperAck | BOOL | Set to true by the operator interface to acknowledge the alarm. Takes effect only if the alarm is unacknowledged. The instruction clears this parameter. Default is false. |
ProgReset | BOOL | Set to true by the user program to reset the latched alarm. Takes effect only if the latched alarm is InAlarm and the alarm condition is false. Requires a false-to-true transition. Default is false. Ladder Diagram: Copied from the instruction operand. Structured Text: Copied from the instruction operand. |
OperReset | BOOL | Set to true by the operator interface to reset the latched alarm. Takes effect only if the latched alarm is InAlarm and the alarm condition is false. The alarm instruction clears this parameter to false. Default is false. |
ProgSuppress | BOOL | Set to true by the user program to suppress the alarm. Default is false. |
OperSuppress | BOOL | Set to true by the operator interface to suppress the alarm. The alarm instruction clears this parameter to false. Default is false. |
ProgUnsuppress | BOOL | Set to true by the user program to unsuppress the alarm. Takes precedence over Suppress commands. Default is false. |
OperUnsuppress | BOOL | Set to true by the operator interface to unsuppress the alarm. Takes precedence over Suppress commands. The alarm instruction clears this parameter to false. Default is false. |
OperShelve | BOOL | Set to true by the operator interface to shelve or reshelve the alarm. Requires a transition from false in one program scan to true in the next program scan. The alarm instruction clears this parameter to false. Default is false. Unshelve commands take precedence over Shelve commands. Shelving an alarm postpones alarm processing. It is like suppressing an alarm, except that shelving is time limited. If an alarm is acknowledged while it is shelved, it remains acknowledged even if it becomes active again. It becomes unacknowledged when the shelve duration ends provided the alarm is still active at that moment. |
ProgUnshelve | BOOL | Set to true by the user program to unshelve the alarm. Takes precedence over Shelve commands. Default is false. For more information on shelving an alarm, see the description for the OperShelve parameter. |
OperUnshelve | BOOL | Set to true by the operator interface to unshelve the alarm. The alarm instruction clears this parameter to false. Takes precedence over Shelve commands. Default is cleared. For more information on shelving an alarm, see the description for the OperShelve parameter. |
ProgDisable | BOOL | Set to true by the user program to disable the alarm. Default is false. Ladder Diagram: Copied from the instruction operand. Structured Text: Copied from the instruction operand. |
OperDisable | BOOL | Set to true by the operator interface to disable the alarm. The alarm instruction clears this parameter to true. Default is false. |
ProgEnable | BOOL | Set to true by the user program to enable the alarm. Takes precedence over a Disable command. Default is false. Ladder Diagram: Copied from the instruction operand. Structured Text: Copied from the instruction operand. |
OperEnable | BOOL | Set to true by the operator interface to enable the alarm. Takes precedence over Disable command. The alarm instruction clears this parameter to false. Default is false. |
AlarmCountReset | BOOL | Set to true by the operator interface to reset the alarm count to zero. The alarm instruction clears this parameter to false. Default is false. |
UseProgTime | BOOL | Specifies whether to use the controller’s clock or the ProgTime value to timestamp alarm state change events. When set to true, the ProgTime value provides timestamp. When cleared to false, the controller’s clock provides timestamp. Default is false. |
ProgTime | LINT | If UseProgTime is set to true, this value is used to provide the timestamp value for all events. This lets the application apply timestamps obtained from the alarm source, such as a sequence-of-events input module. |
Severity | DINT | Severity of the alarm. This does not affect processing of alarms by the controller, but can be used for sorting and filtering functions at the alarm subscriber. Valid = 1...1000 (1000 = most severe; 1 = least severe). Default = 500. |
MinDurationPRE | DINT | Minimum duration preset (milliseconds) for the alarm condition to remain true before the alarm is marked as InAlarm and alarm notification is sent to clients. The controller collects alarm data as soon as the alarm condition is detected; so no data is lost while waiting to meet the minimum duration. Valid = 0...2147483647. Default = 0. |
ShelveDuration | DINT | Length of time in minutes to shelve an alarm. Shelving an alarm postpones alarm processing. It is like suppressing an alarm, except that shelving is time limited. If an alarm is acknowledged while it is shelved, it remains acknowledged even if it becomes active again. It becomes unacknowledged when the shelve duration ends (provided the alarm is still active at that time). Minimum time is one minute. Maximum time is defined by MaxShelveDuration. |
MaxShelveDuration | DINT | Maximum time duration in minutes for which an alarm can be shelved. For more information on shelving an alarm, see the description for the ShelveDuration parameter. |
Output Parameters
Output Parameter | Data Type | Description |
---|---|---|
EnableOut | BOOL | Enable output. |
InAlarm | BOOL | Alarm active status. Set to true when the alarm is active. Cleared to false when the alarm is not active (normal status). |
Acked | BOOL | Alarm acknowledged status. Set to true when the alarm is acknowledged. Cleared to false when the alarm is not acknowledged. Acked is always set to true when AckRequired is cleared to false. |
InAlarmUnack | BOOL | Combined alarm active and acknowledged status. Set to true when the alarm is active (InAlarm is true) and unacknowledged (Acked is false). Cleared to false when the alarm is inactive, acknowledged, or both. |
Suppressed | BOOL | Suppressed status of the alarm. Set to true when the alarm is suppressed. Cleared to falsewhen the alarm is not suppressed. |
Shelved | BOOL | Shelved status of the alarm. Set to true when alarm is shelved. Cleared to false when alarm is unshelved. Shelving an alarm postpones alarm processing. It is like suppressing an alarm, except that shelving is time limited. If an alarm is acknowledged while it is shelved, it remains acknowledged even if it becomes active again. It becomes unacknowledged when the shelve duration ends. |
Disabled | BOOL | Disabled status of the alarm. Set to true when the alarm is not enabled. Cleared to false when the alarm is enabled. |
Commissioned | BOOL | Commissioned status of the alarm. Set to true when the alarm is commissioned. Cleared to false when the alarm is decommissioned. Currently always set to true. |
MinDurationACC | DINT | Indicates the current accumulator value for the alarm’s MinDuration timer. This value is not used in versions 29 and later of the Logix Designer application. The value is always 0. |
AlarmCount | DINT | Number of times the alarm has been activated (InAlarm is set). If the maximum value is reached, the counter leaves the value at the maximum count value. |
InAlarmTime | LINT | Timestamp of alarm detection. |
AckTime | LINT | Timestamp of alarm acknowledgment. If the alarm does not require acknowledgment, this timestamp is equal to alarm time. |
RetToNormalTime | LINT | Timestamp of alarm returning to a normal state. |
AlarmCountResetTime | LINT | Timestamp indicating when the alarm count was reset. |
ShelveTime | LINT | Timestamp indicating when the alarm was shelved the last time. This value is set by controller when alarm is shelved. Alarm can be shelved and unshelved many times. Each time the alarm is shelved, the timestamp is set to the current time. For more information on shelving an alarm, see the description for the Shelved parameter. |
UnshelveTime | LIN | Timestamp indicating when the alarm is going to be unshelved. This value is set every time the alarm is shelved (even if the alarm has already been shelved). The timestamp is determined by adding the ShelveDuration to the current time. If the alarm is unshelved programmatically or by an operator, then the value is set to the current time. For more information on shelving an alarm see the description for the Shelved parameter. |
Status | DINT | Combined status indicators: Status.0 = InstructFault Status.1= InFaulted Status.2 = SeverityInv |
InstructFault (Status.0) | BOOL | Instruction error conditions exist. This is not a minor or major controller error. Check the remaining status bits to determine what occurred. |
InFaulted (Status.1) | BOOL | User program has set InFault to indicate bad quality input data. Alarm continues to evaluate In for alarm condition. |
SeverityInv (Status.2) | BOOL | Alarm severity configuration. If severity <1, the instruction uses Severity = 1. If severity >1000, the instruction uses Severity = 1000. |
Digital Alarms State Diagrams
Digital Alarm Timing Diagrams
ALMD Alarm Acknowledge Required and Latched
ALMD Alarm Acknowledge Required and Not Latched
ALMD Alarm Acknowledge Not Required and Latched
ALMD Alarm Acknowledge Not Required and Not Latched
Connect a button to the OperShelve tag
To prevent unwanted reshelving of the alarm, the alarm instruction only processes the OperShelve tag if it transitions from false to true between one program scan and the next. If an operator presses a push button to shelve the alarm while the ProgUnshelve tag is true, the alarm is not shelved because the ProgUnshelve tag takes precedence. However, because program scans complete in milliseconds, the operator may still be holding down the push button so that the OperShelve tag remains true over several program scans even though the ProgUnshelve tag has been cleared to false. This means that the alarm is not shelved.
To shelve the alarm, the operator can release and press the button again
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | EnableOut is cleared to false to false The InAlarm output is cleared to false The Shelved output is cleared to false The Acked ouput is set to true. All alarm conditions are acknowledged. All operator requests are cleared All timestamps are cleared |
Rung-condition-in is false | Rung is cleared to false. The In parameter is cleared to false The instruction executes. |
Rung-condition-in is true | Rung is set to true. The In parameter is set to true The instruction executes. |
Postscan | Rung bit is cleared to false. |
Function Block
Condition/State | Action Taken |
---|---|
Prescan | Tag.EnableOut is cleared to false. The InAlarm output is cleared to false The Shelved output is cleared to false The Acked ouput is set to true All operator requests are cleared All timestamps are cleared |
Tag.EnableIn is false | Tag.EnableOut is cleared to false |
Tag.EnableIn is true | The instruction executes Tag.EnableOut is set to true |
Instruction first run | N/A |
Instruction first scan | N/A |
Postscan | Tag.EnableOut is cleared to false. |
Structured Text
Condition/State | Action Taken |
---|---|
Prescan | See Prescan in the Ladder Diagram table. |
Normal Execution | See Rung-condition-in is true in the Ladder Diagram table. |
Postscan | See Postscan in the Ladder Diagram table. |
Example
Ladder Diagram
Function Block
Structured Text
An example of an ALMD instruction in Structured Text is shown below. In this example, two motor failure signals are combined such that if either one occurs, a motor fault alarm is activated. The Motor101Ack tag can be used to acknowledge the alarm.
Motor101FaultConditions := Motor101Overtemp OR Motor101FailToStart;
ALMD(Motor101Fault,Motor101FaultConditions,Motor101Ack,0,0,0 );
Provide Feedback