2 posts in this topic

I have a waste water system and Corporate wants to know the "average" pH. Most people think its just a function of averaging the discharges. We run on a detention tank system. I think they understand finally how pH works. Unfortunately my discharge volumes differ every time, and so do my pH's. If I calculate my daily discharges pH and volumes in Excel or on my Ti-89, we are golden. The PLC, L63 rev 19.1. seems to be giving me fits. It is obviously my fault, since I am doing the programming. Has anyone attempted to do the same thing? If so how essentially did you do it? I am eventually going to make into an AOI after all this effort.

 

In a nut shell, I take the current volume and pH. I derive Mol . The previous discharge volume and pH and stored Mol are used to calculate a new equivalent dilution. This becomes a running average, which I have a FIFO 10 long. All new volumes, pH, and calculated Mol are stored historically 10 Long. ( 10 discharges ).  If I simulate with same volume and same pH incoming and last outgoing, pH is slightly lower. (11.7 versus 12). The math appears to be correct, it works in excel

Share this post


Link to post
Share on other sites

I always make my math routines work in Excel first BUT, sometimes you have to force the order of precedence with parenthesis in the AB boxes. Are you doing the calculation with structured text? Even if you want to do the averaging outside of structured text (MAVE is pretty nice and it works inside structured text and outside), I'd still do the math in a structured text routine. 

Edited by Michael Lloyd

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