LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to search values in arrays

Solved!
Go to solution

Hello, I'm a beginner in labview, so please help me with my problem,

I got two output, voltage and current,

I also need power, so i multiple the voltage and the current. Then I find the maksimum power using the compare technique, but the problem is, I also need to find the voltage and the current when the power is max, called Vmp and Imp, here I attach the curve.

Thanks for helping.

0 Kudos
Message 1 of 8
(2,655 Views)

If you have the current and voltage in arrays, then the power will be in an array also. Use the Array Max & Min function.  It will give you the maximum value fo the power array and also the index in the array where it occurs Wire that index to two Index Array functions to get the values of voltage and current at that index.

 

Lynn

0 Kudos
Message 2 of 8
(2,648 Views)
Hi Watha,
If I've got you right, you got 2 arrays. One for Voltage, one for Current. You have multiplied these and got a new array Power. With array max min function, you got the max Power. Now with this same function, you can get the index(if you are using Labview 2010 or above). With this index, using index array function get the values from Voltage & Current arrays. That solves your problem. If you are using lower versions of labview, then you need to use a search 1D array function and find the index of the max Power. Hope this solves your problem.
0 Kudos
Message 3 of 8
(2,642 Views)

Yes, you got that right.

But, how to use index array?

I tried to wire the array from power to the input of index array function. But I don't know what to do with the index, which index i need to input so I can acquire Vmp and Imp?

 

0 Kudos
Message 4 of 8
(2,604 Views)
Solution
Accepted by topic author watha2

You need to connect the index from Min Max function to index array function to get the max.

 

See attchemnt below

 

PowerMaxVmaxImax.png

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
Message 5 of 8
(2,596 Views)

Hi watha,

 

the ArrayMinMax function has 4 outputs. Read the context help to decide which output would be useful in your case...

Best regards,
GerdW


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

Looks like your trying to analyze I-V curves.  Here is a sub-vi I use for this purpose.  Note, that my subvi is build to use current density (mA/cm^2) as the units for the y-axis.  Change VI accordingly.  This will output Voc, Jsc, VMax, JMax, Efficiency, Fill Factor, and estimates for series and shunt resistance.

 

For the resistance estimations, the sub-vi assumes a certiain number of data points beyond Jsc and Voc (to attain a linear fit at those points)

0 Kudos
Message 7 of 8
(2,576 Views)

Thank you very much for helping me.

I'be just lost my netbook so I forgot to accept your solution.

Thank you again.

0 Kudos
Message 8 of 8
(2,526 Views)