Learn TIA Portal PLC Programming in 2.5 Hours

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to another training session of the TR portal in today's session we will see how we can simulate the S7 1200 PLC using the TR portal software and the PLC Sim software so first of all we will open the Tia portal software we will create a new project in it and we can give it any name we will give it a simulator [Music] and next we will create the project now the project is created next we will click on the PLC programming add new device and we will select our S7 1200 plc we will select this cpu1214 one thing I want to mention here is that please select the CPU which is having the version above four so this CPU has a version of 4.2 once the PLC is added into our project click on this project view button next we will expand this PLC folder we will go to the device configuration and here if we click on this CPU and open its properties tab [Music] and click on this profinet interface here you will find its ethernet address and by default the ethernet address is 192.168.0.1 we can change this IP address if we want but for today's project we will keep it as it is and next if we click on this IO tags here you will find the inputs and output addresses the input addresses are starting from I 0.0 and the output addresses are starting from Q 0.0 next we will go to the program blocks and we will double click on this ob1 ob1 is the organization block number one and it is by default added into the PLC program next we will drag and drop this normal open contact we can assign this normal open contact and the input address we will assign it I 0.0 next we will insert a coil here and we will assign it Q 0.0 so this is our input and this is our output whenever this I 0.0 input is high it will turn on our output to 0.0 we can rename this input as push button PB and here we can rename this output Q 0.0 as output next thing is we want to simulate this program so we will click on this PLC folder and click on this start simulation it will start our PLC Simulator for S7 1200 plc now the PLC simulator is started which look like this and we will load the program into this simulator and we will start the CPU and click on the Finish button now we will go online with our program and now we will try to monitor this ladder the next thing we want to do here is that we will click on this button and it will open a complete setup for this simulator okay now this window is open up we will click on this new project button and next we will create a new project in this PLC simulator okay now our new project is created we will expand this symbol tables and we will open this symbol table Rumble one and if I reduce the size of these windows to see the ladder logic next we have to add the symbols of this ladder logic into this simulator so to do this simply we will click on this name and we will write BB and this simulator will automatically detect the symbols of this program so we will click on this push button and this PLC simulator software automatically detect this push button connection at I 0.0 input same way we will search for this output tag and we will click here Android output and as you can see both of our tags are added into our simulator and next thing we will reduce the size of this and next thing I want to do here is that I want to turn on this push button I 0.0 so to do this we will click here on this button and as you can see that this bit is now high this input is now high and it has turned on or output Q 0.0 and our PLC simulator also shows the result and if I turn off this input I 0.0 or output Q 0.0 also turns off so this is how we can simulate the program of the S7 1200 PLC using the PLC Sim 4.0 simulator if you want to download this Simulator the link is in the description box you can download this software from this link so that's all for now if you like this video do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to the first session of the Tia portal training in today's session we are going to discuss how we can create a simple project in the TR portal but before starting as always I would really like you guys to please subscribe to my channel and press the Bell icon to get notification for the upcoming new tutorials regarding Diya portal training we are covering basic intermediate and advanced level programming in the Tia portal in these sessions so don't forget to press the Bell icon to get the notification for the upcoming video tutorials first of all we will open the TR portal by double clicking on this Dia portal icon so this new windows open up here so first of all we will click on the create new project and here we can give this project any names we can put it as first session basic and next we will just click on the create button so it will create a new project next we will add a PLC in our project so we will click in this tab PLC programming and here we have to create a new device so we will click here and it will open another window so here we have all of our controllers CPU so from these plcs we can select anyone so for today's tutorial we will open this S7 300 CPUs and we will select 314-2dp and here we will select this first one and click ok so now our PLC is added into our project next we will click on this project view tab so it will take us to the project View Window here most of the work we will do and we will expand this devices and networks we can click on it and here we can see our CPU is added on our project and next thing which we want to do is here is that we will expand it here and we will select this device configuration we will double click on it our PLC is added onto our PLC rack and we will click on it or the CPU and we will click on this properties and here all the properties are mentioned we can change these as per or requirement and if we click here in this tab IO tags and in this window it is showing all the inputs and outputs of these CPU this includes the analog inputs analog outputs digital inputs and digital outputs here you can see that our digital inputs are starting from i124.0 and it goes all the way up to 126.7 and the digital outputs are starting from q1 24.0 all the way up to 125.7 so total of 16 digital outputs so now we know that our digital inputs and digital outputs addresses so next thing we want to do is to do some programming in this CPU so to make a program we will go to the program blocks we will expand this folder and double click on this ob1 which is organization block 1 which is a main block it is by default added into any CPU we can open this one and here you can see that already there is a network one and we can make a ladder logic in this network and we can change the programming for this block from here and it can be a ladder function black diagram and STL so for today we will select a letter diagram so first of all we will insert a no contact I 124.0 which is our first digital input and we can change the tag name as first input and as you can see that the tag name has been changed and next we will add a coil output coil and we can write its address as Q 124.0 which is our first digital output and we can rename it tag as so we have created a simple ladder here whenever our first digital input is on it should turn on the q124.0 which is our first digital output so whenever this input is on it should turn on this output coil so next thing which we want to do here is that we want to simulate our program so to run a simulator we have to click here we will click here to start the simulation and our PLC simulator is started and first of all we will change its interface from TCP IP to MPI so our program will be uploaded into this simulator through the MPI pass so we will start to search the CPU and as you can see that it has detected our simulator so we'll just click on this load button it will start to compile and check and and check for any errors in the program if everything is okay and now you can see that our program is ready to load we will just click on the road button and the program is loaded into this simulator now we will run this simulator and the next thing which I want to do here is that we will go online to this simulator to check what's happening so we'll go online by clicking on this online button and we will monitor or ladder logic by clicking on this icon as you can see that everything is running fine there's no error in our CPU everything is green and here we can select our output byte which is 124 and input byte which is also 124. so this is our first digital input which is i124.0 now if I turn on this one it should energize or turn on this output which is 2 124.0 here so we will activate our input I 124.0 and as you can see that as soon as this input goes High it has turned on our first digital output q124.0 and here in the simulator it is also indicated that our few 124.0 bit is on so here is the first session on the Tia portal programming in this session we have learned how we can create a simple project in the Tia portal and how we can simulate this project using the PLC simulator in the next session we will see how we can use these instructions bit logic timers and counters math functions so slowly we will go through all these instructions in our upcoming sessions so to stay connected with us please subscribe to our Channel and press the Bell icon to get the notification whenever we upload the new videos regarding the Tia portal programming tutorials so till next time take care and goodbye today we have connected normal open green push button at the I 0.0 input and normal close red push button at I 0.1 input of the S7 1200 PLC as we know that the normal open push button have a normal open contact in it but in the PLC programming we can use the contact of this push button as a normal open or normal close contact as many times we want the normal open contact will remain open and normal close contact will remain closed but when we press the green push button the PLC input is 0.0 turns on and the normal open contact closes while the normal close contact gets opened up when we release the push button the PLC input I 0.0 turns off and the contacts in the PLC program goes back to their normal condition next as we know that the normal close push button have a normal close contact in it in PLC programming we can use the contact of this push button as a normal open or normal close contact as this red push button have a physical close contact in it the PLC input is 0.1 turns on that's why the normal open contact in the PLC program remains closed and the normal close contact remains open in the normal condition but when we press the red push button the PLC input is 0.1 turns off and the normal open contact in the PLC opens while the normal closed contact closes but when we release the push button the PRC input is 0.1 turns on again and the contacts of the I 0.1 input in the PLC program goes back to the normal condition welcome to the part 2 of the Tia portal training in today's session we are going to see how we can choose normal open and normal close contacts in the ladder logic programming but before starting I would really request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials one thing I want to clear here is that any discrete device sensor which we connect with our PLC inputs it can be represented in the ladder diagram as normal open or normal close contact these discrete input devices can be a emergency stop button push buttons limit switches or the proximity sensors Etc if we are using this normal open contact in our program for our discrete input like push button so normally this contact will be open as soon as we press our push button this contact will get closed and it will energize any coil which is connected at the end of this rung and if we are using this input as a normal close contact this contact will be normally closed and in normal condition because this contact is closed it will energize this coil and as soon as we turn on or push button this closed contact will get open up and it will turn off our output coil for our today's tutorial we have connected two push buttons at the two inputs I have 124.0 and I 124.1 inputs of the PLC and one output LED is connected at the q124.0 output of the plc so in this example we are going to see how we can use the normal open and normal close contacts to make a simple hold on logic so first of all we will delete all this and we will insert a normal open contact of I 124.0 which is our input push button start push button and we will assign this output coil as a q124.0 which is our output one so next we will start the simulator and load the program into this simulator once the program is uploaded into the PLC simulator we will go online with the PLC and start monitoring this simple ladder as you can see that this is the normal open contact and it is assigned the 124.0 or start push button address and as soon as we turn on this push button I want 24.0 it has energized or output q124.0 so as soon as we turn off our start push button this contact gets opened up and it has turned off or output q124.0 so this is a very straightforward and simple logic so next thing I want to do here is that I want to hold on or output q1 24.0 which means that if I only press this start push button once and release this push button the output q124.0 should gets latched on and it should remain on so for this one we will again go offline with the plc and we will insert another Branch here and we will insert a no contact and I'll connect this Branch here with the main rung and we will assign this no contact the address of our output and now this no contact is a contact of this coil q124.0 so whenever this output is energized this anode contact will also close so the logic here is very simple as soon as we press our start push button and it will energize or output to 124.0 but the same time or normal open contact of output q120 4.0 also get closed and through this contact this output remains on even if we release the start push button i1 24.0 next we will load this program into the PLC and let's see what happens now as I turn on this I 124.0 it has turned on or q1 24.0 output coil and its contact is also closed because we have assigned the same address to this normal open contact and from here this output q124.0 is lashed down and if we release our push button I want 24.0 this output Still Remains on and the next thing is that we cannot turn off our output q124.0 Now to turn off our output we have to use our NC contact here next again we will go offline and insert a normal close contact here and we can assign this as I want 24.1 which is our stop push button so this push button is normally closed next we will load this ladder logic into the PLC again turn off or plc refresh it load the program into the PLC run the PLC go online with the plc now you can see that as soon as I turn on again the push button I want 24.0 it has lagged on or output Q 124.0 through this normal open contact and even if I turn off this push button start push button I 24.0 this output is still lashed on now to turn off this one we have to trigger this input i124.1 by pressing the stop push button once so what it will do is that it will open up this MC contact so once this NC contact normal close contact is opened it will break the logic path from here and it will turn off or output q124.0 so let's so let's push the stop push button once as you can see that for a moment this Top push button gets opened up and it breaks the path and as the logic path breaks it has turned off our output q124.0 so this is how we can use the normal open and normal close contacts to make Logics into the PLC program in third session we are going to learn the rising Edge and the falling Edge and together in the third session we are going to learn how we can make a simple program to make a logic for small filling machine box filling machine using normal open normal closed contacts and rising and falling Edge so that's the end of the today's session do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye in the network number one we have connected the two input parallel to turn on the output Q 0.0 in the network number two we have connected input 3 and input 4 in parallel to turn on the same output Q 0.0 now we have the same output coil Q 0.0 in the network number one and network number two let's upload the program in the PLC simulator let's turn on the PLC input size 0.0 and I 0.1 and the online monitoring shows that the output Q 0.0 turns on but the output of the PLC simulator Q 0.0 is not turned on this is because we have used the same output coil address in the two different networks to avoid this programming error we must use the output coil in the only one network we will go offline and delete the network number 2 and in Z2 normal open contacts in parallel now if we activate any of these in inputs Q 0.0 should turn on let's upload the program in the PLC now the program is working properly and output is turning on if we turn on any of these four inputs in today's session we are going to learn how we can detect a rising and falling edge of an input first we will drag and drop scan positive Edge instruction on the ladder this instruction has two inputs here we will write the beta transfer which we want to detect the rising Edge in our case we want to detect the rising edge of the I 0.0 input of the PLC the second input of the instruction we will write the bitm 0.0 now this instruction will store the current state of the input I 0.0 in the bitm 0.0 and start comparing I 0.0 input and bit M 0.0 and whenever the input is 0.0 goes high this instruction detects a rising Edge and its normal open contact closes for one PLC scan cycle we can confirm the detection of the rising Edge by holding on the output Q 0.0 whenever the contact of this instruction closes in today's session we are going to discuss how we can detect the falling edge of an input first of all we will drag and drop the scan Negative Edge detection instruction on the ladder this instruction has two inputs here we will write the bit address for which we want to detect the falling Edge in our case we want to detect the falling edge of the I 0.0 input of the PLC the second input of the instruction we will write the bit M 0.1 this instruction will store the current state of the input I 0.0 in the bit M 0.1 and start comparing the input I 0.0 input and bit M 0.1 and whenever the input is 0.0 goes low this instruction detects of falling Edge and its normal open contact closes for the one plcc can we can confirm the detection of the falling Edge by holding on the output Q 0.1 whenever the contact of this instruction closes welcome to the session number 3.3 of the Tia portal training in this session we are going to learn how we can make a small program for the Box filler machine before starting I would like you guys to please subscribe to my channel I press the Bell icon for more upcoming video tutorials today we have a box filler machine to program this machine starts the process with the start push button I 0.6 and stops with the push button are 0.7 it has a conveyor to transport the Box this converts runs with a PLC output Q 0.0 box presents at The Filling Station is confirmed by the Box sensor I 0.0 once the box is at The Filling Station The Filling valve choose 0.1 opens and start feeling the liquid in the box once the box is filled the fill level is confirmed by the level sensor as 0.1 The Filling wall closes and conveys Stars again to remove the filled box and bring in the next empty box under the filling nozzle so that's the setup for the today's tutorial let's go to the Tia portal software and see that for the today's tutorial now let's see the program for the today's session in the network number one we have a start logic so we have a start push button I 0.6 so whenever we press the start push button it should turn on the M 0.0 auto start bit and we can turn off this m 0.0 auto start bit by pressing a 0.7 star push button in the network number two we have a logic to start and stop the conveyor so first of all we will insert the auto start bit M 0.0 so whenever the M 0.0 start bit is on it should turn on the conveyor Q 0.0 and this convey should only stop om the box is present under The Filling Station confirmed by the Box sensor as 0.0 so you can see that we have used the normal closed contact so whenever the Box comes Under The Filling Station or the filling nozzle it sends by the sensor are 0.0 and this normal close contact will open up and it will stop our conveyor Q 0.0 in the network number three we have a logic to open and close the fill wall so first of all we will insert the auto start bit M 0.0 and when the box is present in front of the sensor are 0.0 and on the rising edge of this sensor are 0.0 it should latch on or fill valve q0.1 and it will start pouring liquid into our box and once the fill level is achieved it is confirmed by this level Center i0.1 we have used the normal close contact so once the field level is achieved this normal close contact will open up and it will turn off the output Q 0.1 for the fill valve and fill wall will be closed in the network number four we have the logic to start the conveyor after the box is failed so we have auto start bit M 0.0 and once this level sensor turns on confirms that the box is filled it should turn on this bit M 2.0 box is failed and we have insert its normal open contact in parallel to this one so it will latch on the bit M 2.0 and we will insert this bit in parallel with this box sensor in this network number two so what it will do it will start our conveyor once again to remove the feed box from the station as you can see that this m 2.0 bit is latched on so once the Box cleared the sensor are 0.0 this this bit will be opened up and it will unlatch this m 0.2 boxes failed bit as now the box has moved away from the sensor I 0.0 box sensor this normal close contact will be again closed and it will keeps running or conveyor motor Q 0.0 so this is the logic for the today's project we will upload this project into the PLC and let's see how does it works as soon as we press the start push button I 0.6 it hold down the auto start bitm 0.0 in the network one and this auto start with M 0.0 turns on the conveyor motor Q 0.0 and box starts to move towards The Filling Station as the Box comes in front of the sensor I 0.0 on the rising Edge its hold on the filling well few 0.1 in the network 3 and liquid starts filling Inside the Box through the nozzle as the liquid reaches the fill level the level sensor is 0.1 turns on and normal close contact of the level sensor I 0.1 unlatch The Filling valve q0.1 and stops the filling as the level sensor is 0.1 turns on it also holds on the M 0.2 bit in the network 4. to indicate the feed box this bit M 2.0 turns on the convert Q 0.0 in the network one to move the Box forward and exit the conveyor the conveyor 0.0 keeps on running and bring the M3 box under the filling nozzle and the whole cycle repeat itself that's the end of the today's video tutorial I hope you liked today's video do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials welcome to the session number four of the Gia portal in today's session we will learn how we can make a program to open and close the shutter door using the set and reset instructions in the Tia portal before starting as always I would like you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials let's see the setup for the today's tutorial first of all we have a motor which moves in the forward direction to open the shutter door with the PLC output Q 0.0 this same motor runs in the reverse direction to close the shutter door with the PLC output Q 0.1 next we have a panel of three buttons we have a button to open the shutter door which is connected to the PLC input I 0.0 we have a red stop push button to stop the shutter movement at any place this red stop push button is connected to the PLC input I 0.1 next we have a button to close the shutter door this button is connected at I 0.2 input of the PLC next we have installed two sensor to detect the fully open and fully closed position of the shutter door when the shutter door reaches the down limit sensor the down limit sensor at 0.4 turns on and when the shutter is fully open the up limit sensor is 0.3 turns on next we will open the Tia portal software and see how we can make a program for this shutter door using set and reset commands first of all in the network number one we have the logic to set on the shutter open command so to open the shutter we have to first insert a normal open contact of the push button I 0.0 which is our open button so whenever we press the open button it should set on or output Q 0.0 to set on our output we will use this command set output so we will drag and drop this command onto the ladder logic and here we will mention Q 0.0 so the logic is simple whenever we press the open button I 0.0 it will set on our output Q 0.0 and the shutter will start to open in the network number two we will write the logic to reset this command so we need to reset this output Q 0.0 once the shutter is fully open as we have discussed earlier when the shutter is fully open the sensor is 0.3 is on so we will insert here I 0.3 sensor which is up limit sensor and we will reset the output Q 0.0 using this sensor so we will insert a reset command here and we will insert Q 0.0 so whenever we press this open Button which is I 0.0 it will set on or Open Shutter command which is Q 0.0 and which Shader will start to open and once it is fully open we can detect it by a 0.3 this sensor will be turned on and this contact will be closed and it will reset Q 0.0 output and the shutter motor will stop at the fully open position and next thing we want to do here is that we want to stop this shutter at any position it can be fully open close or or it can be a partially open so to do this we will insert a contact in the parallel which is I 0.1 which is our stop push button so whenever we press the stop push button it will also reset or output Q 0.0 and shutter will be stopped there in the network number three we want to make a logic to close the Shader so first of all we will insert our shutter close command here which is I 0.2 which is our push button so it is a closed push button whenever we press this close push button we have to set on the close command so our close command is Q 0.1 now whenever we press this button it will set on this close gate command Q 0.1 and our shutter will start to close we will better rename this take as shutter so everything will be similar and in the network number four we will reset our output Q 0.1 so we want to reset this output Q 0.1 once the shutter is fully closed and we can get a signal when the shutter is fully closed from the sensor I 0.4 so it is also down limit sensor so when the shutter is fully closed this down sensor at 0.4 is on and it we can use this sensor to reset or output Q 0.1 so we will mention here Q 0.1 and next thing I want to do here is that I want to stop this shutter at any moment while closing as well so we will insert a branch here we will insert a stop push button which is I 0.1 and we will link it here as you can see that when we press the button I 0.2 it should set on or close 0.1 output and the shutter should start closing once the shutter is fully closed I 0 0.4 sensor will be turned on and it will reset or output Q 0.1 and it will stop the shutter motor there and while closing we can stop the shutter at any position by pressing stop push button so this is the logic for the today's tutorial and we will upload this logic into the PLC and let's see how does it works as you can see that right now the shutter is fully closed and we want to open this shutter so we will press the open Button which is a 0.0 and as you can see that now the shutter command is set on and it should stay on even if I release this push button I 0.0 and the shuttle will start to open and once the shutter is fully open this up limit sensor I 0.3 will be turned on and reset or output Q 0.0 and as you can see that now the output Q 0.0 is turned off and the shutter motor stops at the fully open position one thing I want to mention here is that the reset command has a priority over the set command this means that if this reset command is on now even if I press this open push button I 0.0 it will not turn on or Q 0.0 output if you can see here on the simulator as well even if I press the I 0.0 push button it will not turn on or output Q 0.0 now the shutter is fully open we will now try to close this shutter for the closing we have the network number three and four as you can see that when I press the I 0.2 push button it has set on our output Q 0.1 and the shutter starts to close slowly and as soon as this shutter reaches the down limit sensor I 0.4 it has reset or output Q 0.1 and the shutter motor stops at the fully closed position and next thing I want to test here is that let's imagine a condition that we want to stop the motor shutter motor at the mid position so to do this we will go to the network number one and two and here we will press our open push button and it will set on our output Q 0.0 and the Shader has started opening and at any position if I press the stop push button I 0.1 it has reset or output Q 0.0 and the shutter motor stops at that position so this is how we can make a logic to open and close the shutter I hope you liked today's session do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye or welcome to another training session on TIA portal this is the second part of the shutter programming video tutorial Series in the previous part we have learned how we can make a simple program to open and close the shutter door using set and reset instructions in the second part we will learn how we can use the timers in the Tia portal project let's suppose if someone opened this shutter door and forget to close it now we have to write the program in such a way that if someone forgets to close the shutter door and there is no one standing in the door or inside the room the shutter door should close automatically after 30 seconds to measure the 30 seconds we need to insert a timer in the ladder logic program let's see the setup for the today's video tutorial it is same as the previous part 1. except we have installed a safety sense by 0.5 in the door to detect any person inside the room or in the door now let's see the program for the today's tutorial the logic is same as the previous session now we have to insert a timer in this logic in such a way that if we don't close the door for the 30 seconds the door should close automatically we will go to the network number five and insert a normal close contact of the sensor I 0.4 the down limit sensor after that we will insert normal close contact of the safety sensor I 0.5 next we will insert an on delay timer we can give it a preset value of 30 seconds so now if the shutter is not fully closed and this normal close contact of the down limit sensor I 0.4 is closed and there is nobody in front of the sensor I 0.5 this will start the timer T1 and after 30 seconds the timer will turn on the bit m60.0 this bit will indicate that the 30 seconds are passed we can insert this bit m60.0 parallel to the close button is 0.2 in the network number three once this bit m60.0 is on it will set on the output Q 0.1 which is closed shutter command and the shutter starts to close in the network number four Once the shutter is fully closed and reaches the down limit sensor I 0.4 it will reset Q 0.1 shutter close command next we will upload the project into the PLC and see how does it works as you can see that as soon as we turn on the open push button I 0.0 it will turn on the Q 0.0 Open Shutter command and shutter starts to open as soon as the shutter reaches the up limit sensor I 0.3 it will reset the output Q 0.0 and shutter motor stops at fully open position now if we open the network number 3 and network number five in the network number five the down limit sensor is 0.4 contact is closed as the shutter is at the up limit right now next there is nobody in the room or in the door so the safety sensor contact I 0.5 is also closed this starts the T1 timer for 30 seconds and once the timer is over it will turn on the bit m60.0 this bit and 60.0 sat on the shutter close command Q 0.1 in the network 3 and the shutter starts to close down once the shutter is fully closed it is sensed by the down limit sensor I 0.4 which turn off or reset the closed shutter command in the network number four so this is how we can use on delay timer in the ladder logic that's the end of the today's session I hope you like it do share like And subscribe to my channel and don't forget to press the Bell icon for more upcoming video tutorials till next time take care and goodbye or welcome to another training session of the TR portal in today's session we will learn how we can program a PLC in the letter logic to control the numeric cylinder using the 5x3 with soul Knight wall we will see how we can make the logic to stop the Slender at three different positions fully redirected or home position mid position and fully extended or end position before going further in today's tutorial if you like our videos please make sure to press the Subscribe button and press the Bell icon in this way you will never miss our videos let's see the setup for the today's tutorial we have three push buttons connected to the PLC inputs I 0.5 I 0.6 and I 0.7 these push buttons will give signal to move cylinder to home mid and end position next we have a five by three way solenoid wire to move the cylinder shaft in reverse and forward Direction this wall has two coils the coil for the forward movement is connected at Q 0.0 output of the PLC and the coil for the reverse cylinder movement is connected at Q 0.1 output of the PLC next we have three read switches connected at the cylinder body to detect the cylinder shaft position these read switches are connected to I 0.0 I 0.1 and I 0.2 inputs of the plc now the task is there if we press the mid position push button the cylinder should move to the mid position when we press the end position push button the cylinder should extend fully up to the end position and when we press the home push button the cylinder should retract fully up to Home position now let's go to the Tia portal software and see the letter logic as you can see that in the network number one we have a logic to make request to go to the home position in the network number two we have a logic to make a request to go to the mid position in the network number three we have written the logic to make requests for the end position in the network number one when we press the home position push button I 0.7 and cylinder piston is not at the home position read switch I 0.2 it will hold on the request bit home M 0.0 in the network number two if we press the mid position push button I 0.6 And the cylinder position is not at the mid position rate switch I 0.1 it will hold on the request bit mid position M 0.1 in the network number three if we press the end position button I 0.5 and cylinder piston is not at the end position read switch I 0.0 it will hold on the request bit and position M 0.2 in network number four if the request to home M 0.0 bit turns on and the cylinder piston is not at the home position sensor are 0.2 it will latch on the cylinder reverse command q0.1 through its own normal open contact to turn on the reverse coil this way the cylinder will move towards the home position read switch as soon as the cylinder piston reached the home position sensor I 0.2 this normal close contact will unlatch the reverse command Q 0.1 next if the request for the mid position M 0.1 bit turns on and cylinder is at and position right now it will latch on the reverse command output Q 0.1 this will bring the cylinder from the end position to the mid position sensor when the cylinder reaches the mid position sensor I 0.1 this contact opens and unlatch the Q 0.1 output and cylinder stops at the mid position in the network number five if the request to the end position M 0.2 bit turns on and the cylinder piston is not at the end position sensor at 0.0 it will latch on the cylinder forward command Q 0.0 through its own normal open contact to turn on the forward coil this way the cylinder will move towards the end position read switch I 0.0 now as soon as the cylinder piston reached the end position sensor I 0.0 this normal close contact will unlatch the reverse command Q 0.0 and next if the request for the mid position M 0.1 bit turns on and the cylinder is at home position right now it will latch on the forward command output Q 0.0 this will bring the cylinder from home position to the mid position sensor when the cylinder reaches the mid position sensor I 0.1 this contact opens and unlatch the Q 0.0 output and cylinder stops at the mid position so this is the program for the today's project next we will upload the ladder logic in the PLC and let's see how does it works right now the cylinder is at home position so it's home read switch I 0.2 is on now as we press the mid position push button the mid position request be time 0.1 latch on to its own normal open contact if we come to the network number five here you can see that as the mid position request be time 0.1 turns on it latch on the forward command output 0.0 And the cylinder starts to move forward towards the mid position as soon as the cylinder reaches the mid position read switch is 0.1 this contact opens and turns off the Q 0.0 forward comma and cylinder stops at the mid position next if we press the I 0.5 and position push button it will latch on the M 0.2 and position request bit now if we come to the network number five the M 0.2 latch on forward command Q 0.0 and cylinder starts to move forward as soon as the cylinder reaches the end position sensor I 0.0 this normal close contact opens and unlatch the PLC output Q 0.0 next if we want to move the cylinder back to the mid position we have to move the cylinder shaft in the reverse Direction now if we press the mid position push button I 0.6 it will turn on M 0.1 mid position request bit in the network number four the M 0.1 Returns on the Q 0.1 reverse command and cylinder starts to move backward towards the mid position as soon as the Piston reaches the mid position sensor at 0.1 this normal close contact turns off the output Q 0.1 and cylinder stops at the mid position next if we press the home push button I 0.7 the bit M 0.0 for the home request turns out this bit in the network number 4 turns on the Q 0.1 reverse command as soon as the cylinder reaches the home position the I 0.2 read switch turns on and this normal close contact opens and turns off the Q 0.1 reverse command and cylinder stops at the home position so this is how we can control the cylinder with five by three waves all night wall using the PLC ladder logic that's the end of the today's session if you like our videos if you like our videos make sure to press the Subscribe button and press the Bell icon to get the notification of the upcoming video tutorials till next time take care and goodbye if wizard a normal open contact assign it as 0.0 insert an output coil and assign it to 0.0 now if we turn on the PLC input I 0.0 turns on the PLC output Q 0.0 let's suppose if we turn on the input at 0.0 there should be a delay of 5 Seconds and after 5 Seconds the output to 0.0 should turn on for this we need to insert a timer in this program we will open the instruction menu and select the on delay timer and drag it onto the ladder logic assign this timer any name and set the preset time as 5 Seconds now if we turn on the PLC input I 0.0 this normal open contact closes and it will start the timer after 5 seconds are over the timer will turn on the PLC output fuel 0.0 so this is how to use the timer in the TR portal Sr ledge insert normal open contact of the start push button insert satellite instruction and assign it any free bit next insert an output next insert an output coil Q 0.0 to reset the latch we will insert the stop push button to reset the latch we will insert the stop push button I 0.1 at the reset input of the SR latch now if we press the start push button the SR latch will set on the output Q 0.0 to turn off the output Q 0.0 we have to press the stop push button once it will reset the SR latch and turn off the output Q 0.0 how to Blink a LED using the ladder Lodge in the network number one we have used the selected switch I 0.0 to turn on the LED light Q 0.0 as this LED light turns on its normal open contact closes and starts the timer with one second delay once this timer is over it will set on this bit M 0.0 as this bit turns on it will start the timer with one second delay to reset the bit M 0.0 we have created the logic to turn on and turn off this bit M 0.0 using these two timers in the last we have inserted the normal close contact of this bit M 0.0 in series with the output Q 0.0 as this contact opens and closes it will turn on and off the LED with one second on and off delay Let's test the logic and turn on the selector switch at 0.0 as you can see there the logic is working properly and led output is blinking with one second delay foreign number five of the Dr portal in today's session we will learn how we can use the counter instructions in the TR portal before starting today's session I will request you guys to Please Subscribe my channel and press the Bell icon for more upcoming video tutorials for the today's session we have a start push button I 0.0 and the stop push button is 0.1 when we press the start push button at 0.0 it will start the convert Q 0.0 and boxes will start to travel on this conveyor next we have a proxy sensor a zero point to detect the boxes as the boxes passes in front of the sensors PLC should count the boxes and after five boxes convert should stop and the counter should reset and be ready for the next cycle let's go to the Tia portal software and make a ladder Logic for the today's problem in the network number one we want to make a logic to start the motor so we will make a simple hold on logic here first of all we will insert I 0.0 which is our start push button and next we will insert a coil here and we will assign it Q 0.0 PLC output and it will turn on our motor for the conveyor next if we want to hold on this one we have to insert here a branch we will insert a normal open contact here and we will assign it Q 0.0 and we will connect this Branch here now whenever this motor is on this contact will be closed and this motor will be hold on through its own normal open contact to turn off this one we will insert a normal close contact and we will assign it as 0.1 which is our stop push button in the network number two we want to make a counter logic to count the boxes so first of all we will insert here a normal open contact and we will assign it Q 0.0 so whenever this motor is running this contact will be closed next we will insert here or proxy sensor which is I 0.2 and next we want to insert here a positive Edge scan so we will go to the bit logic instructions and we will insert this positive trig command and we will assign it the bit M 2.0 [Music] next we will insert here a counter so we will be using this count up command today and we will drag and drop this count up instruction here and for the preset value PV we will put here 5 as we want to count the five boxes and the CV means the current value so we will be storing the current value of this counter into the memory word 10. now the logic here is simple whenever the conveyor motor is running and the Box comes in front of the sensor on every Rising Edge pulse this counter will be incremented by 1 and when the counter count reaches the count 5 it will turn on a bit we can use bit M 2.1 this bit M 2.1 will indicate that the number of count has reached 5 so next we will insert the normal close contact of M 2.1 bit here so when the five boxes have passed in front of the sensor I 0.2 this bit will be open up and it will stop the conveyor Q 0.0 and we can use the same bit M 2.1 to reset this counter and be ready for the next cycle next we will upload this program into the PLC and let's see how does it works next we will upload this ladder logic into the PLC and see and let's see how does it works now we will go online with the PLC and monitor or ladder logic as soon as we press the start push button as 0.0 our convey starts to run and box starts to move on the conveyor at each time the Box passes in front of the sensor I 0.2 the counter current value is incremented by one and as soon as the five boxes passes in front of the sensor I 0.2 the counter current value reaches 5 and this bit M 2.1 turns on and it will reset or latch off the infeed conveyor Q 0.0 and that box stops traveling on this conveyor and on the same time this bit M 2.1 has reset this counter current value and this counter is now again reset to zero and it is now again ready to count five boxes again so this is how you can use the counters in the TR portal that's the end of the today's tutorial do share like And subscribe to my channel and don't forget to press the Bell icon to get the notification for the upcoming video tutorials till next time take care and goodbye welcome to another training session on TR portal in today's session we are going to learn how we can read an analog signal from the S7 1200 PLC and how we can kill that analog signal into some usable values as always before starting I would request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials as you can see that today we have a 7 1200 PLC and we have connected analog signal generator with it and we have connected 0 to 10 volts analog output of the signal generator to the analog input Channel 0 of the S7 1200 PLC now let's go to the tier portal software and see how we can make a program to read that analog signal and how we can scale the signal into some usable values first of all we will open the Teo portal and create a new project in it we can give this project any name and click on the create button now the project is creating and once the project is created we will open the PLC programming Tab and create a new device in it from the drop down menus we will open the CPU menu and from the CPU menu we will select the S7 1200 plc214-1h31 as we are using this CPU in our today's tutorial this will add this CPU into our project next we will go to the project View and here we will open the PLC folder and open the device configuration if we click on the CPU and open its properties here we can see the analog input properties of this CPU if you scroll it down you can see the channel 0. this channel 0 input is coming into this input word 64. and this analog Channel 0 is a voltage Channel this means that it can only read 0 to 10 volts and right now the signal smoothing is selected to the four cycles and we can change it to medium and strong as per our requirement for today we will keep it only the medium with 16 Cycles this will remove some Ripples and noise which is disturbing or analog signals next we will go to the program blocks and open the main block ob1 next we will open the conversion operations we will drag and drop the norm X function and here we will select the double integer input and the minimum value we will insert it as 0 and in the value input we will insert the iw64 which is our analog input channel 0. in the maximum value we will insert 27 648 at 0 volts input or plc will understand it as zero so we have entered 0 in the minimum value and at 10 volts or PLC will take it as 27648 value that's why we have entered this 27648 value in our Max input next for the output data type we will select the real and in the output we will insert md20 function will take the analog input which is coming into the input word iw64 and normalized it from 0 to 1 and save this normalized value into the md20 data register next we will drag and drop the scale X function input value we will again select the real data type and we will use same md20 data register as a value input we can rename the md20 data register as a normalized value so that it is more understandable and in the minimum value we will insert the 0.0 right now it is giving some error to solve this we have to select the output data type as real as well next we will insert the max as 200.0 in the out we will insert the md40 data register and we can rename this data register md40 as a scaled value the scalex function will scale the normalized value md20 between 0.0 to 200.0 and save this scaled value into the md40 data register next we will download this project into the plc and once the project is downloaded we can monitor the ladder logic as you can see that right now the input is zero and our normalized value is 0 and our scale value is 0 as the input voltage is 0 volts as you can see that now as I increase the input analog voltage the normalized value is starting to increase and our scale function is scaling this normalized value and this scale values getting saved into the md40 data register so this is how you can use the nor Max and scale X functions to read and scale an analog input in the next video tutorial we will learn how we can generate an analog output using S7 1200 PLC and the Tia portal software before leaving I will request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials welcome to another training session on the Tia portal in today's session we will learn how we can generate the analog output in the S7 1200 PLC using Tia portal software before starting I will request you guys to please subscribe to my channel and press the Bell icon to get the notification for the upcoming video tutorials first of all we will open the device configuration menu page and open the hardware catalog from here we will insert an analog output onto the PLC rack if we open the properties of this analog output card and scroll down you can find the address of the channel 0. which is qw96 and this output channel is a channel 0 and it can generate 0 to 10 volts output next we will add a new block and we will add our organization block one which is ob1 and we will add a block on it and we will search for the norm X instruction and we will select the normax instruction and we will select the int data type for the input and the real data type for the output put the 0 in the minimum in maximum we will put the 100 and in the value we will write memory word 100 which is our input word the memory word 100 will be used to generate the analog output the values of the memory word hundred will be taken between 0 to 100 and normalized between 0.0 to 1.0 and the result will be saved in the out and we will write md40 in the out and md40 will be our normalized value next in the network number two we will add the scale X instruction we will select the real data type for the input and integer data type for the output next in the minimum we will insert 0 in the value input we will insert the same normalized value which is md40 and in the max we will insert 27648 in the output we will enter the same output word qw 96 for the analog Channel 0. now the scale X function will take the normalized value and scale these value from 0 to 27648 and throw out the result onto the qw 96 data register for the output Channel 0. and our output Channel 0 will generate the 0 to 10 volt corresponding to the value of the qw96 data register next we will download this ladder logic into the PLC simulator now we can change the display format of the qw96 data register as decimal next if we modify the memory word 100 and if we enter the value 10 and press OK button you can see that we have entered the 10 in the memory word hundred the normalized value is 0.1 and it is being scaled between 0 to 27648 and the result is 2765 and this value 2765 is saved into our output data register and the channel 0 will generate the analog output corresponding to this value in the qw96 data register next again if we modify the memory word 100 and we will modify it this time to the 50 and press the OK button as you can see that now this time the normalized value is 0.5 and the result 13824 is saved into the output qw 96 data register and the channel 0 will generate the analog output corresponding to this value in the qw96 data register next if we modify the memory word 100 and this time we will enter 100. and you can see that now the normalized value is 1 and the full max value which is 27648 is written into the qw96 data register and this time our output analog channel will generate 10 volts so this is how you can make a program to generate analog output using S7 1200 PLC and tia portal software so that's the end of the today's session do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session of the jio portal in today's session we will try to connect an extension IO module with the PLC or 485 communication using modbus rtu protocol we have an i o module with the two analog inputs and two digital inputs and four digital outputs in today's session we will connect this i o module with the PLC and try to read and write the iOS of this module using modbus rtu protocol the address of this module is 32. we set this address using these dip switches as you can see that we have connected a and b r x and TX terminals of the io module with r a and RB terminals of rs-485 Port of the PLC I have installed rs485 communication card on the S7 1200 PLC the part number is mentioned in the description we have connected 4 to 20 milliamp signal generator wires at the analog input channel one of this module before starting today's video tutorial I want to thank all of you guys to support my channel in case if you are new to this Channel please subscribe to my channel and press the Bell icon to get the notification of the new uploaded videos we will open the TR portal and create a new project in the Chia portal once the project is created we will go to the project View next we will add a new device expand the CPU folder and select the correct part number of the plc next we have to add the rs-485 communication card on the plc expand the communication boards folder and select the 485 card and drag and drop it onto the PLC next we will select the PLC and click on the properties tab here we have to enable the system memory bits and memory clock bits we will enable the system memory bits and we can use the memory byte 1000 next we will enable the clock memory bits and enter the memory byte 1001 this byte will be used for the clock bits next we will open the organization block number one from the communication menu go to the modbus folder and drag and drop the com load function onto the ladder this function will be used to initialize the rs485 port of the plc next we want to enable this function only one time when the PLC powers on so we will put the first scan bit at the request input of this function now this function will enable only in the first PLC scan cycle once the rs-485 port is configured this function disables next we will select the port to be configured we will write the local in the port and select the local 1241 RS 485 Port next enter 9600 in the baud rate and 0 in the parity because the io module is also communicating at 9600 baud rate and zero parity bit next we will drag and drop the MB Master function on the network number two we will copy the DB name of this function and paste it at the mbdb input of the com load function this will link both functions together next we will enter the address of the IU module in the MB address input the address of the IU module is 32 so we will enter 32 as the address input we will enter 0 in the mod as we want to read the data over the mode bus if we want to write the data over the modbus we will enter one in the mod input next we have to enter the data address which we want to read if you see the memory address table for the modbus rtu you can see that the data register for the analog inputs starts from three triple zero one so we will enter 3001 as a starting address in the data address input as this IU module have only two analog inputs so we want to read only the two registers so we will enter the two in the data length input next this function need a data block to save the red data for the analog channels so we will create a data block next we will open the properties of this data block and from the attributes menu we will disable the optimize block access option next we will create the tags to save the data we can give it any name as analog Channel data data type will be array of the two integers next we will create two Boolean bits done and error we will use and discuss these bits later in this video series next we will create data tag status with the data type as word this status tag will show the hex codes for the status and the errors of the modbus communication next for the data pointer we will select the analog Channel data array now the modbus master function will write the current values of the analog input channels in the data array next we will drag and drop the done with tag in the done output of the com load function once the configuration of the rs485 port is done this bit will turn on next we will insert the two normal open contacts in the network number two in the first normal open contact we will assign it this done bit in the second normal open contact we will insert the one Hertz clock bit this clock bit will turn on and off every one second now when the rs-485 port configuration is done on the every pulse of the clock bit at the request input MB Master function will read the data address 3001 with data length of 2 and save the result in the data block db3 now the programming of the PLC is done we will upload that program in the PLC and monitor the ladder logic as you can see that the done bit of the com load function is true this means that the 485 Port is configured without any error MB Master function is also working properly and the busy bit gets turned on and off on the each clock pulse at the request input of this function you can see that the communication between the PLC and IO module is also established if we open the data block 3 and monitor the tags when the analog Channel data array you can see the data for the two analog channels we have connected 4 to 20 milliamps signal generator at the channel one of the io module if we increase the current signal the value of the channel 1 is also increasing so this is how we can connect and communicate through the modbus rtu protocol in the next video we will see how we can read and write the digital input and outputs using modbus communication that's the end of the today's tutorial I hope you like it do share like And subscribe to my channel and press the Bell icon for more upcoming videos till next time take care and goodbye welcome to the part 2 of the modbus communication with S7 1200 PLC in part 1 We have learned how to configure and program S7 1200 PLC to communicate with extension IO module and read analog input signals or modbus communication protocol in case you missed to watch the part 1 of this tutorial series I would request you guys to please watch the part 1 and come back to the part 2. the link for the part 1 video is in the description box in today's session we will program S7 1200 PLC to read digital inputs and write digital output of the extension module using modbus communication protocol before starting today's session I would request you guys to please subscribe to my channel and press the Bell icon to get the notification of the newly uploaded videos we have connected some LEDs at the digital relay outputs of this module we have connected two selected switches at the input of this extension IO module we will program the S7 1200 PLC using the Teo portal software to read the status of these selected switches and turn on or off these LED lights first of all we will open the same project of the part number one in the tier portal we will copy the MB Master function and paste it on the ladder now we have two MB Master function in the program in the first MB Master function the mod is 0 as we want to read the data registers over the modbus if we see the data register table for the modbus communication you can see that the registers of the discrete input contacts starts from 1001 so we will enter one triple zero one on the data register input to read the status of the switches connected at the input terminals of the io module next we will leave everything as it is and there is no need to change anything else in the second modbus DB Master we will change the mode to one as we want this function to write the status of the outputs of this IU module this means that this function can now send the data over the modbus to turn on or off the LEDs now next we have to change the data addresses as we want to write the output registers if we see the data register table for the modbus communication you you can see that the registers of the discrete output coils starts from 1 so we will enter 1 in the data address next we have to give this function a request signal for the read function clock bit is sending the request signal every one second we will change the clock width 5 hertz frequency to send five request signals to the read function to speed up the things we will use the done bit of the read function to send request to this write function so we will open the data block number 3 and add a new row in it next we will create a new tag MB Master redone bit with the Boolean data type we will go back to the ob1 and here we will drag and drop the MB Master redone bit at the done output of the MB Master read function now when this function have read the data or the modbus this done bit will turn on we will copy this bit and paste it at the request input of the MB Master function to start writing the data over the mode bus now when the clock pulse comes at the request input of the modbus function it will start reading the register of the digital inputs when the reading is done this bit will send the request to the modbus function to write the digital output register next we have to assign the data tags to the data pointers of both read and write functions we will open the data block db3 and create digital input tab with the array of two and the data type as Boolean next we will create the digital output tag with the array of two and data type same Boolean as you can see that we have created two input data tags to show the status of the two selector switches and to Output tag will be used to turn on or off the digital outputs of the extension i o card next we will come back to the ob1 and select the digital input array tag in the data block 3 for the data pointer for the read function next we will select the digital output data array tag in the data block 3 for the pointer for the read function now the MB Master function will read the status of the digital inputs the switch is connected at the input of the io module this modbus function will write the status of the digital outputs the LED is connected to the release of the IU module by taking the data from the digital output data rate X and sending this data to the extension IO module over the modbus communication next we will insert Network 3 and insert normal open contact and assign it one of the digital input tags from the data block 3. next we will insert an output coil and assign it one of the digital output tags from the data block number 3. now we have a simple logic when the digital input 0 turns on by turning on the selector switch it will turn on the digital output and the LED will turn on now the programming is completed we will upload this data into the PLC and monitor the data logic as you can see that both read and write functions are working properly if we turn on the switch connected at the digital input 0 it will close the contact and turn on the digital output coil and our LED will turn on now if we open the data block 3 and monitor the data tags you can see that if I turn on the digital input 1 its attack turns true and when we turn off the selector switch its tag turns to the false so this is how we can communicate extension IU modules or any other sensor transmitter over the modbus communication with the S7 1200 plc but that's the end of the today's tutorial I hope you like it do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session of the TR portal in today's session we will see how we can connect and configure the Wago field bus coupler with S7 1200 PLC or profinet using Tia portal software before starting I would request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials as you can see that we have connected a 7 1200 PLC with the field bus coupler 750-370 with ethernet cable we have inserted one input card with 8 digital inputs and one digital output card with 16 outputs on the Wago field bus coupler the diagram for the connection is like this next we have connected a switch and one proximity sensor at the first two input terminals of the input module and the 124 volt buzzer at the first output terminal of the output card next we will open the Tia portal software and create a new project in it once the project is created go to the options menu and click on the manage GSD files here we have to install the GSD file of the Wago bus coupler otherwise we cannot add this module into our project you can download the GSD files from the Wago website we will browse the folder where we have downloaded GSD file and select the folder select the GSD file and click on the install button once the GSD file installed click on the add new device here we will add CPU S7 1200 we have to select the correct part number of the CPU and click on the OK button once the CPU is added we will go to the network View and from the other field devices we will browse to the Wego devices and drag and drop the Virgo 750-370 bus coupler next we will double click on the Wego module and go to the device view page here we will add the input and the output cards of the Bago bus coupler once the i o cards are added in the field bus coupler go back to the network View the Wego bus coupler is not connected to any network yet so we will add this Wego module to the PLC profinet Network next we have to set the IP address of the device we will start with the CPU go to its properties in the profinet interface menu we can see the IP desk settings we can change if we want to change the IP address but for the today's project we will leave it unchanged next we will go back and select the Virgo field bus coupler module here you can see the IP address 192.168.0.1 let's suppose if we want to change the IP address to 192.168.0.5 we can change it but we have to assign the same IP address to the Wago bus coupler as well as we have connected Wego field bus coupler and the S7 1200 plc2 or PC via Lan cart we can access the field bus coupler and assign it the new IP address we can use the online access option and browse the ethernet Lan card of the PC here we will select the Wego module and open the online and diagnostic here in the function menu we can see the IP address of the Wego module we can change it to 192.168.0.5 and click on the assign IP address button it will assign the new IP address to the Wego field bus coupler module next we will open the ob1 block and make some logic in it to test the communication before we make any logic we will open the device configuration to check the input and output addresses of the Vago IO modules if we double click on the Wego module it will take us to the device view here you can see that the input word addresses for the input module is starting from the two output word address for the output module is also starts from the two next we will go back to ob1 and make a simple logic to turn on the buzzer using the input and output addresses of the IU module now the programming is done we will upload the project into the PLC and monitor the ladder logic as you can see that the communication between S7 1200 PLC and the Wago field bus coupler is established over profinet if we turn on the switch its contact closes in the ladder program as we bring something of metal near to the metal detector sensors that buzzer turns on so this is how we can establish a communication between PLC and Wago field bus coupler over profinet I hope we have learned something in this video tutorial if you like today's session do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session on the Theo portal in today's session we will learn how we can program a logic to control a continuous process before starting I would request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials firstly we have a tank with a low level prop I 0.0 and a high level prop I 0.1 next we have two Inlet actuator valves operated by the PLC outputs Q 0.0 and Q 0.1 these valves are used to fill the liquid in the tank we will first pour 50 liters of the liquid from both valves A and B we can measure the liters using the flow meters installed on each line these flow meters output a pulse per liter of the liquid on the PLC inputs are 0.2 and I 0.3 as the flow meters confirms that 50 liters of liquid fill inside the tank from both sides the agitator runs for 50 seconds to mix these two liquids after 50 seconds the agitator stops and discharge valve Q 0.2 opens and start to discharge the tank as the liquid level drops below the low level prop as 0.0 the drain valve q0.2 closes and stop training the tank and the whole process will once again starts to make a new Badge of these two liquids next we will go to software and see the ladder Logic for this project in the network one we have a start push button I 0.4 and stop push button I 0.5 to turn on the start process with M 0.0 next in the network number two we have a logic to open the inlet valves A and B when the start process with M 0.0 is on and the liquid inside the tank is less than the high level sensor I 0.1 it will turn on both valves Q 0.0 and Q 0.1 to pour the liquid inside the tank in the network number three we have written the logic to measure the flow of the water as the inlet valves opens these flow meters output pulses we can count these pulses to measure the liquid using counters as the 50 liters liquid flow through these flow meters M 0.2 and M 0.1 turns on to confirm that a required 50 liters of liquid from both lines A and B is poured into the tank and these two bit will turn off the inlet valves A and B next in the network number four we have a logic to control the agitator when both liquids A and B poured in the tank these bits will close and starts the agitator motor Q 0.3 in parallel timer also starts with 50 seconds preset time once 50 seconds are over the timer will turn on the agitation done with M 0.3 and this same bit will turn off the agitator motor Q 0.3 in the network number five we have a logic to open the discharge valve as the agitation bit M 0.3 turns on it will turn on the discharge valve Q 0.2 as the liquid level Falls below the low limit probe I 0.0 this bit open and turn off the discharge while Q 0.2 in the network number six we have a logic to restart the process and fill the tank again as the water level Falls below the low level provides 0.0 this contact opens and on the Negative Edge the reset flow meter bit M 0.5 turns on for one PLC scan cycle this bit will reset the current values of the both counters back to zero and this will open both inlet valve again to start filling the tank now let's download the program in the PLC and monitor the ladder logic as we press the start push button I 0.4 it will turn on the start process bit M 0.0 to turn to start the tank filling process as you can see that both Inlet valves A and B are turned on to fill 50 liters of liquid in the tank and the tank starts to fill as the liquid flow through the flow meters these flow meters output pulses at I 0.2 and I 0.3 inputs these pulses will get counted by these counters once the 50 liters of the liquid from both flow meters is measured by these counters it will turn on the bits M 0.1 and M 0.2 and these bits have turned off the liquid a and liquid B valves output of the plcq 0.0 and Q 0.1 as the liquid from both valves is poured into the tank it starts the agitator motor Q 0.3 as the 50 seconds are over the timer turns on the agitation done with M 0.3 and this turns on the discharge valve Q 0.2 and tank is now starts to drain or discharge as the liquid level Falls less than the low level limit it closes the discharge valve and on the falling edge of the low level sensor I 0.0 signal it it resets both counter to zero liters and open both Inlet valves A and B to start filling again and the whole process will repeat itself again so that's the end of the today's tutorial I hope you like it do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session in today's session we are going to learn how we can make a program for a parking lot on the entry gate of the car parking lot there is a car sensor I 0.0 to detect the car there is a barrier at the entry gate to stop the passage of cars and this barrier is operated by the PLC output Q 0.0 when the car comes at the entry door and the sensor I 0.0 sends the car the PLC output Q 0.0 turns on for 5 seconds and barrier will stay up for 5 seconds once the 5 seconds are over and car is no longer in front of the sensor I 0.0 the PLC output Q is 0.0 turns off and barrier come down and block the passage again as you can see that each parking space has a sensor and each sensor is connected at the individual PLC input the sensor for the first parking space is connected at I 0.1 input of the PLC and the sensor for the last parking space is connected at I 1.2 input of the PLC there is a display on the top of the parking lot which is showing the remaining empty parking lot species now we have to make a program in the PLC in such a way that it will track each parking lot if there is a car inside the parking space or not and the PLC program should keep track of the empty parking space numbers and we will show the number of the available spaces on the display as the car leaves the parking space the available space number should be updated immediately by the PLC program on the exit door we have installed a car sensor I 1.3 when the car comes in front of the sensor I 1.3 the PLC logic turn on the barrier Q 0.1 for 5 seconds after 5 seconds if there is no longer car in front of the sensor I 1.3 it will turn off the barrier Q 0.1 and the barrier will come again at the down position and block the exit door now let's go to the TR portal software and see how we can make the ladder Logic for the today's project in the network number one we have a logic for the car entry whenever the car comes in front of the sensor I 1.3 it will hold on the output Q 0.0 through its own normal open contact in parallel it will start the 5 second timer once the 5 seconds are over and there is no car in front of the sensor as 0.0 it will turn on the vitam 1.0 indicate that the car has entered safely into the parking lot the normal close contact of this bit M 1.0 and it will turn off the barrier Q 0.0 next we will go to the network number three it will keep track of the parking lot when the car is parked inside the parking lot number one the sensor I 0.1 turn on and on the rising edge of the sensor the move commands get activated it will move a one in the memory word 30 to indicate that there is a car inside the parking lot number one next as the car leaves the parking lot one on the negative edge of the center are 0.1 it will move 0 in the memory word 30. to indicate that there is no longer car inside the parking lot number one next when the car is parked inside the parking lot number two the sensor is 0.2 turns on and on the rising edge of the sensor move command gets activated it will move one in the memory Word 32 to indicate that there is a car inside the parking lot number two next as the car leaves the parking lot 2 on the negative edge of the sensor are 0.2 it will move 0 in the memory word 32. to indicate that there is no longer car inside the parking lot number two as you can see that we have written the same logic for all 10 parking spaces if there is a car inside the parking space the sensor on the positive Edge will push one into the corresponding word when the car left the parking space on the negative edge of the sensor the move command will push zero in the corresponding memory word next if we come down to the network number four here we have used the add instruction to sum all data register for the parking lots and save the result in the memory vote 20. this will be the current car count inside the parking lot next in the network number five we have used the subtract instruction to subtract the current car count memory word 20 from 10 as we have 10 parking spaces the result will be the total available empty spaces the result will be stored in the memory word 50. so this is the program for the today's project next we will upload the project in the PLC and monitor the ladder logic as the car comes in front of the sensor I 0.0 installed at the entry gate the entry barrier output Q 0.0 latch on in the parallel 5 second timer also starts and the car is no longer in front of the sensor I 0.0 it will turn on the bit M 1.0 the normal close contact of this bit M 1.0 opens and turn off the entry barrier Q 0.0 output next in the network number three as the car is parked inside the parking lot number one the sensor I 0.1 turns on on the rising edge of the sensor move command moves one in the memory mode 30. meanwhile the second car is also entering the parking lot as this car is parked in the second parking space it turns on the center I 0.1 on the rising Edge move command moves one in the memory Word 32 to indicate the presence of the car in the second parking space meanwhile more cars are coming inside and getting bogged inside the parking spaces if we come down to the network number four here you can see that the ad instruction is adding all the memory words corresponding to the parking spaces and save the result correct number of parked car in the memory mode 20. right now four cars are parked so the counter also shows the value of 4 as more cars are being parked inside the parking lot the memory word 20 is also updating continuously and now the parking lot is full all 10 spaces are full and zero parking spaces are available now as the car in the parking lot number six leaves the sensor I 0.6 and on the falling Edge move command move zero in the memory word 40. if we come down in the network number four you can see that now memory word 40 for the parking space number six is zero and the current counter is nine as this car comes near to the center I 0.3 I 1.3 at the exit barrier output Q 0.1 latch on and it starts five second timer once the timer is over and the car is no longer in front of that zit sensor I 1.3 it turns on the bit M 1.1 and its normal close contact opens and turn off the barrier Q 0.1 and bear here come down again as another car from the parking space number three left the memory word 34 for this parking space becomes zero and the current car counter reduces to 8. now another car from the parking space number eight left the memory word 44 for this parking space becomes zero and the current car counter reduces to 7. as you can see that now the car goes inside the parking and get parked inside the parking space number six the memory word 40 for this parking space updated to one and the current car counter increases to 8. now another car goes inside the parking and get parked inside the parking lot number eight the memory word 44 for the parking space number eight updated to one and the current car counter increases to nine so this is how we can make a program to keep track of the parking lot and I hope you liked today's video do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session of the jio portal in today's session we will see how we can use functions in the Tria portal let's imagine we have four pumps the most simple way to write a program for these pumps is by making simple hold on Logic for the individual pump as the number of pumps increases we have to write the same logic to start the pump motor again and again to solve this problem we will use functions in the Tia portal we will make the logic to start and stop the motor in the function one time only and we can use the same function in the program as many times we want before going further into this tutorial I would request you guys to Please Subscribe my channel to add new function double click on the add new block click on the function and press the OK button next we have to add the tags for this function we will add start stop and motor overload bits in the input section in the output section we will add a motor contactor bit to turn on the contactor in the in out section we will create a motor start bit we can read and write the inode bits next we will create a simple hold on logic to start and stop the motor using these bits which we have just created we will close this function and go back to the ob1 drag and drop the function number one on the network and you can see that the function block is created with the inputs and outputs to start and stop the motors we will drag and drop four instance of this function to control four motor next all we need is to insert the addresses of the start stop buttons and motor Overload at the input side of this function and output address of the motor contactor at the output of this function we will insert the dresses for the all four functions now the programming is done we will upload this program in the PLC and monitor the ladder logic if we press the start push button for the motor number one you can see that the motor number one turns on you can see that the logic which we made inside the function is working properly if we press the stop push button the motor turns off same way we can turn on and off all of our four Motors so that's the end of the today's session I hope you liked do share like And subscribe to my channel and press the Bell icon for more upcoming videos till next time take care and goodbye welcome to another training session in today's session we will learn how we can connect and read the analog 4 to 20 milliamp signal of this temperature transmitter we will connect the temperature transmitter with the S7 300 PLC and program this PLC with the Tia portal software if you are interested in the PLC programming video tutorials please check out our YouTube channel And subscribe to this channel for more upcoming video tutorials first of all have a look at the wiring of the temperature transmitter with the S7 300plc as we have a two wire analog transmitter the wiring is really simple and straightforward we have connected 24 volt power supply temperature transmitter Terminals and analog input Channel 0 in series closed loop connection next we will open the Tia portal software and create a new project and click on the create button next we will add a new PLC device and select the correct part number of the Siemens S7 300 CPU once the PLC is added into the project spank the PLC folder and open the device configuration select the analog card of the CPU and click on the properties here you can see the analog iOS of this CPU select the channel 0 and change the analog input signal as Grunt and set its metering range as 4 to 20 milligrams now the analog Channel 0 is configured next we will go to the io tags tab here you can see the addresses of the analog input channels the address for the channel 0 is iw752 the analog values from the transmitter connected at the channel 0 will come in this input word 752 next we will go to the main block ob1 and here we will open the conversion instructions and drag and drop the scale function at in we will enter the paw752 which is the input word for the channel 0. next in the high limit we will enter 160.0 as the maximum range of this transmitter is 160.0 in the low limit input we will enter 0.0 in the bipolar input we can assign a memory bit M 0.0 in the return value output we will enter the memory word 10 to record any errors in this scale function in the out we will enter md10 which is the double data register to save the scale temperature values now the programming is completed we will compile and download the program into the PLC and monitor the layer logic as you can see that the scale function is working properly and scaling the analog 4 to 20 milliamp signal coming from the temperature transmitter between 0 to 160 degrees and showing the correct scale value at the md40 data register that's the end of the today's session I hope you like it do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session in today's session we will learn how we can generate analog output signals with the PLC first of all let's see the wiring for the today's setup we have connected wires from the 4 to 20 milliamp output channel of the PLC to the 4 to 20 analog input terminals of the SSR next we have connected bulb in series with the output terminals of the SSR relay this SSR Relay can regulate the current and voltage being applied to the bulb as the input 4 to 20 milliamps signal increases or decreases before going further in today's tutorial I will request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials we will open the same project file for the last session number 12. here we will go to the conversion operations and drag and drop the unscale function on the network number two this unscale function will be used to generate the 4 to 20 milliamps analog output signal next we will go to the device configuration select the CPU and open its properties if we expand the analog I use here you can find the analog outputs you can see that the channel 0 is configured as 0 to 10 volts we can change it to 4 to 20 milliamps next if we open the io dresses you can see that the analog output addresses starts from 752 this means that the address for the channel 0 is pqw 752 next we will come back to the ob1 and enter md46 at the in input of the unscale function next 100 in the high limit and 0 in the low limit as I want to scale and use my analog output and the 46 data register values between 0 to 100 percent next we will assign the memory word 13 at the return value output to record any errors in the unscale function in the last we will enter pqw752 at the out of the unscale function so let's conclude whatever the real values we enter in the md46 word between 0 to 100 will be unskilled and sent to the analog output Channel word 752 and the channel 0 will generate 4 to 20 milliamp signal depending upon the value inside pqw 752 output word now the programming is completed we will upload the program in the PLC and monitor the later logic let's enter 50 in the md46 word you can see that the bulb starts to Glow as the 50 voltage are applied to the bulb now let's enter 60 in the MD 46 Watt now the bulb brightness increases let's enter 100 in the md46 now full 20 milliamps are applied to the input of the SSR relay and the bulb is fully bright so that's how we can use the unscale function to make analog output signals that's the end of the today's session I hope you like it do share like And subscribe to my channel and press the Bell icon for more upcoming videos welcome to another training session on the PLC programming in today's session we will learn how we can use the PID continuous Control Function in the TR portal let's see the setup for the today's tutorial we have connected temperature transmitter with 4 to 20 milliamps output signal at the channel 0 of the S7 300 PLC next we have a bulb which is operated by the SSR relay this SSR relay have 4 to 20 milliamps input this SSR is controlled by the analog output of the PLC Channel 0 with 4 to 20 milliampere signal as we have discussed analog input and analog output reading and scaling in the session number 12 and 13. in case you haven't seen these training sessions the links are in the description box we have placed the bulb near to the sensing end of the temperature sensor to warm up the sensor and raise the temperature we will use the PID function to make a simple temperature controller first of all we will open the project file for the session number 13. as you can see that in the network number one we have a scale function to scale 4 to 20 milliampere signal of the temperature sensor in the network number two we have a unscale function to send analog output 4 to 20 milliampere signal to the channel 0. in today's session we will make the simple temperature controller with the PID continuous Control Function we will double click on the add new block and select the cyclic block ob35 and click on the OK button this block execute after every 100 millisecond next we will go to the PID menu PID basic functions and select continuous Control Function as you can see that this instruction has too many inputs and outputs don't worry we will explain all these step by step first of all we will enter M 0.1 bit at the manual on input this input will enable or disable the PID manual mode when M 0.1 bit turns on it will bypass the auto PID output and send the manual PID output signal next we will assign the bit M 0.2 to the P select I select and deselect inputs this will enable all three p i and D controllers if we want to disable any of these controllers we can disable that controller but in today's tutorial we will enable all three controllers and hence we will keep M 0.2 with turned on always next we will assign md100 double word data register at the set point input this input will be the set point temperature next we will enter MD 20 double word data register at the pvm PV means the present value of the temperature if we go back to the ob1 you can see that the md20 data register is the scale temperature value coming out from the scale function next we will enter the MD 110 double volt data register at the manual input whatever we write in this MD 110 data register will be sent as the PID output signal if we enable the manual PID mod next we will enter MD 120 data register at the gain input the value of the md120 will be the gain input for the P controller next we will enter the md-130 at the ti input the value of the md130 will be the input value for the integral controller next we will enter md140 double over data register and the TD input the value of the md40 will be the input for the D controller next we will enter md40 at the LMN output of the PID function LMN is the output signal of the continuance Control Function whatever values the PID function will write in the md40 will be sent to the analog output Channel if we go back to the ob1 you can see that the md40 is the analog output signal for the scale function now the programming is done we will upload the code in the PLC and monitor the ladder logic we have forced on the M 0.2 B to enable all three p i and D controllers next we have to enter p i and D values we can set these values by trial and error method I have tested the circuit before and found some suitable values for my circuit I will enter these values first of all I will enter 2.5 in the gain input 500 millisecond in the integral input and 10 millisecond in the D input next we will enter the set point temperature we will enter the 30 degrees set point as you can see that the PID controller sends 100 output signal to the md46 data register and the bulb fully turns on and sensor starts to heat up as the temperature rises right now the set point temperature is 30 degrees and the current temperature is around 22.1 degrees and the temperature is now slowly Rising as soon as the current temperature reaches a 30 degrees the analog output of the PID function starts to decrease and try to keep the temperature around the set point 30 degrees as you can see that now the temperature is maintained around the set point 30 degrees with 0.5 degree error we can remove this error by fine tuning the PID parameters that's the end of the today's tutorial I hope you like it do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session of the tier portal in today's session we will see how we can make a simple program in the ladder Logic for the car wash system this car wash system has three stations rinsing Station Main wash station and the air blowing station before discussing further I would request you guys to Please Subscribe my channel and press the Bell icon for more video tutorials at the ring station we have a car sensor number one which is connected at the I 0.2 input of the PLC when the car comes in front of this sensor the PLC will turn on the rinsing nozzles by turning on the PLC output Q 0.0 and rinsing nozzles will spray the water on the car for 50 seconds once the rinsing is finished the driver will move the car forward and move to the main washing station here as soon as the car comes in front of the car sensor number two I 0.3 sensor the soap applicator Q 0.1 will move one turn around the car and apply the soup on the car body once the soap is applied on the car the soap applicator confirms the application by giving the signal at the PLC input I 0.4 once the soap is applied on the car body there is a rest time for the 15 seconds once the 15 seconds are on the rinsing nozzles Q 0.2 opens and start washing the car to remove the Soap these rinsing nozzles will remain turned on for 30 seconds once the main wash cycle is over the driver will move the car forward as soon as the car comes in front of the sensor number three is 0.4 the PLC will turn on the air Blower's Q 0.3 for 30 seconds to remove the water from the car body and dry it after 30 seconds the air blowers will turn off and here the main washing cycle will be finished now let's see the programming for the Today's Car Wash project in the network number one we have a logic to start the cycle so we have a start push button I 0.0 whenever we turn on the start push button it will turn on the cycle start bitm 0.0 we have a stop push button I 0.1 when we press this stop push button it will turn off our cycle start bitm 0.0 in the network number two we have a logic to start the rinse cycle when the start cycle bit is on and the car comes in front of the sensor number one I 0.2 it will turn on the bit M 0.1 which is start cycle rinsing and in parallel it will turn on the output Q 0.0 rinsing nozzle station number one and this nozzle will turn on and start to rinse the car body in the network number three we have a rinsing timer when this bit M 0.1 starter engine cycle is on it will start this timer T1 and once the 50 seconds are over it will turn on the station number one rinsing completed bit which is M 0.2 and we have inserted the normal close contact of M 0.2 bit here and once the 50 seconds are over it will turn on this bit and this contact will be opened up and it will turn off the Q 0.0 output for the ringing nozzles and it will close the rinsing noises and stop throwing the water on the car body in the network number four we have a soap applicator cycle so when the station number one rinsing is completed the M 0.2 bit will turn on and when this bit is on and the car comes in front of the sensor I 0.3 at the station number two it will turn on this bit M 0.3 start soap application and in parallel it will start the Q 0.1 output of the PLC and start the soap applicator in the network number five we have a soap application done signal so when the soap applicator moves around the car one time it will send a signal to the PLC input I 0.5 to indicate that the soap application is done it will turn on the bit M 0.4 which is soap application done with we will insert the normal close contact of this bit here to turn off the soap application [Music] next in the network number six we have a rest timer for the 15 seconds once the soap application is done it will turn on this T2 timer for the 15 seconds once the 15 seconds are over it will turn on this bit M 0.5 to start the finer rinse and in the network number seven we have a logic for the final rings once this bitm 0.5 is on and the car is already at the I 0.3 sensor it will turn on the bit M 0.6 which indicates that the final rims has been started and in parallel it will turn on the Q 0.2 bit to turn on the final rinse nozzles in the network number eight we have a 30 second timer for the rinse cycle once this BTM 0.6 is on it will start the timer for the 30 seconds once the 30 seconds are over it will turn on the M 0.7 bit and we have inserted the same bit normal close contact here and once this bit is on it will open this contact Time 0.7 here and this will turn off the finer rinse nozzles Q 0.2 after 30 seconds in the network number nine we have a air blow cycle once the finer rinse is finished and the car comes in front of the sensor at 0.4 it will turn on this air blowing start bit which is M 1.1 and in parallel it will turn on the Q 0.3 output of the PLC to turn on the air blades in the network number 10 we have a air blower timer and once this bit is on it will start this T4 timer for the 10 seconds and it will turn on this bit air blowing done bit M 1.2 and we have inserted this normal close contact here and once this timer is over this bit turns on and this contact will open up and it will turn off these two bits and we have used the same bit in here as well in finer in cycle to turn off this m 0.6 bit here as well in the soap applicator cycle to turn off this start soap application bit and we can use the same bit here as well to turn off this cycle we can insert the normal close contact here of the M 1.2 bit so when the final step which is air blowing is completed it will turn off our start cycle with M 0.0 so this is the program Logic for the today's tutorial we will upload this logic into the PLC and once it is downloaded into the PLC we will monitor the ladder logic and see the whole process as we press the start push button once the cycle start bit turns on as the car comes in front of the sensor I zero point the rinsing nozzles output Q 0.0 latched on and rinsing starts now as the ringing cycle with M 0.1 turns on it have also started the timer T1 for 50 seconds after 50 seconds the timer will turn on the ranging completed bit M 0.2 as the 50 seconds are over the switch M 0.2 normal close contacts open and turn off the rendering nozzles Q 0.0 in the network number four as the car comes in front of the car sensor I 0.3 it will turn on the soap applicator Q 0.1 as the soap applicator complete one turn around the car it will send the application done signal at the PLC input I 0.5 this signal turns on the bit M 0.4 in the network number 5. this bit in the network number 5 starts the 15 second delay timer after 50 seconds the timer will turn on the V10 0.5 to start the final rings as the start greens M 0.5 bit turns on it will turn on the final rinse nozzles q0.2 as the rinsing starts 30 second timer also starts and once the 30 seconds are over the timer turns on the final Rings finish with M 0.7 and the normal close contact of this bit opens and turn off the rinsing nozzles next in the network number nine as the car comes in front of the sensor I 0.4 it will turn on the air Blower's Q 0.3 output and and air blower start to blow off any air particles on the car body as the bitm 1.1 is on now it starts the 10 second timer after 10 seconds the timer turns on the bitm 1.2 this bit M 1.2 turns off the air blower output Q 0.3 in the network number nine similarly the normal close contact turn of the start cycle bitm 0.0 and whole process stops so this is how we can make a small Logic for the car washer using timers and nonc contacts I hope you like this video do share like And subscribe to my channel for more upcoming video tutorials till next time take care and goodbye welcome to another training session in today's session we will learn how we can make a logic in S7 1200 PLC to calculate the RPM of the motor using an encoder before going further I would like to request you guys to Please Subscribe my channel and press the Bell icon for more upcoming video tutorials we have connected an incremental encoder with 360 pulses per Revolution to the back end of the motor shaft the encoder shot will rotate as the motor shaft rotates we have connected A and B phase output wire of the encoder at I 0.0 and I 0.1 inputs of the PLC if you want to see the detailed video regarding the encoder connects with the S7 1200 PLC the video link is in the description box now let's go to the Tia portal software and make a logic to calculate the RPM of the motor we will create a new project in the tier portal and select the correct part number of the CPU we have if we open the properties of the CPU and go to the high speed counters menu here you have total six counters we will enable the high speed counter number one next set the type of the counting as the frequency now the high speed counter will count the number of encoder pulses in one second set the operating phase as the a b counter as we have connected a and v as we have connected A and B phase wires to the PLC rest of the options we can keep as it is no need to change anything else next if we scroll down we can find the io addresses the address of the high speed counter number one is ID 1000 next we will go back to the main block ob1 and here we will insert the move instruction we will move the high speed counter value from the ID 1000 to the memory md1000 we can rename ID 1000 as HSC Channel 1 and md1000 as encoder pulses in one second next we will insert the multiplication instruction on the network number two we will multiply md1000 encoder pulses in one second with 60. the result will be pulses in one minute we can save the result in md10 and we can rename the tag as encoder pulses in one minute next we will insert the division instruction we will divide the md10 encoder pulses in in 60 seconds with 360. as we are using encoder with 360 pulses per Revolution we can save the result in md20 the result will be the RPM next we will download the program into the PLC and let's see how does it works as you can see that as we start the motor the logic starts to work and it is showing the RPM in the md20 memory so this is how we can make a logic in S7 1200 PLC to calculate the RPM of the motor using encoder before leaving I would request you guys to Please Subscribe my channel and press the Bell icon for more upcoming video tutorials till next time take care and goodbye welcome to another training session in today's tutorial we will see how we can make a program in the ladder logic to control the travel distance of the conveyor belt using the three-phase motor with the disc brake coupled with an incremental encoder we will be able to control and measure the distance traveled by the conveyor belt before going further I will request you guys to please subscribe to my channel and press the Bell icon for more upcoming video tutorials we have a conveyor belt which is moving with a motor and a gearbox we have coupled an incremental encoder with 360 pulses per Revolution with this motor we are using S7 1200 PLC for this project if you want to see how we can connect an encoder with the PLC the link is in the description box for this video tutorial first of all we will add a PLC in the project and open the device configuration now if we select the CPU and open its properties here we will find the high speed counters expand this menu and select the high speed counter One enable this counter type of the counting will be count operating phase will be a b and the counting direction will be up count next in the hardware input size 0.0 and I 0.1 inputs are already selected we have connected the a b phase wires at the I 0.0 and I 0.1 PLC inputs next we can read the encoder value from the input word iw1000 let's see the programming for the today's project in the network number one we have a logic to read the encoder current value and convert it into the real data type we have used the move instruction to move the current value of the encoder from ID 1000 to md1000 memory next we have used the conversion instruction to convert the encoder value from the double integer to the real data type and save the result in the md20 memory data register next in the network number two we have a logic to calculate the distance traveled by the conveyor first of all we will calculate the distance traveled by the conveyor for one encoded pulse the conveyor travels 15 mm for one complete turn of the encoder as we know that we have connected the encoder with 360 pulses in one term so we will divide the 15 mm by 360 to calculate the distance in mm purpose of the encoder and save the result in the md30 memory next we will multiply the current encoder value md20 with the millimeter purpose md30 this will give us the total distance traveled by the conveyor md40 in the network number three we have a logic to start the motor in the forward Direction when this bit M 0.3 turns on it will turn on the PLC output Q 0.0 to run the motor in the forward Direction This forward command can only be turned off if we press the stop push button I'm 0.4 or by the bit M 0.0 which indicates that the conveyor has reached the set point while running in the forward Direction in the network number 4 we have a logic to start the conveyor in the reverse Direction once this bit I am 0.5 turns on it will turn on the PLC output Q 0.1 to turn on the motor in the reverse Direction This reverse command can only be turned off if you press the stop push button m0.4 or by the bitm 1.0 which indicates that the conveyor has reached the set point while running in the reverse Direction now let's suppose if the conveyor is running in the forward Direction and as the conveyor motor traveled becomes greater or equal to the set point it will turn on the M 0.0 bit and this bit will turn off the forward run command Q 0.0 now let's suppose that if the career is running in the reverse Direction and as the conveyor motor traveled value becomes less or equal to the set point it will turn on the M 1.0 bit this bit will turn off the reverse run command Q 0.1 as you can see that we are reading the encoder value properly right now the conveyor motor is at 0.0 mm now let's run the conveyor motor in the forward direction we will give it the set point of 1250 mm let's start the conveyor by pressing the start forward push button the motor forward contactor turns on and the convey starts to move in the forward Direction as the convert traveled reading reaches 1250 mm the bit M 0.0 turns on the normal contact of this bit M 0.0 opens and turn off the Q 0.0 forward run command and motor stops as 1250 mm now let's change the set point to 2500 mm and again start the forward run command Q 0.0 by pressing the start forward push button m0.3 as the conveyor motor traveled reading reaches the 2500 mm the bit M 0.0 turns out and this returns of the Q 0.0 forward run command and motor stops at 2500 mm now let's change the set point to 5000 mm and again start the forward run command Q 0.0 by pressing the start forward push button as the convey traveled reading reaches the 5000 mm the bit M 0.0 turns on and this bit will turn off the forward run command Q 0.0 and motor stops at 5000 mm now let's run the conveyor in the reverse direction we will change the set point to 1250 mm and turn on the reverse run command Q 0.1 by pressing the start reverse push button m0.5 and now the conveyor is running in the reverse Direction as the conveyor travel reading reaches 1250 mm the bitm 1.0 turns on the normal close contact of this bit opens and turn off the Q 0.1 reverse run command and convey stops at 1250 mm now let's bring back the conveyor motor in the home position we will change the set point to 0 mm and start again the reverse command Q 0.1 by pressing the start reverse push button as the conveyor motor travel reading reaches 0 mm the bit M 1.0 turns on the normal close contact of this bit opens and turns off the Q 0.1 reverse run command and motor stops at 0 mm over its home position so this is how we can control a conveyor belt and measure the distance traveled by the conveyor belt I hope you liked today's tutorial do share like And subscribe to my channel and press the Bell icon for more upcoming video tutorials till next time take care
Info
Channel: PLC Programming Tutorials Tips and Tricks
Views: 8,678
Rating: undefined out of 5
Keywords: TIA, PORTAL, SIMATIC, MANAGER, PLC
Id: Mk-5-oT2Rhw
Channel Id: undefined
Length: 154min 41sec (9281 seconds)
Published: Thu May 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.