PID Best Programming Practices

I use one Periodic Task for each update rate. The different functions go into different Programs (separate Tag Databases and Routines) inside the Task.

If all of your loops are similar, and run at the same update rate, I say put them inside the same Task.
 
Careful with Periodic Tasks

I agree with Ken on this. You can create a lot of problems by using too many periodic tasks because they can cause overlapping of tasks which will prevent some things from getting processed. Periodic tasks can be useful but a lot of planning and scheduling has to be taken into account.

In my opinion the fewer the periodic tasks the better.
 
Good Points. My thought was that I am walking into a process that I'm not sure how it's going to react and isolating each PID in its own task would give me more flexibility.
 
I recommend using a single periodic task and slicing it. For example, let's say that your loop updated time is 250ms. Create a 50ms task with a counter that counts 1 to 5 (or 0 to 4 or whatever). Increment this timer on each call to the task. When the counter = 1 call the 1st pair of PID loops, when 2 the 2nd pair, and so on.

Good luck,
(8{)} :) .)
(Yosi)
 

Similar Topics

I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
603
I would like to compile a list of all the CX-Programmer PID Best Practices If there is some clever way you have figured out to do something and...
Replies
0
Views
673
Hi All, With AB RsLogix PID: What is the best way to reset the output to a specific value. For now i'm overwriting the PID.DATA[0] but i'm not...
Replies
9
Views
2,938
Hey fellas, First off I must I apologize for the length of my post. It's kind of a brain dump I kept adding to as I read through some Rockwell...
Replies
6
Views
14,098
Hi all, I have to install in my plant a new PLC that have a very important PID loop that always have to be running (...and also other...
Replies
0
Views
1,544
Back
Top Bottom