Engineering · PLC · Project 13 of 15 · Signals and alarms · Level 3
Alarm with acknowledge
A fault flashes a lamp and sounds a horn. Pressing ACK silences the horn; the lamp stays steady until the fault clears.

You will learn
The standard alarm states: normal, alarm (unacknowledged), acknowledged and back to normal. Edge detection (the P contact) makes the alarm start once when the fault appears, not on every scan.
How it works
- Flip Process fault on. The lamp flashes and the horn sounds.
- Press ACK. The horn stops and the lamp goes steady.
- Flip the fault off. The lamp turns off and the alarm clears.
In real life
Every control room, boiler house and building management system.
Inputs, outputs and addresses
The same signals on seven PLC brands. Inputs and outputs are numbered in order; check your own hardware and software, because addresses depend on the model and module position.
| Name | What it is | Type | Siemens S7-1200 | Allen-Bradley CompactLogix | Mitsubishi iQ-F FX5U | Delta DVP / AS | Omron CP2E | Schneider M241 | Inovance H5U |
|---|---|---|---|---|---|---|---|---|---|
| FAULT | Fault contact (ON = fault) | Input | %I0.0 | Local:1:I.Data.0 | X0 | X0 | 0.00 | %IX0.0 | X0 |
| ACK | ACK push-button | Input | %I0.1 | Local:1:I.Data.1 | X1 | X1 | 0.01 | %IX0.1 | X1 |
| LAMP | Alarm lamp | Output | %Q0.0 | Local:2:O.Data.0 | Y0 | Y0 | 100.00 | %QX0.0 | Y0 |
| HORN | Horn | Output | %Q0.1 | Local:2:O.Data.1 | Y1 | Y1 | 100.01 | %QX0.1 | Y1 |
Ladder diagram (shown for Siemens, live state)
Green wires carry power in the moment captured below. Switch the brand and the language in the simulator.
Structured text, Siemens SCL
(* Siemens S7-1200, CPU 1214C DC/DC/DC - TIA Portal - SCL *)
(* Rung 1: Alarm starts on the rising edge of the fault *)
IF "FAULT" THEN "ALM" := TRUE; END_IF;
(* Rung 2: Acknowledge *)
IF "ACK" AND "ALM" THEN "ACKED" := TRUE; END_IF;
(* Rung 3: Clear when the fault is gone and acknowledged *)
IF NOT "FAULT" AND "ACKED" THEN "ALM" := FALSE; END_IF;
IF NOT "FAULT" AND "ACKED" THEN "ACKED" := FALSE; END_IF;
(* Rung 4: Flasher off time *)
"T1"(IN := "ALM" AND NOT "ACKED" AND NOT "T2".Q, PT := T#400ms);
(* Rung 5: Flasher on time *)
"T2"(IN := "T1".Q, PT := T#400ms);
(* Rung 6: Horn until acknowledged *)
"HORN" := "ALM" AND NOT "ACKED";
(* Rung 7: Lamp flashes, then steady *)
"LAMP" := "ALM" AND ("ACKED" OR "T1".Q);Structured text, Allen-Bradley
(* Allen-Bradley CompactLogix 5069 (L306ER) - Studio 5000 Logix Designer - Structured Text *)
(* Rung 1: Alarm starts on the rising edge of the fault *)
IF FAULT THEN ALM := TRUE; END_IF;
(* Rung 2: Acknowledge *)
IF ACK AND ALM THEN ACKED := TRUE; END_IF;
(* Rung 3: Clear when the fault is gone and acknowledged *)
IF NOT FAULT AND ACKED THEN ALM := FALSE; END_IF;
IF NOT FAULT AND ACKED THEN ACKED := FALSE; END_IF;
(* Rung 4: Flasher off time *)
Timer1.PRE := 400; (* ms *)
Timer1.TimerEnable := ALM AND NOT ACKED AND NOT Timer2.DN;
TONR(Timer1);
(* Rung 5: Flasher on time *)
Timer2.PRE := 400; (* ms *)
Timer2.TimerEnable := Timer1.DN;
TONR(Timer2);
(* Rung 6: Horn until acknowledged *)
HORN := ALM AND NOT ACKED;
(* Rung 7: Lamp flashes, then steady *)
LAMP := ALM AND (ACKED OR Timer1.DN);Try this
- Clear the fault before acknowledging. The alarm stays until ACK.
- Switch brands to see how each one writes the edge contact.
Parts to buy
The links open a search on each store, so you see what is in stock today. Check the model, voltage and price before you order.
This is a learning tool. It teaches the logic, not the exact keystrokes of each vendor’s software. Check the manual of your own PLC.