SLC 500 5/03 PID loops

chrisflint

Member
Join Date
Aug 2005
Location
Norfolk
Posts
22
Hi All, I have the slc 500 5/03 and want to know how many PID loops I can have? I have 12 rooms I want to control heating to and have 12 RTD inputs lots of digital i/o's and a few analog i/o's. Radiator control would be via motor valves and thermo-electric valves. any help would be most welcome.
Regards Chris
 
With a quick glance through my SLC manual, I see no specific limitation on the number of PID instructions you can have in your program. If you check out that section, you will note the instruction requires a good deal of data storage. I would figure that any limitation would be a matter of how much memory your 03 has. The processor is up to the challenge, given that you are.
 
Its the 16k version, looking in the reference guide it looks quite a task to say the least! am I being silly or would this be a valid project? is there any sample project files anywher that I could look at to get an idea?
 
It shouldn't be too much trouble, once you have one loop just copy and paste. Put each PID loop in its own subroutine and copy the subroutines. Then change the i/o bits to suit. I have done an HVAC system with 4 VSD fans and 16 motor controlled dampers. After the first couple it just got tedious. This had 20 PID blocks. Using a SLC 5/05 32K but I had plenty of memory left. I don't have a file available now but I may be able to post one later. The hardest part is converting PID block output into a useful valve position signal. I didn't have this problem with ths dampers as they had an analog position input. To do it with a motorised valve you need to use a timer and an up/down counter to convert the PID integer output into valve position.

Use the timer to give a 1 sec pulse and set the counter to more than the open/close time of the motorised valve. Use the counter to act as a "follower" to the motorised valve; e.g. if the PID block calls for 50% then set the open signal to on and start counting up until the counter reaches 50 then set the open signal off and stop the counter. If the PID calls for 25% the set the close signal to on and count down until 25 is reached. Get my drift here? The PID block will eventually compensate for any errors between the counter and the actual valve position. If the valve has a closed or open feedback signal then reset the counter when this is on.
 
Looks like your system controlling 16 seperate areas must have had at least 16 RTD or 4-20mA loops for feedback for the motor dampers! I will only be using 12 PID blocks as the boiler has its own controller I would just issue a fire / no fire contact. as far as the motor valves are concerned they are open or closed so I would convert the CV to on and off periods. If you can post your file at a later time I would be most gratefull as it is similar to what I need to achieve
 
