LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple comparison with some thresholds and a commanded value

Hi, i'm trying to make next function

-------------------------------------------------------------

if(demand CO2 ppm >= 10000){

MFC 1 SP sccm = 500

 

else if(demand CO2 ppm >=9500){

MFC 1 SP sccm = 10000}

 

else if(demand CO2 ppm >=7000){

MFC 1 SP sccm = 5000}

 

else{MFC 1 SP sccm = 1000}

}

------------------------------------------------

 

and I'm attaching what I made in Labview  (sub_MFC 1 volume flow rate selector.vi)

 

When I enter 7000~9499 values to 'demand CO2 ppm' I get 4999.99999999...

Not other values have any problem (they all give me exact numbers that i expect)

only 7000~9499 band has a problem, it's not a big error, but I wish to know where the error comes from.

0 Kudos
Message 1 of 2
(646 Views)

Hi ansy,

 

use arrays:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(632 Views)