Sign in to follow this  
Followers 0
mikey431

micrologix PID loop

8 posts in this topic

I am working on an old program and trying to figure out why the previous programmer do certain things on heater PID loop block of an A-B Micrologix 1200.And I am pretty new on this stuff so stick with me. The first thing I dont understand is PID mode. I can see through the ladder that the Td is set at 1.15 on PID block but the mode is set at STI but i could not find any STI sub-routine and S:30 word value is 0.I do know if using the Timed mode, the timer need to be set so that the PID block is scanned at the rate that is set by the timer.However, I do not know the advantage of Timed over STI mode and why he does not have a sub-rountine to control Td. The second question is the loop output signal. The heater loop output ( 0- 100%) is scaled to match the 4-20 mA analog output signal which then is fed to an SCR and send power to heater. I dont know why he has to use this 0-100% output instead of feeding the loop control variable (CV) directly to the 4-20 ma output.I read couple tutor guides on the net and I believe that since the CV has higher resolution then the 0-100% output loop, feeding the CV to analog output will give better heater control. However, I am new to these stuff so I am not sure ...Hope someone can give me some insight on these topic....

Share this post


Link to post
Share on other sites
You are correct. The CV has a higher resolution. The output perecent word only gives you the nearest integer value 0-100% and was intended for information. Directing the CV to the output (properly scaled) would be better. Edited by Alaric

Share this post


Link to post
Share on other sites
I can’t say for sure without knowing more (actually ALL) about your system - but here’s something for you to think about ... the output of the PID (the CV) will always range from 0 to 16383 ... now assuming (gosh I hate that word) that you’re using a 1762-IF2OF2 for your analog input and output, there are basically two ways to go ... the module MIGHT be set up for “Raw/Proportional” - or it MIGHT be set up for “Scaled for PID” ... IF (big IF) it’s set for “Scaled for PID” then most programmers would indeed set the PID’s CV setting to go directly to the analog output address ... most programmers would consider the use of the PID’s internal “Control Output CV (%)” value as a step in the wrong direction ... specifically, (as you mentioned) instead of having about 16383 steps of resolution, your system APPEARS to have only 100 steps of resolution ... (my distinguished colleague Peter Nachtwey is NOT going to like that situation) ... now STOP and think about this - before you DO something to the system ... it might seem natural to go right out and “fix” some of the things that I’ve just mentioned ... do NOT do that ... the system is “sort-of-kind-of” working ok, right? ... if you rush out and change the set up, even in the RIGHT direction, then you’re probably (almost assuredly) going to have to retune it ... that could be very time consuming ... I’d recommend that you leave things the way they are until we’ve had time to go further with this discussion ... and I REALLY do recommend (strongly) that you post your .RSS file ... also, you might want to read this post ... and be sure to read the next post in that same thread - especially the part about Bubba’s paycheck ... I’ve used that same analogy on my students for several years now - and it seems to help them understand how the PID’s “trigger” (or lack thereof) can affect the PID tuning adjustments better than anything else I’ve tried ... also there are several basic PID papers that I’ve written on our company’s website ... yes, I know that the website is a wreck - the kid that got paid to “fix” it didn’t do such a great job ... anyway click the link under my signature (below) and go to the “Sample Programs” area ... you can find the same PID material by searching my name and “PID” on the various forums - but the website postings are in an easy to print .PDF format ... PS Edit ... and it looks like my distinguished colleague Alaric has beaten me to the punch again ... sorry for the duplication ...

Share this post


Link to post
Share on other sites
But, as usual Ron, you have a gift for presenting through yet simple to understand explanations and easy to follow instruction. Keep up the good work.

Share this post


Link to post
Share on other sites
ony my first question, I meant Time mode.Sorry for the confusion. Here is my RSS file. The original program has more code in there but I deleted other non-related stuff. Hope you dont mind. Heater_Loop.RSS

Share this post


Link to post
Share on other sites
Like my distinguished collegue Ron indicated, it appears that the programmer has made a common error. There is no STI configured. PD14:0 is addressed in Ladder 9 and ladder 9 is a regular subroutine called from rung 2:4. However, PD14:0 is configured to run in STI mode rather than timed mode. This is not good. However, as Ron indicated, you may not want to go changing everything right away. But there are some things that need to be fixed. In STI mode the PID updates its output everytime it is scanned - from looking at the status file this is somewhere between every 4 and 5 milliseconds rather than the .12 seconds the original programmer thought he was setting up. But it you go making changes right away then the loop will have to be retuned. The answer to the question "How well does this perform right now?" would be helpful. Edited by Alaric

Share this post


Link to post
Share on other sites
Like you guys suspect, it kinda work but it just sluggish and the feedback i got from the service guys is the system sometimes overshoot on startup...I suspect the time mode may have something to do with it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0