Siemens LOGO PLC Example: Light Control Exercise
Oct 1, 2025
Hands-on Siemens LOGO PLC example—build a light-control circuit with wiring, FBD logic, timers, step-by-step demo. Tags: Siemens LOGO PLC, LOGO! 8, LOGO Soft Comfort, Siemens PLC tutorial, light control exercise, lamp control, switch and push button, digital input DI, digital output DO, relay output, wiring diagram, ladder logic, function block diagram FBD, TON timer, TOF timer, SR latch, memory bit, interlocking, debounce, start stop circuit, I/O mapping, PLC programming example, beginner PLC project, home automation, industrial automation, commissioning test, troubleshooting guide, practical PLC training, step by step tutorial, electrical control circuit, PLC simulation
View Video Transcript
0:07
hello everyone myself
0:10
badas in this video I will discuss one
0:15
simple PLC example which is light
0:20
control
0:22
application here we have to create a PLC
0:27
program to control
0:31
lamp
0:32
automatically based on light sensor
0:37
signal let's Suppose there is a light
0:41
sensor you can take LD or light
0:45
dependent
0:47
resistor this sensor changes its
0:50
resistance
0:52
value based on the light intensity for
0:56
example sunlight intensity
1:00
so our
1:02
program is to turn on or off the lamp
1:09
based on this sensor
1:12
signal also we have one main
1:18
switch so this switch must be in on
1:21
state then only our
1:25
program will activate our program will
1:28
run otherwise
1:30
PLC will not turn on the lamp this is
1:35
very simple and basic
1:38
example so first go to your PLC
1:42
software before that just identify the
1:46
inputs and outputs if you see this main
1:50
switch this is digital
1:53
input and this light sensor this is
1:56
analog
1:58
input and lamp this is our digital
2:02
output clear now go to your
2:06
software and take one digital
2:10
input and I will take I3 you can take
2:14
any
2:15
input and I will give the command this
2:18
is my main
2:27
switch okay next next I will take analog
2:34
input and this is our light
2:48
sensor next I will take analog threshold
2:52
trigger block so go to analog category
2:56
and select analog threshold trigger
3:01
give the
3:04
comment
3:06
analog
3:08
threshold
3:11
trigger
3:20
okay okay and connect this light sensor
3:24
to this
3:28
block now I will take one basic function
3:32
which is end gate so what is our main
3:37
objective we have to turn on the lamp
3:40
only when the main switch is in on
3:44
state for that purpose I will use one
3:48
end logic
3:50
gate so cannot the main switch to this
3:53
end gate and this analog threshold
3:57
trigger output to this end gate
4:01
and take one digital
4:04
output and connect to this endgate
4:08
output and this is our
4:19
lamp now if you see this is the main our
4:24
complete program and one important thing
4:27
we have to do is we have to set a
4:30
defined range such that the lamp will
4:34
turn on or turn off based on that range
4:40
that range we have to set in analog
4:42
threshold trigger here we have to Define
4:45
one
4:46
value based on
4:48
that we are generating one digital
4:51
output that we are using in this end
4:54
block okay so go to properties
4:59
if you see the default range is 0 to
5:03
th000 in logo PLC the default range will
5:08
always change based on your
5:11
PLC type remember
5:14
that I'm using the same 0 to th000
5:17
default range you can change this range
5:20
as per your sensor using gain and offset
5:24
here I'm using the same ranges so I'm
5:27
not
5:28
changing so
5:30
what I'm assuming is when the light
5:33
sensor signal is in between 0 to
5:37
400 there is no sunlight okay the
5:41
sunlight is gradually
5:44
decreasing so 0 to 400 as there is no
5:48
sunlight
5:49
or there is no proper sunlight I want
5:53
the lamp in on state that is why in on
5:56
state I will enter zero and in off State
5:59
I will enter
6:00
400 so 0 to
6:03
400 I want the lamp is in on state the
6:06
lamp is in on state means there is no
6:11
sunlight next when the sensor range
6:15
value sensor value is 400
6:18
to, I want the lamp in off state that
6:22
means there is proper sunlight available
6:25
you can change this 400 value as per
6:28
your requirement M let's suppose you can
6:32
change to 500 300 like that also as per
6:36
your required sunlight
6:39
intensity remember that this range or
6:42
values purely depends on your
6:47
sensor
6:49
characteristics and sensor design
6:52
circuit
6:54
design these values will change as per
6:57
your sensor circuit
7:00
so in Practical you have to test your
7:04
circuit
7:07
and enter the values here accordingly
7:11
Okay click
7:13
okay now open the PLC
7:17
Hardware now I will give the
7:21
download so go to tools transfer PC to
7:25
logo
7:29
if you don't have the PLC Hardware with
7:32
you no
7:34
problem just simulate the program and
7:39
test
7:42
the logic
7:52
okay now I will go to
7:55
online in this course I will give you
8:00
any
8:01
assignments simple PLC
8:04
problems solve those
8:07
problems so that you will
8:11
get good
8:14
experience and
8:17
skills now if you see the light sensor
8:21
value is some
8:23
990
8:25
990 okay that means outside
8:30
sunlight is there okay that is why the
8:34
lamp is in on
8:35
state so first we have to turn on the
8:38
main switch then only this complete
8:41
program will
8:43
work first I will turn on the input I3
8:46
see
8:48
here now the input I3 is in on state it
8:51
is in red color
8:55
okay let's suppose the sunlight is
8:58
gradually
9:03
decreasing see it is gradually
9:06
decreasing
9:08
whenever it reaches
9:11
400
9:13
then this analog threshold trigger block
9:16
will generate one digital output that
9:19
output will go to end
9:21
gate as all inputs are in on state at
9:25
that time output will be on see
9:34
whenever it reaches 400 or less than
9:39
400 the analog threshold trigger block
9:42
generates one digital
9:45
output based on the outset
9:49
value as endgate receives all inputs in
9:53
on
9:55
state endgate generates one
9:57
output again lamp will be turned on
10:00
based on the
10:02
output so this is the simple
10:06
program based on the light sensor we are
10:09
generating one digital
10:11
output and the digital output we're
10:14
using in end block simple very
10:18
simple
10:27
see I mean just to
10:29
adjusting the potential meter with my
10:33
hands in real time you can replace this
10:36
potential meter with your sensor
10:43
circuit let's suppose in this case the
10:46
value is
10:48
262 light sensor is giving the signal to
10:52
the end block lamp is in on state now I
10:56
will turn off the main switch
10:59
this complete program is disabled or in
11:02
simple terms endgate input is disabled
11:06
endgate input is in off
11:09
State such that the lamp will never turn
11:12
on
11:15
again it requires both main switch and
11:19
light sensor
11:23
feedback okay now I will give you one
11:26
simple assignment for to you
11:30
just modify this existing program you
11:35
take one more digital input one more
11:39
switch use that switch to turn on the
11:46
lamp Okay when the switch is in on state
11:49
the lamp must be on state irr of these
11:53
main switch and light sensor
11:57
okay and the third switch is is in off
12:00
State the lamp must follow as per the
12:04
existing
12:06
program okay just use one digital input
12:10
you can call it as bypass switch okay
12:14
and you can use some other blocks also
12:16
complete the
12:18
program do not change existing behavior
12:21
of the program that means main switch
12:23
and light sensor this will be the same
12:25
you have to add one more switch and some
12:27
other blocks and the lamp must be on
12:31
state respect of
12:34
these signal okay I hope you understand
12:37
the problem share with us how you
12:41
implemented this
12:45
modification through our comment
12:48
section thank you I will meet you in the
12:50
next video