learning PID for Allen-Bradley ...

Ron Beaufort

Lifetime Supporting Member
Join Date
Jul 2002
Location
Charleston, SC
Posts
5,701
Greetings to all,

I got an interesting phone call the other night from our new friend Naeem in Lahore, Pakistan ... we met Naeem (roomi177) in this thread ... it seems that he wants to learn about Allen-Bradley PID control ... I agreed to help as much as I can – and as often as my schedule will allow ... and then right after we hung up I instantly thought of several questions that I should have asked him while we were on the phone ...

and so to Naeem:

question 1: why do you want to learn this material? ... I’ll assume (gosh I hate that word) that it’s because you hope to eventually profit financially from the knowledge ... and that’s an EXCELLENT reason – something that we can all identify with ... if you have any other reason, please let me know ... that might (or might not) change the way we proceed with this project ...

question 2: which Allen-Bradley platform do you want to concentrate on – at least in the beginning? ... there are four basic ones to choose from:

(1) the Allen-Bradley PLC-5 family
(2) the Allen-Bradley SLC-500 family
(3) the Allen-Bradley MicroLogix family
(4) the Allen-Bradley ControlLogix family

all of these families have at least some models that are capable of doing PID control ... here are some of the issues to consider in making your decision ...

(1) the Allen-Bradley PLC-5 family ... this technology has been around for about 20 years or so ... it’s a tried-and-proven family and (at least in my neighborhood) there are tons of this stuff still installed and reliably controlling right along ... steel mills and paper mills and other heavy industries feel more comfortable with the “solid” look and feel of this older equipment ... the bad news is that it’s expensive to buy brand new hardware for this larger and sturdier platform ... the good news is that it’s been around so long that a lot of the hardware is available used – and in some cases (joy of joys) you can occasionally find it actually being given away for free

... the biggest issue that you’ll face if you decide to use the PLC-5 platform will probably be in obtaining the PLC hardware and the software to program it ... the minimum hardware requirements to do realistic PID experiments will be a processor, a chassis, a power supply, an analog input module, and an analog output module ... make sure that the processor is an “enhanced” model ... specifically, do NOT buy a PLC-5/15 or a PLC-5/25 processor ... these are generally much cheaper ... but the only way to communicate with them for programming purposes is through a DH+ (Data Highway Plus) connection ... that connection alone will probably cost about $1,000 – even for “used” equipment ... on the other hand, if you stay with an enhanced processor, you can do all of your programming through the PLC’s built-in serial port with a cable that you can make yourself for about $5 ... secret handshake: the PLC-5/20 is an enhanced model ... so why is the higher numbered PLC-5/25 NOT an enhanced? ... no one knows ... but a PLC-5/20 or anything above a PLC-5/25 is probably ok ... the software that you’ll need for the PLC-5 family is RSLogix5 ... the cost is about $3,500 for a licensed legal copy ...

(2) the Allen-Bradley SLC-500 family ... this platform has been around for about 15 years or so ... the basic idea is that it’s supposed to do the same controlling functions as the larger PLC-5 family for approximately one-third the cost ... there are still lots of this stuff in use too ... if you’re going to choose this platform, I’d recommend that you get at least an SLC-5/03 processor or higher ... anything less than that will either not do PID at all – or its PID capabilities will be very limited ... the minimum hardware requirements to do realistic PID experiments will be a processor, a chassis, a power supply, an analog input module, and an analog output module ... but ... the SLC platform does have a “combination” type analog module available which provides both inputs and outputs in one unit ... if the extra money is available, I’d suggest an SLC-5/05 processor ... that model will provide built-in Ethernet capability and make it faster and easier to gather and log the real-time PID data on your programming computer ... the software that you’ll need for the SLC-500 family is RSLogix500 ... bigger number – but smaller price ... the cost is about $1,100 for a licensed legal copy ...

