Simple PLC Exercise Parking Garage
0 views
Aug 12, 2025
Simple PLC exercise: build a parking garage control in TIA Portal—count spots, light FULL, block barrier, buzz on vacancy, lift gate for 5s. Siemens PLC COurse: https://learn.automationcommunity.com/courses/siemens-logo-plc-programming-course/ Tags: PLC, Siemens, TIA Portal, S7-1200, S7-1500, ladder logic, SCL, parking garage, parking lot, occupancy counter, up-down counter, full indicator, barrier control, gate motor, buzzer, timer TON, 5s timer, digital inputs, outputs, sensors, IR sensor, limit switch, HMI, WinCC, alarms, interlocks, debouncing, simulation, PLCSIM, tutorial, exercise, example, project, IEC 61131-3, function block, FB, UDT, state machine, commissioning, I/O mapping, scaling, 24VDC, wiring, test plan, SR latch, TOF, CTU
View Video Transcript
0:11
hello everyone welcome to automation
0:13
Community today in this video we are
0:17
going to discuss an example which will
0:19
be about parking garage indicator so
0:22
let's look at the example
0:24
first parking garage indicator when all
0:28
parking spots are occupied a full
0:30
indicator should turn on and also
0:32
barriers should not lift if the parking
0:35
spot is vacant then buzzer will turn on
0:38
and barrier will be lifted for 5 seconds
0:41
that means Suppose there are four
0:45
parking spots and all are filled that
0:48
means all sensors are activated then a
0:50
full indicator will turn on and if
0:54
another uh car comes then the barrier
0:57
should not lift if there is any parking
1:00
spot vacant that means if any sensor is
1:02
not activated then the buzzer will turn
1:05
on and barrier will be lifted for 5
1:08
seconds and the full indicator should
1:10
not turn on so for this example we will
1:13
use normally open contacts as well as
1:15
normally close contacts with that we
1:18
will be also using timers like TP so
1:21
let's move to TI portal where we will
1:24
draw a ladder diagram for this
1:26
example this is the interface of di
1:29
portal
1:30
firstly we need to go to PLC
1:33
tags then default tag table so here we
1:38
need to add our inputs and outputs so
1:42
the first input will be sensor
1:50
one then we have Sensor 2 sensor 3 and
1:53
Center sensor 4 so we have four parking
1:57
spots and there are four sensors
2:00
and then we have some outputs like
2:04
full
2:06
indicator so this is an output so it
2:10
address will be like Q 0.0 and then we
2:13
have one more output that is the
2:16
barrier and it address will be Q 0.1
2:19
after that we will go to program blocks
2:23
and then main
2:25
ob1 so here we will be drawing ladder
2:28
diagram for this example
2:30
so firstly we'll insert normally open
2:33
contacts for the four sensor so this
2:36
will be sensor
2:39
1 this will be Sensor
2:43
2 and this will be sensor sorry this
2:47
will be sensor uh
2:52
two and then this will be sensor Force
2:56
when all the sensors are activated then
2:58
the full indicator will turn on so this
3:01
will be full
3:04
indicator and after
3:09
that when full indicator is off so this
3:13
is full indicator when it is off
3:17
and there will be one more
3:20
sensor at the entrance of this garage so
3:24
for that we will add that input
3:28
as entrance
3:32
sensor so this uh its address will be I
3:43
0.4 so here we'll use a normally open
3:47
contact for this entrance sensor that
3:52
means when the full indicator is off the
3:55
full indicator will be off when there
3:57
will be any sensor deactivator that
4:00
means there will be any vant spot and
4:03
there is a vehicle at the entrance then
4:05
the barrier should
4:07
lift then barrier should turn on and
4:13
then with that the buzzer should also
4:17
turn on so I will open the branch add a
4:19
coil so this will be
4:25
buzzer so we need to add
4:30
in the PLC
4:35
tags
4:37
Bowser as it is an output so it address
4:40
will be Q
4:42
0.2 I will minimize
4:45
this so this will be
4:48
buzzer so the buzzer should run for 5
4:53
seconds the buzzer and barrier both
4:56
should turn on for 5 seconds so for that
4:59
we will uh use a timer operation here
5:02
and that will be
5:05
TP and the preset value will be 5
5:10
seconds so as you can see here when
5:13
there is no vacant spot left so these
5:15
sensors will all be activated and the
5:18
full indicator will turn on and if the
5:20
full indicator is not turned
5:23
on that means when there is any vacant
5:26
spot in the garage then the full
5:28
indicator will not turn on and when it
5:31
is off the current will flow through it
5:33
and when there is a vehicle at the
5:35
entrance then sensor gets activated and
5:37
the barrier gets activated that it lifts
5:41
for 5 seconds and with that the buzzer
5:43
will also turn on for 5 seconds so now I
5:46
will start the simulation here
6:02
after that I will click on
6:05
load and then
6:07
finish after that I will start the CPU
6:11
here and then I will start monitoring
6:15
after that I will switch to project
6:25
view let's create a new project here
6:28
click on create
6:59
I like expand the options and then go to
7:01
simulation tables and simulation table
7:04
one so here I will right click and then
7:08
click on load project tags so these are
7:10
the project tags so as you can see
7:20
here so if the if there is no sensor
7:24
activated
7:26
here so the full indicator will not turn
7:29
on and then if a if a uh car arrives at
7:34
the entrance then the entrance sensor
7:37
gets activated and when the sensor uh uh
7:41
entrance sensor gets activated the
7:42
barrier will lift and also bazer turns
7:44
on for 5 seconds you can see
7:47
here the barrier and the buzzer turns on
7:50
for 5
7:52
seconds and then the the car uh gets
7:57
into the garage and take the spot wagon
8:00
spot so its sensor gets activated so
8:03
sensor one got activated and then comes
8:06
another the sensor to gets activated
8:09
then another then another so all the
8:12
vacant spots are not vacant
8:15
now there is no vacant spot in the
8:18
garage so there will be a full indicator
8:21
turned on and then the full indicator is
8:24
on the current will not flow through
8:26
this as a result the barrier and buzzer
8:28
will not on when a uh when a when a car
8:33
comes at the entrance so when that
8:36
sensor gets activate the barrier will
8:38
not lift and the buzzer will also not
8:40
turn on so there should be a
8:43
vacant spot there so if sensor one is
8:46
not activated as you can see here when
8:49
sensor one is not activated that means
8:52
there is a vant sport the full indicator
8:54
will not turn on and the full indicator
8:57
will not turn on will allow the current
8:59
to flow through this as a result when a
9:02
car uh comes at the entrance the sensor
9:05
gets activated and the barrier gets
9:07
lifted and the buzzer turns on for 5
9:10
seconds and then barrier goes down and
9:12
also Buzzard turns off it was all about
9:15
this example thank you for watching
9:18
[Music]