PID Control Implementation in Siemens TIA Portal: S7-1200 PLC Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone welcome back to the automation only YouTube channel in today's video I'm going to demonstrate how to use pad control blocks to maintain the process temperature within the set point for this demonstration I will be using the C ta portal along with the S 7,200 PLC KTP 400 HMI and an ifm temperature s but before we begin please like share and subscribe to our automation on YouTube channel all right let's get started first you need to open the TA portal here I have already created a project using S 7,200 PLC and KTP 400 HMI click on the PLC and expand it the program blocks double click on the main OB also I have a small program written here to start of the p and I have already scale the analog inputs in this video description below you will find the link to the previous videos on how to create new project in C ta portal and how to scale the unlock inputs if you are new to this I will recommend watching those videos first to get familiar with the basics okay let's move on to the program so since we are going to use the pad control blocks we need to click on the technology and go to the bad control and click on the compact pad here you can see there are pad control blocks for now we going to use the pad comact for to use the pad coma control block we need to add a new blocks in the program box double click on the add new blocks and click on the S cyclic interrupt block so this is the block that designed for mainly for p controller and where the calculation are theate so you can name it whatever you want okay you can name it as a p since we are going to use for p so we can name it as P controller and the cycling time in the millisecond you can adjust it accordingly all requirement of the process for now I keep it with the 100 millisecond then we click okay so the P control block is ready now we have to track and drop the comeback controller into the control blocks Okay click on the comeback P here is a p come back click and control here so you can name it P controller okay so this is the P controller now we need to assign the inputs and outputs to use the P control block the in put are set point and input input peripheral click down and then you can see the there are some other inputs like manual node manual value and then here is the output say output output peral output pwm and state error error bit all those they have but we going to use some of the basic inputs and outputs to use the pad control block so for for now we will set the set point write it we name as a temperature temperature _ set point right click and then Define that click to Global memory and the address will automatically assigned if you want to change the address you can click it and then you can change as per as per your requirement but for now I will keep it the aut assignment click Define so that is design for the set point next one is input so here there is two things one is input another one is input periperal if you are scaled your unlock input you can use the input if not if you not scaled then you can use the input peripheral but we have already scaled in the menu V my unlock input this is my unlock input I w64 which I scaled and converted to 0 to 100 minimum 0 to 100 value so here is the temperature real value so I'm going to use this as a my input so this is my input cing temperature real value so this is my input then next uh this I'm not going to use since I'm using this one the next one is we can use uh manual mode so for this we can click manual manual mode define define that click on the global memory and let it automatic assign of the address then Define next thing is manual value name us a manual manual output click on the global memory and Define okay now it's manual output is ready then we go move on to the output here there is a three out types output output periperal output pwm but for now we going to use output periperal which I have not scaled so I will use this uh output directly from the P out P controller find tag same as previously Global memory automatic assign you can Define okay that's it for now we can we have done this assignment for the P control plugs then next we need to configure the input and outputs into the P Control Plus for this you need to click the technology object and click on the P controller and here you can see there is a configuration so double click it then the page when open it you can see how the controller types so we are going to control temperature so that we can click select the temperature and then what mode we are going to use we going to use automatic mode so we can select it automatic mode the next is a input so what type of input we are going to use you know we already assigned as a input not this so we select input output is we're going to use this output output fre which is already scaled within the block so we going to use this so leave it with this the next is SC the settings the process value high limit or low limit we already set the low limit high limit in the program uh which is 0 to 100 so I'm going to change from 120 to 100 that's it this is disabled yes we are not using this option then click the advance settings here nothing much for me to change output value limits is already 0 to 100 so I'm going to uh uh use this the same set points so nothing else to change here uh if you want you can enable the manual entry so that you can manually change these the the proportional and integral derivative values for to tune your P control box so you can click it if you want the controller structure type there are two type of stret one is the pi and another one is the PID so you need to uh select which your process is required for me I'm going to use the P now okay that's all we have done this part now we going to the HM section and do some graphics and for visualization and then we can download the program to the PLC and HMI and then finally we do the commissioning of the V controller so so you go to HMI section expand it expand the screens double click on the p screen in this video description below you will find the uh links to the previous videos on how to create the projects within the S te portal so please watch it uh to create the buttons and then IO Fields uh in the HMI section so now we going to use um some of the io fields and the elements here so for the elements maybe we can use this to visualize the P output and the manual output of the uh P control block we click on the properties so we go the layout first to set the specific size maybe we can the size maybe we can put it some 55 K5 that looks okay for me and uh do the appearance colors colors I just change to green color for the P output go to G there okay is already we set Z to 100 and then you click the need to link to your PLC Tex default Tech table and go the scaled output this is the scale output okay next one appearance SI any changes in appearance okay the border is so thick we can reduce to smaller size guys okay now looks okay so we copy and paste for so that we can use for this to uh manual from output click here and then click this and go to PLC txt default Tech table manual output so we can display the manual output here click on the appearance to change the color so that you know it's on the man okay this one is the Ping it so just move up okay that's okay that's look okay looks everything okay so here's the temperature then next one is the set point temperature so okay set point need to assign the TX to the right T click on here and go to the PLC TX default tag table and cod the temperature set point and click okay so now we assign the I field to the set point temperature then next one if you want to display the um output so copy paste it and move to here yes change the name of this to uh P output output then you need to assign this to the relevant tag so you go to PLC tag default tag table and code the scaled output and click okay this the PID output face it you can use this for manual output assign to the relevant tag plg tag table and go to the manual output click okay that's it so now as um it's ready for to change to manual mode you need a button to you need need a true button to select from Auto to manual so I will create a two buttons here so one is I can name as Auto one is manual key manual okay if you want to use the auto manual mode so also you need to write a simple program to switch from Auto to manual so for this we will go to the PLC program and write a symol program okay we go here then we write it as auto man okay this one we can change to uh we can rename it as a p p on change so now when you press the start button the p is on when the p is on okay p is on then you can press the manual button to turn on the manual output so manual underscore push button I use the push button so I just name it push button redefine tag Global memory and click Define this output is a man manual mode we already have a manual mode selected now if you want is the direct P output so you need to stop the manual mode so lash lash and then stop so press the manual push button the manual mode is on then you need to latch with the manual mode and you need to cut off the manual mode when use the auto push button so when you click the auto push button this manual mode will cut off and then go to the pad control mode so now we have ready this uh manual push button auto push button so we go assign it to the HMI screen here then we click Auto Define tag go to the properties tck uh events press click here and then go to the PLC tag if for take table auto push button click okay this one same as before assign to manual push button click okay so that's all for the manual entry of the gain and the integral and the derivative values you need to have the io field so that copy a few of these and then I can paste it again another one is derivative so for this go to the properties and assign the tax to this and click here and go to technology object and go the PLC and under this rain control parameters here you have this gain and click okay and same as this there and then click to the technology object PLC return and control parameters integral and go for this click on this and P uh technology object P control and go to the Rain control parameters DD which is derivative time click okay okay that's it for now we have done our visualization in the HMI side we have to download the program to the PLC and the HMI and then we do the commissioning in for the P control all right we will download the program to the PLC click on the PLC and click on this download to device button click for interface I'm using real Tech asp click on this and click direct SL start search okay the plcs is here so click load the program click to stop all and load finish and open main OB and then you can monitor the values whe your program is ready to start as you see here so you have all the green dots which means your offline online program is same so now you can see that that uh our temperature sensor is connected to the PLC it's reading 29.2 is the current process value from the temperature reading so the p is not turned on until now the manual mode is off this program and then you go to the pad control and then here is the P control block so here you need to add one point to to on and off the P controls for this we will click here and then add a button p on this p on need to download the program okay I can monitor this okay now the p uh is not 10 to on okay now plc part is completed and we move on to the HMI section click HMI and download select interface profet and then go to real Tech USB direct and start search okay the devic is here and then click load a program click load see that we have already downloaded our program to the H section and this is our PLC and here is the temperature sensor you can see the temperature value is 29.3 now we can do our commissioning go click on the commissioning for now we need to turn on the P first so for this this I will press this button to turn on the P now the pad block is turned on and then we need to do the commissioning on the the side so here as the this is where we need to do the commissioning here you can see the current set point scaled input and the output so okay start you need to set your a set point to I'll set my set point is 60 five and then click enter so now we set the set point knowledge okay we need to do the pre-tuning click on the [Music] start so now our input is 29 our set point is 65 and then the output is displaying 100% so we need to when the output is open then you can see that the temperature increasing to 52 so you can see that that the the system is tuned so you need go to the P control blocks and then see that output output is 100% it opened and temperature set point is 65 the temperature real value is 45 now and that's why the output is open 100% if your temperature goes High to see output is slowly decreasing to 91 which means is controlling the P controller is controlling the output according to a temperature so if the temperature it changes from 70 to 60 then the output is will increase to maintain the set point so now it's 64 and then it's keep increasing to 90 if the temperature goes to 64 67 you can see that the output is will uh decreasing to maintain the temperature so for now we have done our P control blocks in the SE ta portal you can see on uh HMI so this is the uh our HMI screen for visualization so you can see in the temperature is uh 53 our set point is 65 and the gain is 042 integral 11 and derivative is 2 if you want to use the manual output you just click here the manual button so output become P output become zero so you need to key your manual output to whatever you want if you set 60 50 then click okay then your manual output is 50 so that you can see on your screen the output is 50 which is we set by manually so this is how it will work Auto manual function in the P control blocks so for now we have changed to auto screen so that it will control automatically so it will not use the manual output you can see the values of output values vary depend on the your temperature input okay that's all for today thanks for watching my videos
Info
Channel: Automation Avenue
Views: 1,755
Rating: undefined out of 5
Keywords: PID Control Tutorial, Siemens TIA Portal, S7-1200 PLC Tutorial, KTP400 HMI, Temperature Sensor Integration, Industrial Automation Tutorial, PLC Programming Tutorial, PID Tuning Guide, Automation Tutorial, Automation Avenue Tutorial, how to use pid controller in siemens plc, SIMATIC Standard PID Control, How to Configure PID in Siemens PLC? - Tia Portal, PID Control with PID Compact for SIMATIC S7-1200, PID Programming in Siemens TIA Portal, Set-Up a PID Loop in Siemens S7-1200
Id: K4FIT5st8m8
Channel Id: undefined
Length: 30min 47sec (1847 seconds)
Published: Sun Mar 10 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.