PLC Tutorials

PLC Programming Example on LED Control

Study the PLC programming example on LED control using the ladder logic diagram and learn the program description.

This PLC example is for engineering students who are interested in learning and practicing the PLC exercises. The real-time industrial PLC programs will be provided with more safety features.

PLC Programming LED Control

Design a PLC ladder logic for the following application.

We are using three toggle Switches to control three LED’s

  • If Toggle Switch 1 and Toggle Switch 2 are ON, then LED 1 and LED 2 will be ON.
  • If Toggle Switch 2 and Toggle Switch 3 are ON, then LED 2 will be OFF, and LED 3 will be ON.

Digital Inputs

The required inputs are listed below.

Toggle Switch 1: I0.0

Toggle Switch 2: I0.1

Toggle Switch 2: I0.1

Here we call these toogle switches as simple “Switch” in our next discussions, But remember these are toggle-type switches.

Digital Inputs

The required outputs are listed below.

LED 1: Q0.0

LED 2: Q0.1

LED 3: Q0.2

Ladder Diagram for LED Control

Ladder Diagram for LED Control

PLC Program Description

  • For this application, we used EcoStruxure Machine Expert Basic v1.2 software for programming.
  • In the above program, we have used Normally Open Contacts for Switch 1 (I0.0), Switch 2(I0.1), and Switch 3 (I0.2). We have also used Normally Closed Contact for Switch 3 (I0.2).
  • Switch 1 and Switch 2, present in Rung0 are connected in series for LED 1 and LED 2, thus implementing AND logic gate.
  • With Switch 1 and Switch 2, Switch 3 is connected to LED 3 as Normally Closed Contact.
  • For LED 3, Switch 2 and Switch 3 present in Rung1 are connected in series, thus implementing the AND logic gate.
  • For LED 1 to be ON, Switch 1 and Switch 2 should be ON.
  • When Switch 1 and Switch 2 are turned ON and Switch 3 is OFF, then LED 2 will be ON.
  • When Switch 2 and Switch 3 are ON, LED 3 will be ON.
  • Turning ON Switch 3 will turn OFF LED 2.

When Switch 1 and Switch 2 are ON

In Rung0, the signal through Switch 1 and Switch 2 when turned ON.

As a result, LED 1 and LED 3 will turn ON. Switch 3 is used as a Normally Closed Contact for Switch 3 when in a false state, it will allow the signal to turn ON LED 2.

When Switch 2 and Switch 3 are ON

The signal through Switch 2 and Switch 3 in Rung1, that turns ON LED 3.

In Rung0, switch 3 is taken as Normally Closed Contact, when in the true state, it will not allow signal to pass through it. As a result, LED 2 will turn OFF. Switch 3 is connected to LED 1 and therefore, it will remain ON.

PLC Tutorial Video

You can also watch the tutorial video below for this LED control PLC example program.

If you liked this article, then please subscribe to our YouTube Channel for PLC and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

You've successfully subscribed !
Share

Recent Articles

  • Common

Control of Pneumatic Cylinder and Motor

This article is about controlling the Pneumatic cylinder and Pneumatic motor in the assembly line…

6 days ago
  • PLC Tutorials

Network Switch Requirement in SCADA and DCS Architecture

In this post, we will learn the basic requirements for a network switch to be…

4 days ago
  • PLC Tutorials

PLC Panel and MCC Panel Interface Signals

The PLC panel and MCC panel interface signals are start, stop, run feedback, trip, local…

6 days ago
  • PLC Tutorials

Shutter Door Control using Motor and Limit Switches

 In this article, we are going to discuss about shutter door control using induction motor…

1 week ago
  • Electrical Basics

Electrical Drives – Modes, Types, Speed Control Applications

Electrical Drives control the motion of electric motors. Motion control is required in industrial and…

1 week ago
  • PLC Tutorials

PLC Ladder Logic Design: Control 3 Motors with Toggle Switch

PLC ladder logic design to control 3 motors with toggle switch and explain the program…

3 weeks ago