ControlLogix PID code critique.....

Paullys50

Lifetime Supporting Member
Join Date
Jan 2006
Location
WI
Posts
2,188
Hello all, working on my first adventure into PIDs, done a lot of searching, learned alot, and now I would like you to check my logic to make sure I'm on track (if you don't mind that is...)

Quick summary, just need to control temp with one heater. Airflow is constant into the zone I'm trying to control.

There are three states:
1 - Heat is off, PID is off, output signal fixed at 0
2 - Heat is on, ramping to 80% of temp SP, PID is off, output signal fixed at 100%
3 - Heat is on, ramping is off, PID is on.

I'll ask a few PID tuning questions after my logic gets a passing grade!
 
Looks ok. i am no expert though.

so can i ask a question too about this logic

will the PID instruction override the MOV's for putting the setpoint to 100 and 0. I would have put them after the PID instruction so they were executed after the PID.

post some screen shots of the setup screen, a lot of info there to on how this instruction works.
 
The PID enable timer needs a closed contact off of its done bit so that the timer resets or (oops didnt see your res instruction) you can put the loop in a periodic task.

There may be an issue with zone1ramp_active. I would seal in the les block on that rung to hold the output on until the temperature is a couple degrees higher in case the loop takes over and is a little slow.
If the temp drops at first when the loop takes over the swm might get stuck in an on off loop.
but it might not I may be over analyzing it. imagine that lol
 
I'm not sure why you are keeping power at 100% to 80% setpoint? Is this a process requirement? Or is it something you are doing to try and achieve maximum heating rate? If its the latter, then I would think that proper selection of PID gains would accomplish the same thing.

Also, I recommend moving this to a 500mS periodic task, eliminiating Zn_1_Tmr and the XIC Zn_1_Tmr.Dn instruction on the rung 23. The execution period will be more consistent that way.
 
Thanks for the feedback, I'll use the periodic task.

The process requires the oven to retain +/- .5 deg c of the setpoint. Product does not enter the oven until the this setpoint is achieved and retained for 30 min (via process engineer). Reasoning for the ramp is to reach this setpoint faster, but use the PID to fine tune the temp to the setpoint.

Now that I've thought more about it I think during startup I'll just move a high gain value into the PID and once I'm at 80% drop it down.
 

Similar Topics

Morning all, Could anyone shed some light on whats happening with my PID Loop? On our plant we have a 'fast ramp' on the PID Instruction done...
Replies
14
Views
7,653
Hello, I have a PID that I am using for an oxygen valve that regulates the pressure. Often when the header pressure is too low, the output will...
Replies
4
Views
1,296
Hello all, I have a pump that has operational limits 15-100% Speed (9-60Hz). 1. On the PID instruction would you limit (.MINO=15% and...
Replies
21
Views
5,190
Why is my PID .PV (Process Variable) getting continually overwritten with some strange value every time the rung my PID Instruction is on goes...
Replies
4
Views
2,139
Hi there, I have a PID which I limit at MINO = 25% and MAXO = 100%. When the PID runs for the first time it takes time to start reacting at 25+%...
Replies
3
Views
3,075
Back
Top Bottom