WEBVTT

00:00.000 --> 00:15.280
Hello friends, welcome to the automation community

00:15.280 --> 00:24.080
Today, in this video, we are going to discuss
an example on security camera recording

00:24.080 --> 00:39.440
So, let's look at the example first. Security camera recording. When motion
is detected, a camera should start recording and continue for 25 seconds

00:39.440 --> 00:45.560
With that, light should also get
on within interval of 2 seconds

00:45.560 --> 00:59.720
So, the motion will be detected by a sensor. So, when a sensor
detects any motion, the camera will start recording and it will record

00:59.720 --> 01:15.560
it for 25 seconds. And during that time, light should blink. That is, the
light will turn on for 2 seconds, then turn off for 2 seconds and then again

01:15.560 --> 01:23.320
turn on for 2 seconds and turn off for 2
seconds and it will repeat this for 25 seconds

01:23.320 --> 01:32.000
So, in this example, we will use normally open
contacts as well as normally closed contacts

01:32.000 --> 01:41.800
We will also use memory bits and with that, we
will also use timers like TP, that is pulse

01:41.800 --> 01:47.080
timer and we will be also using
on-delay timer, that is TR

01:47.080 --> 01:55.039
So, let's move to EcoStruxure Machine Expert,
where we will draw a ladder icon for security

01:55.039 --> 02:19.680
camera recording. We will open EcoStruxure Machine Expert Basic. Firstly,
I will keep read prediction as inactive and write prediction as inactive

02:19.680 --> 02:26.120
That is because loading the application from
the controller is unrestricted and downloading

02:26.120 --> 02:33.120
an application to the controller or modifying
the application in the controller is unrestricted

02:33.120 --> 02:42.040
So, if we keep it active, then we need to set
a password here and also for our protection

02:42.040 --> 02:46.200
if I keep it active, then we
have to set password here

02:46.200 --> 02:51.640
Then uploading the application from the controller
will be restricted and also downloading an

02:51.640 --> 03:05.239
application and modifying the application in the controller will be restricted. That means
we have to put the password during uploading, downloading and modifying the application

03:05.239 --> 03:17.959
So, for now, I will keep it inactive for
all the cases and then I will click on apply

03:17.959 --> 03:26.080
After that, I will go to configuration tab.
So, here we have to configure a device

03:26.080 --> 03:34.440
We have to select a logic controller. Here is a list of
different logic controllers for different configurations

03:34.440 --> 03:44.040
I will be using 2M 221 M16R. I will
click on it and then drag it to here

03:44.040 --> 03:54.280
You have to replace 2M 221 M16R by 2M 221 C24R.
You may lose a feature in associated configuration

03:54.280 --> 04:00.280
So, I want to replace it by 2M
221 C24R, so I will click on yes

04:00.280 --> 04:12.880
So, here is a device description about 2M 221 C24R. That is it has 14
digital inputs, 10 relay outputs, 2 analog inputs, 1 serial line port

04:12.880 --> 04:22.159
and 100 to 240 volt AC power supply
controller with removable terminal blocks

04:22.159 --> 04:32.000
After that, I can also go to serial line,
where I will select protocol as TMS2DDG and

04:32.000 --> 04:42.680
then I will click on apply. After
that, I will go to programming tab

04:43.480 --> 04:48.480
So, here I will be dragging laser
diagram for security camera recording

04:48.480 --> 04:54.480
So, I will click on this option for a full
screen mode and then go into it like this

04:54.480 --> 05:04.480
So, firstly I will insert a normal open
contact and I will assign address data as I0.0

05:04.480 --> 05:20.280
I will also assign symbol data as census. Yes. And then I will
insert a coil here and I will assign address data as Q0.0

05:20.280 --> 05:35.280
I will also assign symbol data as camera. Yes. So, when sensor gets
activated, camera starts recording and it will record for 25 seconds

05:36.080 --> 05:43.080
For this, I will use a timer here and
that should be pulse timer, that is TP

05:43.080 --> 05:53.080
I will change time base to 1 second and
visit value as 25 and then click on apply

05:53.080 --> 06:02.080
So, camera will start recording for 25 seconds
and also with that, we will insert one more

06:02.880 --> 06:07.880
and I will assign address data
as M0 which is a memory bit

06:07.880 --> 06:18.880
So, I will connect it like this. That means
camera and M0 will be through for 25 seconds

06:18.880 --> 06:29.880
Then I will add a new round and here I will
insert a normal open contact and I will assign

06:30.680 --> 06:44.680
address data as M0 and then I will insert a
coil here and I will assign address to the

06:44.680 --> 06:56.680
coil as Q0.1. I will also
add symbol data as light

06:57.480 --> 07:10.480
Yes. So, when M0 gets
activated, light will be on

07:10.480 --> 07:20.480
So, M0 will be activated for 25 seconds
and also light will be on for 25 seconds

07:21.280 --> 07:29.280
But the light should blink, that is the light
should be on for 2 seconds and then off for

07:29.280 --> 07:37.280
2 seconds. Then again on for 2 seconds, then again
off for 2 seconds and it should repeat this process

07:37.280 --> 07:45.280
for 25 seconds only. After that,
camera and light both should turn off

07:46.080 --> 07:55.080
So, for this, I will use a timer TP that
will move the light on for 2 seconds

07:55.080 --> 08:07.080
So, I will insert a function timer here and
I will change it to TP, that is pulse timer

08:07.880 --> 08:20.880
I will change time base to 1 second and
basic value as 2 and then click on apply

08:21.680 --> 08:38.679
And then I will insert one more coil here
and I will assign address to this coil as

08:38.679 --> 08:49.680
M1, which is a memory bit and we will use
this memory bit to turn off, to turn on the

08:50.479 --> 09:03.479
light again after 2 seconds. So, to do this, I
will use one more type here and that should be TR

09:07.479 --> 09:16.479
I will change time base to 1 second and
basic value as 2 and then click on apply

09:20.479 --> 09:53.280
Then I will connect it like this. Then I will use
this battery bit here as normally closed current

09:54.280 --> 10:07.280
And I will assign address as M1 and here we
will use this light as normally closed current

10:13.280 --> 10:26.079
to 0.1. So, when sensor gets activated, that is
when the motion is detected by the sensor, camera

10:26.079 --> 10:33.079
will start recording for 25 seconds and
also M0 gets activated for 25 seconds

10:33.079 --> 10:41.079
So, when M0 gets activated, the current will
flow through it and light will turn on for

10:41.079 --> 10:49.880
2 seconds. And after 2 seconds, that is when light
gets turned off, the current will flow through

10:49.880 --> 11:02.880
it and after 2 seconds, M1 gets on. And as a
result, the light will again turn on for 2 seconds

11:03.880 --> 11:15.880
Now in exit full screen mode, I will compile the program.
And I will go to commissioning and launch simulator

11:28.880 --> 11:36.880
Then I will start controller. To do so, click OK. I will
go to programming tab and click on full screen mode

11:37.680 --> 11:46.680
So, when the motion is detected, that is sensor
gets activated, camera gets on for 25 seconds

11:46.680 --> 11:51.680
and in those 25 seconds, light will
blink with an interval of 2 seconds

11:53.680 --> 12:03.680
1, 2, off, 1, 2,
on, 1, 2, off, 1, 2

12:04.479 --> 12:12.479
And it will repeat this for 25 seconds. After 25
seconds, camera as well as light will turn off

12:19.479 --> 12:34.479
It was all about this example.
Thank you for watching. you
