Runtime Test Cases Input
C5:0.ACC
PS1 goes Low to High
Incremented by 1
PS2 goes Low to High
Decremented by 1
Comparator
Output
Source A(C5:0.ACC) < Source B (120)
Green=ON, Red=OFF
Source A(C5:0.ACC) = Source B (120)
Green=OFF, Red=ON
Source A(C5:0.ACC) ≥ Source B (120)
C5:0.DN bit goes true.
PLC Program for a Car Parking System
This is a PLC Program for a Car Parking System.
Problem Description A parking plot has total capacity of Cars. Number of empty spots are displayed on the display outside the
Parking Plot and which spots are available is to be indicated by LEDs. Implement this in PLC using
Ladder Diagram programming language.
Problem Solution
Counter is used to count the number of empty spots.
Proximity Sensors or IR Sensors are used to detect the presence of car.
Here in this system IR Sensor can be well installed to make this system cost efficient since Proximity
Sensors are costly than IR Sensors.
Value of counter is displayed on the display which is mounted outside the parking plot.
This counter value is converted into decimal.
Display arrangement PLC Program Here is PLC program for a Car Parking System, along with program explanation and run time test cases.
List of Inputs and Outputs
I:1/0 to I:1/4 = IR Sensor to detect the presence of cars (Inputs)
O:2/0 to O:2/4 = LEDs to indicate presence of car spots (Outputs)
C5:0
= To increment when Car exits
(Counter Up)
C5:0
= To decrement when Car enters
(Counter Down)
O:6
= Display address
(Output)