Each alarm gets a bit (Alm_MPCB_Trip) that is SET when the fault condition is TRUE and RESET only when the operator presses Reset and the condition has cleared. Feedback faults use a timer, for example command ON but no contactor feedback for 2 s. Any active alarm stops the motor command, lights the reset lamp and is packed into an alarm word for the HMI.
- Latch alarms: a fault that clears by itself must still be seen and reset
- Reset only clears alarms whose condition has gone
- Use delays for feedback faults to avoid nuisance trips
- First-out tells you what tripped first when many alarms appear together
Without latching, a loose wire that drops the motor for 50 ms leaves no trace. With latching, the machine stops, the reset lamp lights and the alarm text tells the operator exactly which device to check.
Step 1: Write the Alarm List
| Bit | Alarm tag | Condition | Delay | Action | HMI text |
|---|---|---|---|---|---|
| 0 | Alm_EStop | NOT DI_EStop_OK | 0 s | Stop all | Emergency stop pressed or safety relay off |
| 1 | Alm_MPCB_Trip | NOT DI_MPCB_OK | 0 s | Stop motor | Conveyor motor MPCB tripped (Q1) |
| 2 | Alm_Contactor_FB | Cmd_Motor_Run AND NOT DI_Contactor_FB | 2 s | Stop motor | Contactor K1 did not pull in |
| 3 | Alm_Contactor_Stuck | NOT Cmd_Motor_Run AND DI_Contactor_FB | 2 s | Stop motor | Contactor K1 did not drop out |
| 4 | Alm_Selector | Auto AND Manual, or neither | 0.5 s | Block start | Mode selector fault |
| 5 | Alm_Jam | Conveying > 10 s without exit sensor | 10 s | Stop sequence | Part jam between entry and exit (Lab 17) |
| 6 | Alm_VFD_Fault | ACS580 status word fault bit | 0 s | Stop motor | ACS580 drive fault (Lab 20) |
| 7 | Alm_VFD_Comm | Modbus error for > 1 s | 1 s | Stop motor | Drive communication lost (Lab 20) |
Step 2: Latch and Reset in Ladder
Alarm latching simulator
Trip the MPCB and set it back: the alarm stays until Reset. Turn on the motor command with no contactor feedback and wait 2 s. Press E-stop and watch the first-out.
Green contact = passing power. Orange moving wire = rung is true and the output is energised.
The alarm bits are set in one network and reset in another. Because the reset network also requires the condition to be healthy, holding Reset while the MPCB is still tripped does nothing.
Step 3: First-out and the Alarm Word
(* pack alarm bits into one word for the HMI *)
HMI_Alarm_Word.0 := Alm_EStop;
HMI_Alarm_Word.1 := Alm_MPCB_Trip;
HMI_Alarm_Word.2 := Alm_Contactor_FB;
HMI_Alarm_Word.3 := Alm_Contactor_Stuck;
Any_Alarm := HMI_Alarm_Word <> 0;
(* first-out: remember the first alarm bit that came on *)
IF NOT Any_Alarm THEN
First_Out := 0;
ELSIF First_Out = 0 THEN
IF Alm_EStop THEN First_Out := 1;
ELSIF Alm_MPCB_Trip THEN First_Out := 2;
ELSIF Alm_Contactor_FB THEN First_Out := 3;
END_IF;
END_IF;Split alarms into faults (stop the machine, need reset) and warnings (inform only, clear by themselves). Use two words so the HMI can colour them differently.
Step 4: Connect Alarms to the Machine
- In Motor_Logic, add NOT
Any_Motor_Alarmin series with every motor command. - Reset lamp =
Any_Alarm; flash it when a new alarm is unacknowledged (Lab 14). - Import HMI_Alarm_Word into the CP604 as a discrete alarm group with the texts from Step 1.
- Log alarm time stamps in the HMI, not in the PLC.
| ID | Check | How to check | Pass criterion | Result |
|---|---|---|---|---|
| Alarm tests | ||||
| A-01 | MPCB | Trip and reset the MPCB | Alarm stays until Reset pressed | |
| A-02 | Reset blocked | Hold Reset with MPCB still tripped | Alarm stays | |
| A-03 | Contactor FB | Remove feedback wire with motor isolated, command ON | Alarm after 2 s, motor command off | |
| A-04 | First-out | E-stop then MPCB | First_Out = 1 | |
| A-05 | HMI word | Monitor HMI_Alarm_Word | Bits match active alarms | |
Practice Exercise
Add Alm_Selector (bit 4) with a 0.5 s TON and make it block a start in both modes. Add the alarm text to your HMI alarm list.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Alarm resets by itself | Coil used instead of SET | Use SET in one network and RESET in another |
| Reset does nothing | Condition still active or reset rung order | Check the healthy contact in the reset rung |
| Nuisance contactor alarms | Delay too short | Use 1–2 s depending on contactor size |
| HMI alarm shows wrong text | Bit numbering mismatch | Align HMI alarm bit numbers with the word map |
Frequently asked questions
How do I latch an alarm in ABB PLC ladder logic?
Use a SET coil driven by the fault condition and a RESET coil driven by Reset AND the condition healthy, in separate networks.
What is a first-out alarm?
The first alarm that became active in a trip event. It is captured when no alarm was active, so the root cause is not hidden by the alarms that follow.
Why use a timer for feedback alarms?
A contactor takes tens of milliseconds to pull in. A short delay avoids false alarms while still detecting a real failure quickly.
How do I show PLC alarms on an ABB HMI?
Pack alarm bits into a word and configure the HMI alarm list on that word, one text per bit.