JoseM

PID For Tank Level Control

7 posts in this topic

Please guys. I need help creating my first PID code in RSLogix5000. I have a tank where water comes in at the top and water comes out in the bottom with a pump. I have a pressure sensor that is used to calculate the tank water level. I have a electrical actuator that opens a butterfly valve from 0 to 90 degrees. The actuator is 0 degree = 4 ma and 90 degree = 20 ma. I'm using a 1794-OF4I analog output module to control the electrical actuator. The output module I think is set as 4ma = 0 and 20ma = 7878.

Level_Control.PNG

Share this post


Link to post
Share on other sites
2 hours ago, kaiser_will said:

Class assignment?

If it isn't whoever designed the system should be drawn and quartered at a minimum :)

2 people like this

Share this post


Link to post
Share on other sites

1. Research the PID itself and understand the differences in undershoot, overshoot, unstable conditions, etc.

2. Break the problem description down into blocks.  Bit-size morsels is how we code.

3. Learn and understand the PID (or PIDE) function block; it is only 1 block.  A code example for 1 rung and 1 block...probably not going to happen.

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm003_-en-p.pdf

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm006_-en-p.pdf

http://literature.rockwellautomation.com/idc/groups/literature/documents/wp/logix-wp008_-en-p.pdf

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm094_-en-p.pdf

Share this post


Link to post
Share on other sites

I'm trying to figure out how do I go about configuring the 1794-OF4I. I read that I need to configure the output range for the output module because there are many available options. The configuration is based on a combination of four bits to tell if it is a 4-20 ma or 0-20ma, etc.

Edited by JoseM

Share this post


Link to post
Share on other sites

1794-OF4I => Isolated 4-channel analog output module.  In Logix5000, when you add a PLC module, Logix automatically creates read and write configuration words , tags, for you.  If you pull up the Controller Tags list, and drill to the rack and analog output module, there will be input and output words.  Read the literature; these cards can be used in a multitude of ways, so look for your desired example.  You will need to set/reset certain bits to get the desired configuration.  

http://literature.rockwellautomation.com/idc/groups/literature/documents/in/1794-in037_-en-p.pdf

http://literature.rockwellautomation.com/idc/groups/literature/documents/um/1794-um008_-en-p.pdf

Share this post


Link to post
Share on other sites

Thank you all for your replies. All the information provided has helped me understand almost everything I need to know I believe. I will like to ask an additional question in regards of PID instruction on CLX.

I will like to see if its possible to have an HMI screen that has a field for the "Setpoint" of the PID instruction where I can adjust this number to change the level of my tank. 

 

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