Hello noticed you mention a manual on slc 500 can you point me in the right direction - ie vendor or download site as i need a manual
thanks in advance..
bill.(new to plc's )
 
If I recall correctly, the SLC PID instruction requires 25 words (23 for the instruction block, 1 for the PV and 1 for the CV).

In the SLC I usually created a dedicated file for each PID. If you use this method you can have 247 PIDs and use just 6K words for data. But that many PIDs would really slow down a processor.

If you allow each file to store multiple PID blocks then you can accomodate more PIDs than you would care to have a single processor handle.

The SLC5/03 will have no problems with 12-16 PIDs, especially the ones you described which will have very long loop update periods.

I recommend you create a CSV file in Excel and create an address comment template and then import that template for each of the PID control blocks so you have a quick reference to what each element in the block does. Better yet, I have one already made, I'll try and upload it in a bit.
 
Last edited:
Wow 247 PID's I thought the SLC was good kit! this is quite a challenge for me as I am just getting into the SLC and PID, What a way to start! If you do upload the file that would be excellent, I'm sure it will give me a bump start.
 
chrisflint said:
Wow 247 PID's I thought the SLC was good kit! this is quite a challenge for me as I am just getting into the SLC and PID, What a way to start! If you do upload the file that would be excellent, I'm sure it will give me a bump start.

I hope I didn't mislead you. I didn't mean that you could get the processor to efficiently execute that many PIDs at once as a matter of practicality, but that memory and instruction set could handle that many and more. PIDs are CPU resource monsters.

Here is that XLS file I promised earlier. In column A you need to replace the addresses (N209 in the file I uploaded) with the file addresses of the PID blocks you set up. BTW, Excel's auto-fill feature will work with AB PLC addresses. If you create one data file per loop, then you can just do a search and replace in column A on just the file identifier (N209). I usually fill the fifth line description column with the name of the PID loop.

This spreadsheet is set up so that any description line that is over 20 chars long will be highlighted in yellow - so shorten the description if you see yellow.

Once everything is entered, delete the top row and save it as a CSV file. Then you can import the CSV file into RSLogix500 at TOOLS->DATABASE->ASCII IMPORT->CSV and viola, easy address comments.

(edit) I usually place the Loops CV and PV words right at the end of the PID control block and the spreadsheet reflects that. If you locate them elsewhere, adjust the addresses accordingly.
 
Last edited:
Alaric

I don't know AB Rockwell kit at all well, but if they've got an entire PID algorithm in to 25 words that has got to be the most economical programming on the face of the planet! I know Siemens S7 much better and their basic PID controller (Function Block FB41) will occupy 1462 bytes (731 'words') plus 162 bytes (81 'words') for each instance data block.

To create 247 unique PID loops would take 1462 + (247*162)= 41476 bytes = 20788 words. And you reckon you can do it in 6K!?!?!
Somehow, I don't think we're comparing apples and apples ...
What am I missing?

Regards

Ken
 
Ken, thanks for the inquiry. First off in reply, comparing the SLC5/03 to an S7 really is apples and oranges, in fact its like comparing a shrivelled dried crab apple to a nice fat juicy navel orange.

The PID instruction in the SLC-500 is a pretty basic integer based (no floating point) instruction with only minimal alarming and no bells and whistles whatsoever. By comparisson the Modicon 984 PID uses just 21 words.

Compare that to the enhanced PID instruction in the Control Logix, which is probably closer in memory size to the one in your S7 (The CLX also has multiple variations of PID instructions)

I've successfully done temperature control with the SLCs pid instruciton without modification, but in order to do pressure control I had to add a lot of extra code. Any PV, ROC, CV limiting, bumbless transfer, cascading, manual control of CV, I-term manipulation, etc, all require lots of extra coding on the SLC.

I suspect that ChrisFlint's application will not need a lot of fancy PID enhancements and the SLC will handle it just fine.

The SLC also counts memory in 16 bit words, while the S7 is a 32 bit PLC. So when comparing the SLC to a 32 bit machine, multiply the size by 4. IOW, a SLC style low end PID control block on a 32 bit machine would take up 96 bytes.
 
Last edited:
Alaric, No you haven't misled me, I am sure I can put this SLC to good use controlling my heating. The programming looks complicated enough on the SLC, Glad to say I am not using the S7! just installed Excel so tonight I will try out some PID programming. Would I start at say N10 and keep climbing to say N40, N70 etc. etc. If any one has a complete *.rss file with PID that would help me.
 
chrisflint

Keep in mind what else you want to do with the proc. If you are going to want a "log" of high and low temps or calculate boiler runtime that can be converted to fuel useage and project when its time to refill and calculate the cost.

There is so much you can do.
Think about the entire picture of what you will eventually want so you don't have to rework the program later.

Given that, You may consider since the pid loop update will be a fairly long time that sequencing each zone through one pid may save some space with the same results and without the tedious copy/paste-readdress. Just sequncing the info and mapping it correctly. Definetly could save alot of space and could be a good exersize in indirect/indexed addressing.


Just a thought!

Drewcrew6
 

Similar Topics

How can I test some PID code I have written for a SLC-500 in RSLogix500, without having an actual processor to test on. I have used Emulate500 to...
Replies
3
Views
1,826
Hello, I have a PID block in my program controlling pump speed in order to get a correct Differential pressure. The way I have it set up is the...
Replies
3
Views
1,250
I have a PID in a SLC 500 that does not function as it should. Have deleted it remade it and still have a problem also moved it up and down in the...
Replies
13
Views
2,736
I am new to the SLC 500 platform and am hoping that someone can give me some hints on how to do PID and ramp/soak with the SLC 500 and perhaps...
Replies
11
Views
6,621
Please Help me to make this PID working. I had done PID according to AB manual but it is not working. when I am manully changing the CV at setup...
Replies
6
Views
7,556
Back
Top Bottom