LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure percentage

If you have an array of volts, simply wrap a FOR loop around the interpolate array function. The rest stays the same. You will get an array of percentages.

0 Kudos
Message 21 of 43
(1,881 Views)
If you are getting an array of data from the daq, why do you want to throw away everything except a single point? Wouldn't it make more sense to take the mean? Of course, if your daq setup is to take just a single reading, then it is pointless to convert to a 1D array.
0 Kudos
Message 22 of 43
(1,880 Views)

@altenbach wrote:

If you have an array of volts, simply wrap a FOR loop around the interpolate array function. The rest stays the same. You will get an array of percentages.


Here's what I had in mind:

 

 

0 Kudos
Message 23 of 43
(1,879 Views)

I follow you suggestion but it shows error...maybe I'm misunderstanding what you mean...VI.png

 

And also I attach the program that I mentioned just now which cannot show charge percentage.

Could you just do correction in this VI??

Millions of Thanks!!!!

 

0 Kudos
Message 24 of 43
(1,850 Views)

Try to do this yourself.

0 Kudos
Message 25 of 43
(1,836 Views)

Try this.

 

(These are very basic programming concepts. Try to do some some tutorials)

 

Of course you could just take the mean if the array and eliminate the FOR loop again. How rapidlty does the voltage really change? How many points do you take?

 

0 Kudos
Message 26 of 43
(1,833 Views)

I try this VI but while I change the voltage, charge % remains 0%...

 

 

 

Is it must in array?? Actually we only want the charge % for further calculation.

If the charge % in array, how could we do our further calculation??

e.g when it is 12.5V, we could get 90%. And through another way we get the SOC of 80%. We need to get the ave of these two data...

0 Kudos
Message 27 of 43
(1,828 Views)

hahaxuan wrote:

Is it must in array?? Actually we only want the charge % for further calculation.


If you have an array of N measurements, you'll get an array of N charge percentages.

As I mentioned, you can reduce it to a single number by taking the mean, for example.

 


@hahaxuan wrote:

I try this VI but while I change the voltage, charge % remains 0%...


How do you change the voltage. Is the voltage reading correct?

 

 

0 Kudos
Message 28 of 43
(1,808 Views)

how to take the mean to get the single value???

 

we now connect daq to a power source which can decrease or increase.

If connect to battery, the voltage will also decrease. 

0 Kudos
Message 29 of 43
(1,801 Views)

@hahaxuan wrote:

how to take the mean to get the single value???


Use the mean function (if this is difficult for you, you really need to start with LabVIEW basics!

 


@hahaxuan wrote:

we now connect daq to a power source which can decrease or increase.

If connect to battery, the voltage will also decrease. 


In what way is this relevant? You need to be much more specific!

 

 

0 Kudos
Message 30 of 43
(1,779 Views)