Fareed Mohmed← Project library

Engineering · PLC · Project 9 of 15 · Signals and alarms · Level 1

Flasher (blinking lamp)

Two timers feed each other to blink a warning lamp. Used in nearly every alarm program.

▶ Run it in the simulator

Virtual machine for Flasher (blinking lamp): buttons, lamps and the process it controls
Learning model only. This page teaches the program logic. A real machine needs a proper control panel with an isolator, fuses, motor protection and a hard-wired emergency stop. Mains and motor wiring is for qualified electricians. A PLC output never drives a motor directly.

You will learn

T1 counts the OFF time. When it finishes the lamp turns on and T2 starts. When T2 finishes it breaks the T1 rung, which resets both timers, and the pattern repeats. Many PLCs also have a built-in clock bit that does this for you.

How it works

  • Flip Flasher ON. The beacon blinks about once a second.
  • Flip it off. The timers reset and the lamp stays off.

In real life

Alarm beacons, fault indicators, battery-low lamps.

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.

NameWhat it isTypeSiemens
S7-1200
Allen-Bradley
CompactLogix
Mitsubishi
iQ-F FX5U
Delta
DVP / AS
Omron
CP2E
Schneider
M241
Inovance
H5U
ENABLEFlasher enable switchInput%I0.0Local:1:I.Data.0X0X00.00%IX0.0X0
BEACONWarning beaconOutput%Q0.0Local:2:O.Data.0Y0Y0100.00%QX0.0Y0

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.

Rung 1 OFF time (0.5 s)ENABLE%I0.0Timer 2 done"T2".Q"T1"TONINPT T#500msQETET = 500 msRung 2 ON time (0.5 s)Timer 1 done"T1".Q"T2"TONINPT T#500msQETET = 320 msRung 3 Beacon follows the first timerTimer 1 done"T1".QBEACON%Q0.0

Structured text, Siemens SCL

(* Siemens S7-1200, CPU 1214C DC/DC/DC - TIA Portal - SCL *)
(* Rung 1: OFF time (0.5 s) *)
"T1"(IN := "ENABLE" AND NOT "T2".Q, PT := T#500ms);
(* Rung 2: ON time (0.5 s) *)
"T2"(IN := "T1".Q, PT := T#500ms);
(* Rung 3: Beacon follows the first timer *)
"BEACON" := "T1".Q;

Structured text, Allen-Bradley

(* Allen-Bradley CompactLogix 5069 (L306ER) - Studio 5000 Logix Designer - Structured Text *)
(* Rung 1: OFF time (0.5 s) *)
Timer1.PRE := 500;   (* ms *)
Timer1.TimerEnable := ENABLE AND NOT Timer2.DN;
TONR(Timer1);
(* Rung 2: ON time (0.5 s) *)
Timer2.PRE := 500;   (* ms *)
Timer2.TimerEnable := Timer1.DN;
TONR(Timer2);
(* Rung 3: Beacon follows the first timer *)
BEACON := Timer1.DN;

Try this

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.

#ItemBuy / compare
1PLCAmazon.in · IndiaMART · Robu.in
2Beacon or lampAmazon.in · IndiaMART · Robu.in
← 8. Traffic lightAll projects10. Part counter with batch stop →

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.