(3) the Allen-Bradley MicroLogix family ... even though some of these (but not all) are capable of doing PID control, I do not recommend that you start out learning the subject on this platform ... one big reason is that they don’t allow online programming ... so you’ll find yourself having to shut down the system over and over in order to make changes to the program ... the software is RSLogix500 (same as for the SLC-500 line) but this time you could get by with the “starter” version ... the cost is about $500 ... even though the MicroLogix might be the cheapest way to get into the Allen-Bradley PID game, I don’t recommend this path unless you’re only doing this PID thing for the mental challenge and personal satisfaction involved ... basic idea: a prospective employer is probably going to be “less-than-impressed” with your PID expertise if the only platform that you can brag about is the tiny MicroLogix ... steel mills and paper mills, etc. usually have little or no use for this platform – if for no other reason than the fact that they simply can’t afford to keep shutting down their manufacturing processes to make programming changes ...

(4) the Allen-Bradley ControlLogix family ... this is Allen-Bradley’s newest line ... eventually it will (so they say) completely replace the PLC-5 and the SLC-500 platforms ... (and I’ve been hearing that “kilometers and liters” are going to completely replace “miles and gallons” since I was in the fourth grade too – and I’m still waiting) ... but the ControlLogix is a solution (or some people would say a “problem”) that is definitely not going to go away ... here again, the minimum hardware requirements to do realistic PID experiments will be a processor, a chassis, a power supply, an analog input module, and an analog output module ... the list prices will GENERALLY be slightly more than for the SLC-500 – but less than the equivalent PLC-5 prices ... the software is RSLogix5000 ... it’s been awhile since I’ve seen a price on this one – but I think that it’s about $2,500 ...

so that’s the basic rundown on the various platforms ... right now you’ve got to be asking yourself: “so is learning PID on one platform all that different from learning on another?” ... yes, it is ... now “tuning the loop” is pretty much the same (but not exactly) from one platform to the other ... but the biggest issue will be in how to get the analog field signals into and out of the system ... the PLC-5 uses Block Transfer Reads and Writes to move the analog signals in and out ... the SLC-500 and ControlLogix platforms do not ... the PID instructions on the PLC-5 and the ControlLogix platforms offer many more choices and options that the smaller SLC-500 systems don’t even have available ... also the PID instruction’s inputs and outputs must be scaled to different ranges when working with the various types of processors ...

so ... which platform should you choose? ... I suggest that you make that decision based on what would likely be the most profitable path in the future ... specifically, if I were in your shoes, I’d start by asking around at some of the businesses where I might hope to eventually market my PID skills ... for example: I’d go to the paper mill, to the steel mill, to the chemical plants, to the cement plants, and to any other place where I thought (or hoped) that I might have some chance of working on Allen-Bradley PID control ... and I’d ask them what types of platforms they’re currently using – and what they plan to be using in the foreseeable future ... basic idea: whatever you learn about PID on one platform will certainly be of some amount of benefit on any other platform ... but ... if given a choice, why would you spend your time, money, and effort learning on the “wrong” platform? ...

continued in next post ...
 
continued from previous post ...

suggested plan of attack (based solely on what I know to be the conditions in my own locality) ... personally, I’d pick up the following PLC-5 hardware:

(1) a PLC-5/20 (or better) processor (but NOT a PLC-5/25) ... if you get a choice, a PLC-5/20E (note the “E” with NO separating “/” slash character) will give you built-in Ethernet capability ... but any PLC-5 “enhanced” processor will easily satisfy your “I-want-to-learn-PID” requirements ...

(2) a 1771-A2B chassis – you don’t really need all 8 slots – but they’ll come in handy when you want to add additional modules to your system in the future ...

(3) a 1771-P4S power supply (or equivalent) ...

(4) a 1771-IFE analog input module ... this will not accept thermocouples without having a suitable thermocouple transmitter ... but this module will accept both analog milliamp current inputs and DC analog voltage inputs ... this will be much more flexible in the future than locking yourself into a “thermocouple-only” module such as a 1771-IXE ...

