Sign in to follow this  
Followers 0
dakota152

RSLogix 500 Controlling a valve using PID

5 posts in this topic

I have been writing simple ladder logic with AB software for a little while but I have been asked to do a project to fill our tank with water. We need to use a control valve to do this to keep our water lines from hammering. It seems simple in my head but I have never done PID control using AB software. I will be using a ML1100 along with an analog input and analog output cards using 4-20mA. I have a the tank on load cells, so I will be bringing in a 4-20mA signal from the scale head into the PLC. I will scale this using the SCP function. It will be scaled in PID scaling. 0 being 0 and 16383 being 5000 in engineering units. I will then have a setpoint that I want to fill the tank to. This setpoint will come from the HMI panel (F8:0). This is the point I want the valve to close off completely and stop the tank from filling. I am just not sure about how the logic should be to do the PID function to control the valve. Can anyone help me with this. I am in a time crunch with my boss because he wanted it yesterday. Like most bosses they think things are snap your finger and it is done. Does anyone have anything already done this way? Can you send me a copy of a program like this? Any help would be greatly appreciated. Thanks

Share this post


Link to post
Share on other sites
Not sure I see any need for PID control here. You are doing a simple fill to setpoint and closing the valve. I see someone determined that a modulating control valve should be used to eliminate hammering. I guess that will work; however, I think a cheaper solution may have been to put something on the vent of an on/off valve to slow down how fast it closed. I suspect everything has already been purchased and this is what you have to work with. You may want to experiment with your new valve. Depending on the size control valve you have, I doubt it closes fast enough to cause hammering. That means you have to do absolutely nothing in your program to prevent this. That's best case. If you do need to do something I would suggest just ramping the valve closed. This is not PID, but just a simple bit of ramp logic. I dont think there is a ramp function in the 1100; however you can just setup a SUB and a timer in such a way that you slowly close the valve over time (ie, every time the timer is done subtract some from the output to the valve). You can then control how fast or slow the valve closes by adjusting the timer preset or how much you subtract. You will also need to add some sort of cutoff value to your logic that closes the valve. This is a small amount that gets subtracted from your setpoint to allow the valve to close a little early. This will allow your logic to close the valve a little early so that the slow closure doesnt go over your setpoint. This is also necessary if you have enough pipe after your valve that will end up draining into your tank after closure. Make the cutoff an integer data location or something that is easily adjustable so you can change it as you watch things work. Let me know if I somehow missed how you intended to use PID in this app. I just dont see it.

Share this post


Link to post
Share on other sites
Thanks for the reply. I have not purchased the valves yet so I could use a speed reducer on the valve to slow the closing of the valves to stop the hammering. This will be much easier than using the PID control on the valves. All I would need to do with this is experiment with the valve closing to see how long it will take and adjust my valve closing point in my logic to account for this. I appreciate your help. I would like to understand the PID function a little better though so I would be able to use it in other instances to control things. I thank you.

Share this post


Link to post
Share on other sites
Thanks for the reply. I have not purchased the valves yet so I could use a speed reducer on the valve to slow the closing of the valves to stop the hammering. This will be much easier than using the PID control on the valves. All I would need to do with this is experiment with the valve closing to see how long it will take and adjust my valve closing point in my logic to account for this. I appreciate your help. I would like to understand the PID function a little better though so I would be able to use it in other instances to control things. I thank you.

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