06-22-2010 10:44 PM
Hello, I am new to Labview. I am having trouble writing this equation. Volumetric flow= (gasliquid/1000)*(pi*d2^2/4)*sqrt((1-(d2/d1)^4)^-1)*sqrt(2*(p1-p2)/gasliquid) . I introduced those variables as a z x y z d, and output which is volumetric flow as l . However, I get the answer which is tank as NaN . Can someone tell me the reason?
06-22-2010 10:54 PM
What values did you use? NaN would be generated if, for example, you're dividing by zero.
Note: the formula node has a constant for pi. Just use "pi".
Also, I'm not sure why you have indicators connected to each of your controls. The way you have it is redundant.
06-22-2010 11:13 PM
The assignment has front diagram it says so 😕 Have you looked at the screenshot? Did I do something wrong or just empty values? because I see values when i highlight the process
06-22-2010 11:27 PM
Ah, new to LabVIEW and going straight for the formula node. If you post your VI we could probably point out the problem pretty quickly. In this case since I am looking to test the software I demonstrated here, I copied your equation and pasted it into my software and generated this snippet. Math in G is not bad when you get used to it.
Check for bugs.
06-22-2010 11:41 PM
The formula is wrong. Why would you use different variable names? Use the same ones as in the original and you should see the errors.
06-23-2010 08:58 AM
@onqun wrote:
The assignment has front diagram it says so 😕 Have you looked at the screenshot? Did I do something wrong or just empty values? because I see values when i highlight the process
Your screenshot does not show the values for the controls. It just shows the control terminals. Look at the screenshot yourself if you don't believe me.
However, Dennis is correct. Your formula is simply incorrectly entered.