(5) a 1771-OFE2 analog output module ... this is a “4 to 20 milliamp current” only model ... note: the “IFE” input module will handle either current or voltage ... on the other hand, the “OFE” output module must be carefully specified to match the type of load (either milliamps or current) that you will be driving ... the last number on the end of the catalog number specifies the type of output ...

(6) a copy of RSLogix5 programming software

(7) an Omega PCM-1 pulse control module ... this will accept the 4 to 20 milliamp output from the PLC and turn it into an on-off pulse train output ...

(8) an Omega SSR240DC25 solid state relay ... the PCM-1 listed above will mount right on to this ... the solid state relay will turn your load off and on ... if you think that someday you might want to control a larger load than the recommended soldering iron, then consider getting a heat sink for this relay ...

note: many people will tell you that you don’t really need the analog output module – or the PCM – or the solid state relay ... you can program the PLC to perform the “pulse train” feature with a time-proportional signal and then use a much cheaper “digital/discrete” output module for your PID output signal instead ... this is perfectly true ... but remember that I’m basing this “suggested” list on my local industry conditions ... I know (without a doubt) that the decision-makers in the local industries around Charleston, SC would NOT be impressed by my ability to “work around” a standard 4 to 20 milliamp output from a “real-live-honest-to-goodness” analog output module ... so it’s true that the PID instruction won’t know the difference – but my prospective employers surely would ... but of course your local industries might be different ... it would pay to ask them ...

(9) a type “J” thermocouple ... actually, you can save some money here by just buying a length of type “J” thermocouple lead wire ... strip the ends of the leads and twist them together and you’ll have an inexpensive homemade thermocouple ... it will last longer if you silver braze the twisted connection ... anyone who services air-conditioning equipment should be able to do this brazing step for you ... note: most air-conditioning people call this “silver soldering” where I come from ...

(10) a type-J thermocouple transmitter ... the one I use on the Hotrod is a Wilkerson model SR2401 with a range of 0 to 500 degrees F ... or any equivalent brand and model will work ... for example: an Omega TX52-J2 thermocouple transmitter has a -148 to 572 degree Fahrenheit range and should be suitable for just about any “bench top” PID experiment ...

note: NONE of the list I’ve given above is engraved in stone ... I’ve only intended to show enough examples to get you started ... basically these are items that I’ve used on the Hotrod – so I’m familiar with them and I know that they work together ... other forum members may make alternative suggestions ... I recommend that you consider them all before you make your purchases ...

(11) a suitable bench top process to control – I’d suggest something like the Hotrod ... it doesn’t have to be as involved as the real Hotrod as shown in this picture ...

you can obtain much of the same functionality by removing the tip from a 25-watt soldering iron and replacing it with a one-inch long screw ... (the length of the screw will determine the system deadtime – you’ll want about 45 to 60 seconds for the most realistic experiments) ... secure the thermocouple to the head of the screw with a nut and a couple of washers ... wrap the screw in some fiberglass (attic) insulation to reduce the heat loss between the heater and the thermocouple ... use a suitable bracket to mount the soldering iron on a piece of plywood (remember your high-school science-fair experiments?) ... and mount a small computer fan to blow across the heating element ... now you can vary the load on the system by manually blocking the fan’s intake with smaller or larger pieces of cardboard ... bingo! ... Son-of-Hotrod is born ...

another idea for an inexpensive “bench top process” is a small immersion-type “cup heater” ... this is basically a heating element on the end of an electrical cord ... you stick the element in a cup of water – and four or five minutes later it’s boiling hot and ready to make tea or coffee ... once again, the computer fan blowing across the cup would make decent load on the system ... or drop in an ice cube to really provide a challenge ... just make sure that you don’t ever let the water boil completely away ... the heater won’t last more than a few seconds if you let it “dry fire” ... the problem with the “cup heater” idea is likely be the system’s response time ... your tuning experiments will probably require much more time to complete ... the Hotrod has less thermal mass and works better for student exercises ...

