Dave Steer
Member
Hi Everyone. Not posted on here for a long time, but I am hoping someone can help me.
I am doing a differential pressure calculation in a L27ERM CompactLogix controller.
The dP test requires to calculate viscosity of water using temperature. The formula is below
so I use CPT instruction for A, B, C and D and with 1.257187E-02 and I get the correct exponential value of 0.01257187 for A.
B and C also give the correct result but when I get to D, I should get a value of -0.000005723952 but I just get out the value that I put in. I am guessing that the REAL value is not a high enough resolution. I have also tried this in structured text and got the same result. Because the value of -0.000005723952 is a constant, I even tried just doing a move and entering the value, but it just goes to 0.01257187.
Has anyone any ideas what is wrong and how to do this?
Thanks in advance
Dave
I am doing a differential pressure calculation in a L27ERM CompactLogix controller.
The dP test requires to calculate viscosity of water using temperature. The formula is below
so I use CPT instruction for A, B, C and D and with 1.257187E-02 and I get the correct exponential value of 0.01257187 for A.
B and C also give the correct result but when I get to D, I should get a value of -0.000005723952 but I just get out the value that I put in. I am guessing that the REAL value is not a high enough resolution. I have also tried this in structured text and got the same result. Because the value of -0.000005723952 is a constant, I even tried just doing a move and entering the value, but it just goes to 0.01257187.
Has anyone any ideas what is wrong and how to do this?
Thanks in advance
Dave