TIA Portal: PID Compact - How to program and use it!
Вставка
- Опубліковано 30 вер 2024
- After some pre-work in the last videos, let's get our tank system running using a PID controller!
Contents:
- PID Compact
- Cyclic OB with 1ms cycle time
- Block parameterization
- Autoscale
- Block explanation on Inputs/Outputs
- Fitting the block to our tank system example
(- Troubleshooting)
- Testing the PID Compact block
If this video helped you, please consider helping me by joining my "GoFundMe" and donating a small amount to my cause. Link here:
www.gofundme.c...
This is great! Thanks so much for continuing with the phenomenal Siemens PLC videos. I have learned so much from you. Keep up the awesome content!
Thanks! I'll continue as much as I can! Also checked your channel, some good stuff on there too!
It is educative and simple to learn . Thanks.
I programed in the past in simatic manager , one line for scale and unscale to read data and control the analog input in fonction of the analog input value.
I used scale bloc to read analog input value and used the output real value to the comparaisons blocs.
I used compares blocs if input are for exmeple >than 50% so i used move fonction to put 10% to the data type in input and i used this input to the unscale bloc to control the the flow of my tank .
At the end i have lot of comparaison bloc , if i have 5% i will open and analogic output to 75% and etc ..., i think the pid bloc work with the same focntion but with others bonus fonctions
I can notice i didn't have tia portal in the past this is why i have to programm like that ^^
Kindly share the link of how did you create this program of tank I couldn't find it in your tutorials. Thankyou for your time, your videos are really helpful. Happy New year from Duomo di Milano.
it's the most mystery of his previous video when he was saying that
After a year, did you find it?
The simulation of PID_Compact V2.x with PLCSIM for CPU S7-1200 is not supported. PID_Compact V2.x can only be simulated for CPU S7-1500 with PLCSIM.
You should mention that its NOT possible to simulate PID with an s7-1200 PLC. Ive been going at it for hours trying to get this to work but finally found out its not possible on the siemens Forums. You would need to use a 1500.
thank you Sir, That's the information I needed
PID_Compact V1.2 is supported by S7-1200 (under Technology blocks Compact PID Version V3.0).
@@petrkamin i was referring to simulation... as in plcSim
hi great teacher i did follow all the configuration but somehow i can not start the pid controller . i can not change to run like you did on the 16:32 minute can you please tell what is the solution
?
The Compact PID controller is in disabled mode - 0, regardless of the settings. Only downgrading the Compact PID from V6.0 to V3.0 in Technology blocks enabled the automatic mode. Is this a bug or a feature? Does somebody know?
Hey, I'm just wondering if you could make source code of the testing environment public. Do you think is it possible? It would help my final a lot.
Hi I have a question: If I have in my program more then one PID controller, do they have to be in separate cycle interrupts or on the same?
They can be in the same, no problem
That's a very good video!
However one thing I'd change is the cycle time of the OB31.
1ms is really fast, and if you're using a slow PLC or a lot of PIDs the PLC could need more than 1ms to run the OB, which would cause an error.
"Slow stuff" like this tank level and temperature can easily be controlled with a 100ms OB (this was kind of the "standart" with S7-300 and its OB35).
Also if you're not using peripheral access to the In/Outputs there's also nearly no improvement in calling the OB twice as often as your PLC cycle time (e.g. if your average cycle time is 10ms there's almost no point in setting the OB cycle lower then 5ms). (the PLC will only update the values of IW and QW once it starts/finishes the OB1)
Hey I am playing around with the pid compact in tia V17 on a S7-1200 PLC.
What I do not understand is that the control output is still quite high ( 67.50) while the PV is already 31.4 celcius and the SP = 30.
Played around with Kp, Ti,Td but the controller output does not return to below 10% if the PV comes close to SP(0.2C).
This someout bugs me maybe you can explain. Thanks
Hello how are you...?? This PID and HMI project can be done on S7 1200 1214 ac/dc/rely..? Greetings from Argentina
Thanks, teachers in my school put videos with your work 😂
@hegamurl
brother can you please help , how can i solve error during pretuning output value limits not configured properly... please help...
Sir i have a question for tank behavior DB in your simulation file why is there an array up to 9999?
i have v16 and a don't know why I cannot open technology objects, each time I try to open add a PID function my appears an error and my program get freeze and close.
Hi. It was perfect. I have some problem with tuning. When i start tuning i face with error: the out put value limit are not configured correctly or the actual value does not react correctly. How shoud i put Sampling time
Mate, you're such a good teacher. Thank you for all the uploads!
Sure thing! As long as it's fun creating the videos and helps out, I'll keep them coming. But gotta take a week break, am on a business trip. But I plan continuing after
please what is the best way to add 48 pid control loop (temperature control) and make it works in groups (so it will not swicth on all together) and thanks
unfortunately without all the prepared stuff, i wasnt able to get this working
Fantastic video. Congratulations!!.
شكرا جـــــــــــــــــــــــــزيلا ؛ فيديو رائــــــــــــــــــع
Db stands for data block, not database. Everybody gets this wrong
Could u do the series about making HMI professional
i have a problem with the pid block . i have set all the parameters accordingly but my controller is disable - inactive . how to resolve the issue...kindly guide me
Did you already found the problem?
Hey Hegamurl, how can I put the input in temperature and get % ?
Vielen Dank erstmal für deine Videos. Ich habe eine Frage. Wie kann ich bei pid Regler eine mindestdrehzahl programmieren? Der Regler startet fährt auf startdrehzahl danach übernimmt der Regler. Vielen Dank.
Can you share how you built the display?
Have any ABB DCS tutorial
Great work! I really enjoy your video's.
You are very welcome! Thanks for watching
It is a great resource.
Thank you very much. by end of my headache day, I love to spend one hour on your informative videos releasing all the daily pressure. thank you Hegamurl
which university you are professor
I think you should use ziegler nichols method to get starting parameters. Thank for your great video sir :)
CHR would also work, but yeah... calculating some parameters beforehand is useful! I also made a video on the "autotuning" function of the PID Block
Sounds good...👍 thanks again sir. I'll watch it
What's the method?
Awesome videos fella, I've used a few now and they have been amazingly helpful. As people have said before you teach the subject really well. Thanks.!
Hi
Great video !
I had just one question
Shoud the tme for the cyclic interupt always be set to 1ms?
In some video's from siemens they set 100ms
What is the correct time ?
I m a bit confused as i m a beginner
Thank you very mubh
hi, very good videos, now I need to work with PID but I met some problems , PID works just when I press "start" button in comissioning windows, but without this operation it doesn't work.
Hi Hegamurl, love your vids! I'm currently doing a school project using an S7-300 controller, do you think you could make a vid explaining how Cont_C is used?
I have the same problem that u have my output in pid is always 0 why !!!!! What did u do in 5 minute for solve the problem.....'' Sorry for my english ''
The same thing happened to you, the difference is that I was in the start-up with maximum pressure, I think this is part of the Siemens developers who must improve the software.
HMI Desing are not show
Thanks for you Videos and the very good explanations. Do you have Videos about Node-Red on plc and Data-Logging on HMI, i need to log ca. 10 values every second to hmi->USB-Stick. Is there a posibility to use e.g. array and move them to USB-Stick?
Hello!!! Could you please explain this to me with a sample?
The difference between setpoint and
process value is greater than 30% of the
difference between process value upper
limit and process value lower limit.
The difference between setpoint and
process value is >50% of the setpoint
Hello, one question. Can the 100% output of the PID be scaled in any other FC block?
Hey thanks for this wonderful tutorial. I’d like to try it out myself but I’m missing out your simulationblocks. Is this something you would like to provide…? 😅 Would be so thankful.
I have a question. How to stop and start PID Block with condition? Example: If my temperature goes out of range PID output is deactivated and then restarts again when temperature is in range.
this video is not helpful at all , you just changed the setpoint and the pid started doing its job , it doesn"t work for me , how did the pid start changing the output value ?
Why PID must be in cyclic interrupt? Why it can not be in normal block? Thanks
Hello! How are you changing the "setpoint" of PID from HMI? I don't see a setpoint tag in the "plc tags" that i can associate with HMI to change the value from there. How to do it?
Thank you very much! Awesome guides! Why didn`t I find your channel earlier...
what if its inputs out of range at that PID block need to start manually from configuration window?
Awesome!!!!!!!! Thanks a lot for your informative videos. Could you share this similation diagram with WinCC and main block. Really I need that soo much for learn more. I can give my mail adress to you or you can share however you want if you can. THANK YOU FOR YOUR ANSWER.
An excellent video! But I`m having some problems for connect the variables with the HMI, specifically with the graph, Please, Could you help me?
Thank you my friend, I've spent almost two days trying to configure the PID control without sucess. Now it's working......
How to show PID setting in HMI? Which the tag we can use?
I would like to inquire if you offer training online? What is your email sir? Doing a great job.
One of the best teacher you are Sir
Thanks so much. Finally put my PID test to work after a long (like seriously a loooong time) trying. But i have a question regarding not the PID itself but your test program (OB1). How do you take an integer from the HMI so you can select what option (Auto, Manual, PID, 0 Value) you want to work with? I was trying with the "Set bit in tag" event but all it was doing was taking the integer and using it as a power of 2 (For example, choosing the option with set as an 3, made the tag take a 8 value). Thank you beforehand
Hi, could you tell me how to change buttons size, in the curves? thanks
do you have a course?
What do you use to simulate the PID. Is it a Lsim function or something you wrote yourself?
Very Good Lesson. I have searched between videos for the program logic and Hmi screen for this video to apply it , I couldn't find them. Are they available ? I only could find the analogue input and output scaling but i couldnt find the program logic to operate PID. Thank you in advance.
Great Job Sir...superb explanation....Hates off to you... Thanks ..
thanks very much
Please example tunning cascade PID.
how to used redundant system in plc s7-1200 🙏
Sir, if I use PER input and output do I have to make a function block for both?
THIS GUY IS GANGSTER
thank you very much
Kindly explain how to make io field P, I, D value at HMI
hello i have this question let us assume that the pump wich fill the glass had a different behavior during time maybe it related by another store how will the pid treat that
Thank you for the incredible explanation !
Thanks for the video. How would you configure the runtime wincc
this video would be amazing if we had the previous setup video of all the "already prepared stuff".
If I remember correctly I made a livestream about just that!
Should be this one: ua-cam.com/video/Y41Joq-pGBQ/v-deo.html
Thanks a lot...i lerant so many things from your videos
You set 1 second instead of 1000ms on PID controller.
Thanks Alot ma for your great lessons..!
what was the video that shows how you created the code for this simulator. Thanks
Siemens made really great product, and you made it more easier to use! I never thought PID can be this easy in Siemens PLC. I guess now my fan operation is really depend on my intermediate relay's life.
your videos are god sent vielen danke bro
You are very welcome! Thanks!
Hello!
Great channel and videos! I have learned so much from you! I have a question: how should I configure cyclic interrupt to have 3 simultaneous Pid Compact? By example 3 tanks with different sensor values and set points?
I tried to include 3 pid compacts in one cyclic interrupt and also 3 cyclic interrupts with one pid compact each with different phase offsets. But didn't work. They all stuck and stopped controlling the outputs.
Thanks in advance!
Great explanation about pids. Thank you
thank you sir
Thanks😊
we miss u bro
Can i have the full project please?
very good video
Вы хороший учитель. Спасибо за видео.
Thank you Sir, I really like the way you explain and elaborate things in your videos
How can i have your course fro the start?
I like your vid. Thanks
NOTE ! IF YOU USE A 12XX PLC YOU CAN'T SIMULATE THE PID, YOU NEED A 15XX PLC...
thank you so much😇
Herzlich Dank
das war Klasse danke :)
Cheers mate. Your videos are very informative. All the best and keep passing the knowledge.
i love u so much, thanx teacher
that was a really nice video.
I had actually done a similar simulation while learning TIA Portal programming, but I always faced the problem of simulating the input (PV).
so I wanna ask, how did you manage to simulate the input to be proportional to the output but does not immediately follow it?
thanks in advance
You are the best instructor with regards to automation tools. They way you present is just awesome.....
Thank you awesome break down of how to use a PID
When I'm going to the tuning window, the online status of controller is showing the setpoint value but the input stays to 0. I can't start the PID on this window. Hence I'm changing the input in my simulation, it does not move in the tuning window (it moves fine on the PID ladder block). I did not program any "behaviour model" but it should still moves the input and the output right? I have 0 reaction of the controller...
Edit: can it be due to the ":P" next to my variable name? Because the input is an ID address form a high speed counter
Did you already find the problem? I have the same issue.
I don't remember sorry. It was for my master thesis one year ago
Ok
splendid video thank you .........
i tried to find in internet an information about the basic parameters for PID in case of (Pressure , Volume , heating ...) which should be used just as start parameters befor doing pre-tunning resp. fine-tunning . would guide me to some usefull resources especially for first time PID commissioning .???
Thx ®ards
The PID values vary depending on the application, but I advice you to test the values on a simulation model before implementering the control law on a physical system to avoid the potential of damaging components. As far as PID tuning goes, I recommend looking up the "Ziegler Nichols tuning method".
Yep, ZN is a pretty standard method of tuning your system. It is based on some mathmatical formula, which are not to difficult to apply. The strange thing is that they are also based on some "tested constants"... so basically not 100% accurate (which you can never actually get).
In the newest video of this series I show how you can use a "self tuning" method that is integrated in TIA Portal and newer PLC's that I prefer using rather than the manual ZN method