LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build a conditional look up table

Hi
 
I'm using a 7.1 ver.
I want to build a conditional look up table, my data include two corresponding values; Volt an Watt which i got from measurements that i had. If it was a regular LUT there was no problem (i saw a perfect solution for a regular LUT:    http://forums.ni.com/ni/board/message?board.id=170&message.id=241488&query.id=102139#M241488 )
 
i need for each transformation to choice a different table, based on the frequency that i use. - that's the problem for me.
i attached the measurements file for more information.
note that the inputs is volts and the output is Watts, and the conditional is Freq. 
 
 
 
thanks and hopping for ideas.
 
 
0 Kudos
Message 1 of 4
(2,473 Views)

You can use Ben's example by extending it and performing a double lookup. If your arrays are always of the same length, you can simply have a 2D array and extract your element from it by wiring in your two index arrays and searching both of them. If your arrays can have different lengths, create a 1D array of clusters where the cluster holds a 1D array. This will allow each internal 1D array to have a different length.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,469 Views)
but HOW???
 
i have a lot of info!!!!  the file i upload is not all of it. i have massive amount of data.
if i work at the same way and put all of Ben's vi into another for/while then it work with the wrong data.
 
how i change the "sub data" for the 2nd dimension (for different Freq. value)????
i can't see the solution.
 
by the way - i'm pretty much a beginner in labview so maybe because if this i can't see it happen.
and another question: why my for/while loop don't stop the "random number" function??? 
 
thanks 
0 Kudos
Message 3 of 4
(2,454 Views)

Here is a very quick example which shows the concept.


@Yonsh wrote:

and another question: why my for/while loop don't stop the "random number" function??? 

I'm not sure what you mean by that. The random number function just outputs a random number once, regardless of where it is called.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,445 Views)