another idea is to use a computer “simulation” of a process ... in this case you wouldn’t need any analog input or output devices at all ... just the PLC processor, chassis, power supply, communications cable, and the programming software ... if you decide to follow this route, then I strongly suggest that you search for some of the posts on this forum which have been made by my distinguished colleague, Mr. Peter Nachtwey ... you mentioned in our phone conversation that math is one of your favorite subjects ... I suspect that you and Peter will get along just fine ... I’ve always envied his obvious expertise in this area ...

however you decide to proceed with the hardware and software end of this project, it would probably be a good idea to post a list of the parts you’re planning to purchase BEFORE you make a commitment ... I (and the other forum members) will be glad to take a look at your list and tell you whether all of the parts will fit together or not ...

continued in next post ...
 
Last edited:
continued from previous post ...

“big picture” ideas: personally I divide this subject of programming Allen-Bradley PID control into four basic functional areas ...



(1) connect the analog input and output signals to the PLC ... get these working and properly scaled for the PID ... make sure that you can manually control the field output from the PLC’s data table ... and that you can monitor the field input on the PLC’s data table ...



(2) insert the program rung for the PID instruction ... take care of any external “trigger” that your particular processor platform may require ... (hint: the SLC platform never uses an external trigger on its PID rung – the other processors generally do) ... enter a “just-getting-started” value of about 1.00 or 2.00 for the Proportional setting (Kc) and make sure that the PID is trying to control in the proper direction ... specifically, when the PV (input) goes up – should (and does) the CV (output) go down? – or should it go up also? ... basic idea: a heating application works one way – a cooling application works the other ...



(3) tune the PID loop for optimum response ... we could devote an entire textbook to this one single step ... learning PID is sort of like learning to play chess ... you can learn how to make the moves in less than an hour – and then spend the rest of your life getting good at it (or at least trying to get “good enough”) ...



(4) program all of the other stuff associated with the PID ... how does the system operator select between the manual and the automatic mode? ... how does he input the desired setpoints – and the manual control settings? ... what about programming alarms if something goes wrong? ...



finally ... I enjoyed our phone conversation the other night ... it’s not often that I get phone calls from Pakistan at 1:00 in the morning ... (and luckily I was right by the phone - still up and happily working away on a new ControlLogix project) ... I hope that the information above is helpful ... basically I am more than willing to do my best to help you with your “learning PID” project - as much as time and circumstances will allow ... the next step is for you to come up with the PLC hardware and software and a suitable process on which to practice your control experiments ... let me know how that turns out and we’ll continue on from there ... and please – let’s keep all of our work on this project in this one thread ... if we do this correctly, this could turn out to be a good resource for a lot of people in the future ... I look forward to working on this project with you ...
 
Last edited:
thanks, bio ... but hopefully we're just getting started with this ... let's see which way Naeem wants to go with it ... any other takers? ...
 
Dear Sir,

Thank you for taking your time out and giving me such a detailed reply. I usually call in Houston when I arrive in the office and 9 A.M Pakistan Time means that its 11 P.M in the Houston and I really didn't had any idea that it would be 1 A.M in your part of the country. So once again I am really very sorry and I will definitely take care of the time issue.

question 1: why do you want to learn this material? ... I'll assume (gosh I hate that word) that it's because you hope to eventually profit financially from the knowledge ...

Well Sir, I am an Electrical Engineer and I want to take this I & C field as a professional. I have got almost two years of the HVAC Industry Experience and during that period I worked on ODS (Ozone Depleting Substances) Phase Out Project from my organization with the World Bank. I mostly took care of the Procurement issues as well as some of the documentation, like preparation of the BAR (Bid Analysis Reports), Issuance of P.O and negotiations with different vendors of the project. You get inspirations from different people or some events, I was inspired by the people who worked for the commissioning of the project. That's what made me learn all this stuff. It will not just improve my knowledge but eventually it will also benefit me financially.

