PID controller

jeb72

Member
Join Date
Jul 2013
Location
texas
Posts
16
Hello All,
I'm wondering if anyone can give me some tips on using a Compact Logix L32E
as a PID controller. I basically want to replace a Watlow ez-zone on a Wisconsin oven and program the PLC and an HMI to control the heating, i've never messed around with the pid function before so any thoughts, advice or insight would be greatly appreciated. This is just an off the radar, side project i'm dabbling with so, it's not a critical, urgent issue.

Thanks
 
Here are things I would think about....

Are you sure you are going to need PID control? Does the oven have an analog input to it of some sort for some sort of modulated control, or is it basically an on/off, i.e if your are under the specified heat level you turn it on, and if you are over you turn it off? You may not need PID. It is kind of hard to say from your description.

I just looked up that controller and it looks like it only comes with 750k memory. Depending on what you are doing that may not be a ton of memory. Are you only using one PID loop, assuming you need PID? What else are you controlling? If it is only PID you may be in great shape. If it is PID and a lot of other things, maybe not as much. Do you have a lot of communication overhead?

PID loops like to be VERY regular. I would advise putting all your PID loops into a periodic task that has the highest priority. That way they happen on schedule. Make sure your loop times and your periodic task time line up. Otherwise strange things will happen.

How fast is your process? If it is fairly slow, then consider making your PID loop update less often. That takes load off the processor, especially if you have a lot of overhead in communications and other things.

There are different flavors of PID control. If I were you I would learn something from control guru. com about how basic PID works if you don't know. Learn about how to tune a loop manually. Make sure you are at steady state in the ambient surroundings before you tune. Ask a lot of questions if you haven't done it much. There are a lot of people around here who know a lot about this stuff. Whatever you do, don't be one of those guys who goes in and thinks the autotuner is all that you need, assuming you use the PIDE vs the PID block. Or if you use outside software like control station, make sure you know enough to make sure it is giving you good results. Garbage in is garbage out. If your process is extremely slow you might be able to use the IMC control, but only if you know what you are doing. Make sure you understand open loop vs closed loop and how to operate the block you are going to use manually for tuning. Read about it and then read it again...and again..lather...rinse...repeat. PID tuning is really an art.

There are a lot of things that could be said, but you just have to start digging in and be more specific. Always ask if you don't know. And if the smart guys on here don't answer..bump until they do. Or if you have tech connect and a contract, use tech support. If you have it, take advantage of Rackwell's GOTC and process controls guys.

That's about all I can advise based on your current question. Good luck with it.
 
Been there done that.. there is an addon to rslogix called atune. It only does a first order approx (dead time plus rate) a good first start. But if you have a good trend tool you can just measure it off the trend. I think it was $800. Most autotune tools take more time to learn and setup than they are worth.
Rslogix is pretty good since it uses real numbers for the calc. Put the control is its own scheduled task set the update time to 4 to 10 seconds depending on your process. If your process is very slow or non linear be prepared to do some variable manipulation
 
I use Peter's autotuning program to check out manual results and to crosscheck things. It works well. He and Ron were two of the guys I meant when I said the super helpful guys on the forum. If you can use scilab, or matlab, you can really use their help and controlguru to come up with stuff that will save you from having to buy third party software like control station.

As a side note Peter, I did notice that the GUI has an issue where it doesn't carry the loop time constant all the way through to all the necessary subroutines utilizing the slider on the GUI, so you couldn't actually change how aggressive the response was. Or at least the code I got from deltamotion about 4 months back had that issue. It was easy to fix, as the code is easy to follow, and worked great once it was altered slightly. I am actually working to adapt and add other features in. Thanks for writing that and sharing it with others.

Jeb72, I would recommend if you are going to use Rockwell's autotune you check it by hand and with Peter's software. Scilab is free and checking it again will help. It never hurts to make sure. Going through Peter's code will also help with understanding using FOPDT models for the system and how to utilize math tools to minimize errors and so on.
 
alfman96, I am not partcularly proud of that program. It works well but I think I started it in 2005 and I can do so much better now. I did not write the HMI. Another engineer on LinkedIn, Bob Hines, wrote the HMI as a thank you for the command line version that I wrote.

If you have improvements that you are willing to share then let me know and I will add them and add your name to the list of contributors.

I am not a fan of Scilab. Scilab is a kludge. It I had to do it again I would use python. Python is object oriented and has a debugger. There are also libraries like scipy and numpy that make it possible to do the same thing as Scilab. Anything that python can't do I can easily write as long as it isn't a HMI. I might make time to learn PyQt
 
Peter, I think it is a good base. It was especially helpful for seeing how things are done in scilab when buying matlab wasn't an option. If I can get any improvements off the ground I will certainly forward them. :)

I really wish I knew python. I think it is a huge mistake that it wasn't taught as part of the curriculum where I did my undergrad and graduate work in controls. I need to make it something I learn in my free time. My abundant free time. haha. It is somewhat a bummer that engineering schools by and large focus on using tools like matlab, which are really cheap when you are in school, and cost more than anyone can afford on their own when you get out, and make that the basis for solving equations when there are good tools like Python out there.
 

Similar Topics

I have an old Chinese Temperature PID controller XMT 8038c2kp that am able to send and receive requests via Modbus poll test center in this format...
Replies
0
Views
441
I have a question regarding the features of the so called incremental (velocity) form of the PID controller. As far as I understand this form in...
Replies
14
Views
2,515
Hi - I have an application where there is an option to use a PID loop embedded in the Transmitter to directly control (via 4-20mA output from the...
Replies
4
Views
1,069
Hi All, I have a PID control application that I would like to get your opinions on. As I am reality new to PID loops I am struggling somewhat...
Replies
14
Views
4,276
Hello, I have been developing a library of function blocks. One of the developed function blocks is the PID controller. I have created a Simulink...
Replies
7
Views
2,987
Back
Top Bottom