0:11
hello everyone welcome to automation
0:14
Community today in this video we are
0:18
going to discuss an example which will
0:20
be about security camera so let's look
0:23
at the example first security camera
0:26
recording When motion is detected a
0:29
camera should start recording and
0:31
continue for 25 seconds with that light
0:34
should also get turned on with an
0:38
interval of 2 seconds that means there
0:41
is a sensor which detects the presence
0:43
of someone which detects there is a
0:45
motion so when there is a motion when
0:48
motion is detected the camera gets on
0:51
and it starts recording for 25
0:54
seconds and with that the light will
0:57
blink with the interval of 2 seconds
1:00
that means light will turn on for 2
1:03
seconds then turn off for 2 second then
1:05
turn on for 2 seconds then turn off for
1:07
2 seconds and it will repeat this
1:09
process again and again so in this
1:13
example we will use normally open
1:15
contacts and normally close contact with
1:17
that we will be also using uh some
1:20
memory bits and we will also use some
1:22
timers like TP and t r so let's move to
1:26
TI portal where we will draw a ladder
1:28
diagram for this example this is the
1:30
interface of TI portal version 16
1:33
firstly we need to go to PLC tags and
1:36
then double click on default tag table
1:38
so here we will add our inputs and
1:41
outputs so the first input is the sensor
1:43
which detects the presence of the motion
1:46
or the presence of someone it detects
1:50
the motion and then we have two outputs
1:56
camera so it is an output so it's
2:02
0.0 and then we have one more output
2:05
that is the light that may be a
2:08
bub and then after that we'll go to
2:11
program blocks and then main
2:16
ob1 so here we will draw the ladder
2:19
diagram I will zoom into it and then I
2:21
will add a normally open contact and
2:24
then a coil this normally open contact
2:27
will be for the sensor that detect the
2:30
motion and then this output is a
2:36
camera and then this camera should start
2:39
recording for 25 seconds for that we
2:42
will use a timer operation that is
2:48
TP and the preset value for TP will be
2:54
seconds and then I will insert a
2:57
normally open contact in network 2
3:03
and I will use this normally open
3:05
contact as camera so it
3:10
will so the camera represents an input
3:13
so if camera turns on that is for 25
3:17
second then the current will flow
3:18
through through this for 25 seconds and
3:23
then in that interval when a camera is
3:26
on also the Light will turn
3:28
on so the light will turn on but it
3:33
remains on for only 2 seconds so for
3:35
this we'll use a timer that is a TP and
3:39
this TP the preset value for this will
3:42
seconds and then this light should get
3:46
off for 2 seconds then again remain off
3:49
for 2 seconds and then again on for 2
3:52
seconds so for that I will open the
3:55
branch here add a coil and this coil
3:58
will be a memory at say m
4:03
0.0 and this m 0.0 should get on after
4:08
every 2 seconds so the preset value for
4:11
will be 2 seconds and then we will use a
4:14
normally close contact here for
4:18
light and then we will use one more
4:21
normally open Clos contact here as M
4:25
0.0 so this ladder diagram will make the
4:29
the light for on for 2 seconds then off
4:32
for 2 seconds and again on for 2 seconds
4:35
again and again so for that period of
4:38
time when the camera is on so it will
4:41
blink for an inter for 25 seconds in
4:44
total 2 seconds on 2 seconds off so now
4:47
let's move to uh simulation here
5:09
finish after that I will start
5:16
monitoring before that I will start the
5:19
CPU here and then start monitoring and
5:23
then I will switch to the project view
5:30
let's create a new project here
6:01
then I will go to simulation tables and
6:04
then simulation table
6:06
one so here we need to right click here
6:09
and then click on load project tags so
6:12
here all are all the tags so we need
6:16
to give it the motion by activating the
6:20
sensor so when it gets activated the
6:23
camera gets on and it starts recording
6:26
for 25 seconds and in those 25 seconds
6:29
and light gets on for 2 seconds off for
6:32
2 seconds then again on for 2 seconds
6:37
seconds so for 25 seconds camera remains
6:41
on and also light blinks but after 25
6:44
seconds both get stopped so the light
6:47
got stopped and with that this camera
6:49
also got stopped it stopped recording
6:53
and it recorded for 25 seconds when
6:57
sensor was activated it was all all
6:59
about this example thank you for