Hello friends, welcome to the automation community
Today, in this video, we are going to discuss an example on security camera recording
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
With that, light should also get on within interval of 2 seconds
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
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
turn on for 2 seconds and turn off for 2 seconds and it will repeat this for 25 seconds
So, in this example, we will use normally open contacts as well as normally closed contacts
We will also use memory bits and with that, we will also use timers like TP, that is pulse
timer and we will be also using on-delay timer, that is TR
So, let's move to EcoStruxure Machine Expert, where we will draw a ladder icon for security
camera recording. We will open EcoStruxure Machine Expert Basic. Firstly, I will keep read prediction as inactive and write prediction as inactive
That is because loading the application from the controller is unrestricted and downloading
an application to the controller or modifying the application in the controller is unrestricted
So, if we keep it active, then we need to set a password here and also for our protection
if I keep it active, then we have to set password here
Then uploading the application from the controller will be restricted and also downloading an
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
So, for now, I will keep it inactive for all the cases and then I will click on apply
After that, I will go to configuration tab. So, here we have to configure a device
We have to select a logic controller. Here is a list of different logic controllers for different configurations
I will be using 2M 221 M16R. I will click on it and then drag it to here
You have to replace 2M 221 M16R by 2M 221 C24R. You may lose a feature in associated configuration
So, I want to replace it by 2M 221 C24R, so I will click on yes
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
and 100 to 240 volt AC power supply controller with removable terminal blocks
After that, I can also go to serial line, where I will select protocol as TMS2DDG and
then I will click on apply. After that, I will go to programming tab
So, here I will be dragging laser diagram for security camera recording
So, I will click on this option for a full screen mode and then go into it like this
So, firstly I will insert a normal open contact and I will assign address data as I0.0
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
I will also assign symbol data as camera. Yes. So, when sensor gets activated, camera starts recording and it will record for 25 seconds
For this, I will use a timer here and that should be pulse timer, that is TP
I will change time base to 1 second and visit value as 25 and then click on apply
So, camera will start recording for 25 seconds and also with that, we will insert one more
and I will assign address data as M0 which is a memory bit
So, I will connect it like this. That means camera and M0 will be through for 25 seconds
Then I will add a new round and here I will insert a normal open contact and I will assign
address data as M0 and then I will insert a coil here and I will assign address to the
coil as Q0.1. I will also add symbol data as light
Yes. So, when M0 gets activated, light will be on
So, M0 will be activated for 25 seconds and also light will be on for 25 seconds
But the light should blink, that is the light should be on for 2 seconds and then off for
2 seconds. Then again on for 2 seconds, then again off for 2 seconds and it should repeat this process
for 25 seconds only. After that, camera and light both should turn off
So, for this, I will use a timer TP that will move the light on for 2 seconds
So, I will insert a function timer here and I will change it to TP, that is pulse timer
I will change time base to 1 second and basic value as 2 and then click on apply
And then I will insert one more coil here and I will assign address to this coil as
M1, which is a memory bit and we will use this memory bit to turn off, to turn on the
light again after 2 seconds. So, to do this, I will use one more type here and that should be TR
I will change time base to 1 second and basic value as 2 and then click on apply
Then I will connect it like this. Then I will use this battery bit here as normally closed current
And I will assign address as M1 and here we will use this light as normally closed current
to 0.1. So, when sensor gets activated, that is when the motion is detected by the sensor, camera
will start recording for 25 seconds and also M0 gets activated for 25 seconds
So, when M0 gets activated, the current will flow through it and light will turn on for
2 seconds. And after 2 seconds, that is when light gets turned off, the current will flow through
it and after 2 seconds, M1 gets on. And as a result, the light will again turn on for 2 seconds
Now in exit full screen mode, I will compile the program. And I will go to commissioning and launch simulator
Then I will start controller. To do so, click OK. I will go to programming tab and click on full screen mode
So, when the motion is detected, that is sensor gets activated, camera gets on for 25 seconds
and in those 25 seconds, light will blink with an interval of 2 seconds
1, 2, off, 1, 2, on, 1, 2, off, 1, 2
And it will repeat this for 25 seconds. After 25 seconds, camera as well as light will turn off
It was all about this example. Thank you for watching. you