The parking lights PLC program is designed for home automation to control the lights based on sensor input with video explanation.
Note: This PLC logic is designed for learners to practice the ladder logics to improve their skills.
Parking Lights
Problem Statement:
Design a PLC ladder logic for the following application.
We are using one Button, one toggle Switch, and one sensor to control Lights, Exit Light, and Parking Light.
When the Lights are turned OFF in a building, an Exit Door Light remains ON for 15 seconds.
After that, the Parking Lot Lights get ON until the car gets out of the parking.
PLC Program Explained with Video
This PLC program video explains the parking lights logic with basics.
Inputs and Outputs
Digital Inputs:
Start Button: I0.0
Light OFF: I0.1
Sensor: I0.2
Digital Outputs:
Light 1: Q0.0
Light 2: Q0.1
Light 3: Q0.2
Light 4: Q0.3
Exit Light: Q0.4
Parking Light: Q0.5
Ladder Logic
Program Description
We have used Normally Open Contacts for the Start Button (I0.0, Lights OFF (I0.1), and Memory Bit (M0).
We have used Normally Closed Contacts for Exit Light (Q0.4) and Sensor (I0.2).
In Rung 0:
- Normally Open Contact is used for the Start Button (I0.0) to Turn ON Memory Bit (M0).
- Memory Bit (M0) is latched so that when the Start Button (I0.0) turns OFF, Memory Bit (M0) still remains ON.
In Rung 1:
- Normally Open Contacts are used for Memory Bit (M0) and Lights OFF (I0.1) to Turn OFF the outputs Light 1 (Q0.0), Light 2 (Q0.1), Light 3 (Q0.2), Light 4 (Q0.3).
- Normally Open Contacts are used for Memory Bit (M0) and Lights OFF (I0.1) to Turn ON the output Exit Light (Q0.4)
- Timer Function Block type TP is used to turn ON the output Exit Light (Q0.4) for a limited time.
In Rung 2:
- Normally Open Contacts are used for Memory Bit (M0) and Lights OFF (I0.1) to Turn ON the output Parking Light (Q0.4).
- Normally Closed Contacts are used for the Exit Light (Q0.4) and Sensor (I0.2) to Turn ON the output Parking Light (Q0.4)
Simulation Results
We simulate the PLC program and discuss the results. We may show the partial logic instead of the complete code.
Rung 0:
When the Start Button (I0.0) is pressed and released, Memory Bit (M0) turns ON and stores the data that the Start Button (I0.0) is pressed the first time as Memory bits store the data.
Memory Bit (M0) is latched so that when the Start Button (I0.0) is released, Memory Bit (M0) still remains ON.
Rung 1:
When Memory Bit (M0) turns ON in Rung0, Normally Open Contact used for Memory Bit (M0) in Rung1 will be in True State and will pass the signal through it.
When Light OFF Switch (I0.1) is turned ON, the outputs Light 1 (Q0.0), Light 2 (Q0.1), Light 3 (Q0.2) and Light 4 (Q0.3) will turn OFF as Negated Coils are used for the outputs Light 1 (Q0.0), Light 2 (Q0.1), Light 3 (Q0.2) and Light 4 (Q0.3).
Also, when Memory Bit (M0) and Light OFF switch (I0.1) are turned ON, the output Exit Light (Q0.4) will turn ON ( immediately after Lights turn OFF in the building) but the output Exit Light (Q0.4) will turn OFF after some time as timer Function Block type TP is used to turn ON the output Exit Light (Q0.4) for a limited time.
The time is set to 15 seconds. After 15 seconds, the output Exit Light (Q0.4) will turn OFF (Exit Door Light turns OFF).
Rung 2:
When Memory Bit (M0) turns ON, Light OFF switch (I0.1) is turned ON (Lights turns OFF in building), Exit Light (Q0.4) turns OFF (Exit door light turns OFF) and Sensor (I0.2) gets deactivated (Car gets out of parking), the output Parking Light (Q0.5) turns ON ( Parking lot lights gets ON).
If you liked this article, 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.
Read Next:
- Complex PLC Programming Examples
- Traffic Lights PLC Program using Timers
- PLC Programming for Trash Compactor
- Playground Swing PLC Logic Programming
- PLC Programming for the Pump to fill the tank