From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure percentage

we need to compare the data that get from daq with this table.

eg, if we get 12.5V , we should get 90% for futhrt calculation.

0 Kudos
Message 11 of 43
(1,599 Views)

But actually it isn't a straight line....we want a more accurate value just follow the table....

0 Kudos
Message 12 of 43
(1,599 Views)

Did you give a try with what I have suggested?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 13 of 43
(1,585 Views)

I get to know linear fit from NI website. But the data we have are not follow a straight line. We want to follow the table accurately. If use linear fit, it may have error. like when voltage eaquls 12.4V, SOC become 85% not 80%...

0 Kudos
Message 14 of 43
(1,575 Views)

did you do what christian has suggested....

 

and as you've said,"But the data we have are not follow a straight line"....again, the key word here: interpolate array

0 Kudos
Message 15 of 43
(1,565 Views)

Hi xuan,

 

as you struggle to follow advices given here and just started to create double posts in the forum (what is really bad!) I will show you a possible solution:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 43
(1,539 Views)

could you please attach the vi here? I try to build the vi like the one you do but some of functions cannot find...

Thanks!!!

0 Kudos
Message 17 of 43
(1,507 Views)

Hi xuan,

 

which function?

SpeadsheetStringToArray? Any of the simple mathematics functions? Or one of those two array functions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 43
(1,485 Views)

Let us keep it to the basics. All you need is a calibration array of points aanndd "interpolate array". 😄

 

 

Download All
0 Kudos
Message 19 of 43
(1,456 Views)

Really thanks for your help!!!

But I need to get my voltage from a daq. While data for daq and Interpolate 1D are not the same so I convert daq data to a 1D array and use Index Array function to connect the element inside to the Interpolate 1D, but I don't know how to set the index no. of the Index Array.

Do you know how to connect my daq to the program???

Thank you again!!

0 Kudos
Message 20 of 43
(1,421 Views)