LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display a Y value while the X value changes by different formulas

Hi!

 

I have to display a Y value (Enthalpy), but it will change in the way to obtain it according to the Pressure (X value) measured with a DAQ. I defined the linear equations for my case (change of enthalpy according to the temperature and pressure values), and I built the VI according to the case, but when I tested it, it didn´t work.

 

I attached a VI that will explain better my case.  While 1,26MPa<=P<=1,279MPa the equation is h=1,088T + 223,1 but when the Pressure raises until P<=1,299 the equation has to be h=1,091T + 222,6 but the VI has to display it in the same Numeric Indicator (according to the case). When  I run the VI, it works perfectly with the second equation, but it doesn´t with the first one. I tested every function used and according to my experiment the problem is in the "Merge Signals" function, but I don´t know what to do, so that´s why I came here.

 

Thanks a lot for the help you provide

0 Kudos
Message 1 of 3
(1,947 Views)

Why would you want to merge signals if all you want is one of the two??

 

Try something like this....

 

(You don't say what should happen if the pressure values are outside the range 1.26 .. 1.299. Since it is not defined, my code returns NaN). 

Message 2 of 3
(1,937 Views)

Thanks a lot for the help!!!

 

I just tested it and it suits perfect for my case! I have 30 formulas for 30 different pressure ranges and it works perfect!

 

Thanks a lot again!

0 Kudos
Message 3 of 3
(1,930 Views)