I also remember, you said that people often work very hard for some simple things because their direction is wrong and I hope that I am headed in the right direction.

question 2: which Allen-Bradley platform do you want to concentrate on - at least in the beginning? ... there are four basic ones to choose from:

I downloaded all of the stuff from your site about Scaling of the Analog Inputs and really enjoyed that approach. Now the good thing about that stuff is that it explains how to use the BTR & BTW commands for scaling the analog inputs of the PLC-5 as well as scaling without the scale command as some processors don't have the SCP or any scale command. Using this Multiply first and then divide approach I can use any Allen Bradley processor and that's what I liked about it. Based on that I would like to use a common approach for the PID loops too. But that doesn't mean that I will not use the BTW or BTR or SCP commands, all I am saying is that I just want to have a common method for any of the A.B processor I use for the PID loops. I hope that I have cleared my point of view.

You said " the next step is for you to come up with the PLC hardware and software and a suitable process on which to practice your control experiments ... "

Although I would love to work on all the Processors but to get started I can arrange the following hardware and software.

1. SLC-5/05 Processor
2. 1771-A2B Chassis
3. 1771-P4S Power Supply
4. 1771-IFE analog input module
5. 1771-OFE2 analog output module
6. RSLogix 500 programming software
7. Omega PCM-1 Pulse control module
8. Omega SSR240DC25 SSR
9. J-type thermocouple lead
10. J-type thrmocouple transmitter Omega TX52-J2
11. Son of Hotroad J

I wish I could have taken a few courses of the Allen Bradley PLCs from you. But never mind I am sure that this online help will give me enough material to continue my work.

Thanks and regards,

Naeem.
 
Greetings Naeem,



we need to talk about the list that you posted ... items 2 through 5 are wrong ... specifically, the 1771-type hardware will not “fit” the SLC-type processor - or the RSLogix500 software ...



if you want to stay with the SLC-5/05 processor, that’s perfectly alright ... actually this will make our project much simpler than working with the older PLC-5 ... but you should change your parts list to provide I/O that will work with the physically smaller SLC system ... the 1771-type hardware is physically bigger and the pieces will NOT connect together ... I suggest the following 1746-type hardware:



2. 1746-A4 chassis - or larger

3. 1746-P2 power supply - or larger

4. 1746-NI4 analog input module

5. 1746-NO4I analog output (current) module



I hope that you haven’t already placed any orders for the incorrect parts ... I’m sorry that I couldn’t answer this sooner ... we had a very bad lightning storm here yesterday ... the telephone/internet cable company has just finished repairing our connection ...
 
Dear Sir,
Thank you for your reply. I was waiting for a confirmation of the listed items. I have now placed a purchase order for these modules.
In the mean time lets discuss the wiring & programing of the project.
Regards,
Naeem.
 
Greetings Naeem,



your last post didn’t specify exactly which modules you have ordered ... I’ll assume (gosh I hate that word) that you meant to say the 1746-type analog input and output modules that I recommended ... in that case, you can find the wiring diagrams in this book on the Allen-Bradley website ... if you'll draw up a wiring diagram and post it, then I (and any other interested members) will be glad to take a look at it and offer corrections - if any are necessary ...
 

Similar Topics

Hi everyone, I am interested in learning about PID Loops. I have not used one in any of my programming yet but want to be ready should it come...
Replies
4
Views
2,078
Good day, I have been wanting to get a better understanding of PID controllers. I don't deal with them often where I work. Since I don't do...
Replies
0
Views
1,719
Hello all. Kinda-Sorta related to PLCs, but does anyone know a good place to learn about PID loops, applications, and tuning? I have a very small...
Replies
20
Views
5,358
Have this assignment and Im pretty green on PID.. A START pushbutton is connected up to start the program, which should immediately cause the...
Replies
3
Views
1,716
I've gotten to the learning curve where I can program a call for pump to come on at set point but I'm not sure how to turn the same pump off when...
Replies
0
Views
23
Back
Top Bottom