Sign in to follow this  
Followers 0
IamJon

To P or not to P

6 posts in this topic

I know, I feel like I'm spamming this site this week... I'm setting up a program for Proportional control using the PID instruction. - Level Rising At a raw value of 442 I want the Lead to come on at 75%. It will rise with the level until it is 100% speed at 479. The Lag will come on at 489 and run at 100%. 3rd pump comes on at 535 across the line start. - Level Falling 3rd pump stops at 510. Lag stops at 479. Lead starts coming down from 100% at 479, hits 75% at 442. Lead shuts off at 229. I have my file attached. The PID is under PUMP CNTRL file. My level setpoints are under LVL CNTRL. I would like my PID settings to be checked to verify if they are correct, and to verify that my latching and unlatching for the level control won't be fighting each other. It looks good to me but I'd like a second pair of eyes. Thank you! ROAD_PS_PID.RSS Edited by IamJon

Share this post


Link to post
Share on other sites
Does this mean that you got it running Friday? I only took a brief look earlier, but my first thought was that you were working too hard. Anyway, a few comments: Subroutines - You've got the right start on organization, but I suggest not nesting your subroutine calls or you'll hit the 8 level limit. Make a separate ladder file for the inputs, then call each subroutine from Ladder 2 (Main). I've only seen nesting in a few complex programs where a subroutine with common logic was called from multiple locations. Level Control - Looks OK. Lead/Lag Pump - The coils in Rung 1 should be OTE, not OTL. That's why you wound up using the counter in the rest of the program. Speed Control - This is the part where you're working too hard. For proportional only, just use the SCP instruction with 442 and 479 as the input min and max and 75 and 100 as the output min and max. Add some extra logic to limit the output value range to 75 to 100, since SCP won't do that if the input is outside the specified min and max input values. Use this value as the output to the Pump 1 and Pump 2 VFDs, since it will be at 100% before the lag pump starts based on the current setpoints. Scaling - I see you covered the inputs in another topic. It would help anyone who works on this system in the future if you scaled the inputs to match the transmitter ranges instead of using the raw 1-5 volt count. Also, you need to scale the 0-100% VFD outputs to match the analog output module range. You have the analog outputs set for 4-20mA, Raw/Proportional, which is -32768 to +32767. They can also be set to Scaled for PID range, 0-16383.

Share this post


Link to post
Share on other sites
Thanks for the input! So far the only thing I've been able to test is the lead pump. It turned on and shut off when it was supposed to, but I didn't even get a chance to look at the speeds.

Share this post


Link to post
Share on other sites
Oh... for #3, that is just test logic. I was making sure my lead/lag was cycling. Thanks for the SCP function info, I've never used that instruction and it helped simplify my program. The literature for the 1762-IF2OF2 states the scaled output values at 3120 for 4mA, 15600 for 20mA, and 16380 for 21mA. I assume for my 75-100% output, I should use 75-100% of the 3120-15600 range? I'll do that unless I hear otherwise. Edited by IamJon

Share this post


Link to post
Share on other sites
Thanks for the help. The project is up and running

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