Jump to content

how to implement lookup tables?


xolstis

Recommended Posts

Hi there, am rather new to labview. Have been looking high and low for some kind of look-up table function that I might be able to implement in labview unsuccessfully.

I need to be able to have a 2D table that gives out a single output taken from the table for a given set of two input variables. Anway to do this easily?

Cheers

Link to comment
Hi there, am rather new to labview. Have been looking high and low for some kind of look-up table function that I might be able to implement in labview unsuccessfully.

I need to be able to have a 2D table that gives out a single output taken from the table for a given set of two input variables. Anway to do this easily?

Cheers

Go to NI.com and in DevZone search for Parse Lookup Table

or try here: Parse Lookup Table

Cheers :beer:

Link to comment
Hi there, am rather new to labview. Have been looking high and low for some kind of look-up table function that I might be able to implement in labview unsuccessfully.

I need to be able to have a 2D table that gives out a single output taken from the table for a given set of two input variables. Anway to do this easily?

Cheers

Hi,

Here is an implementation of a lookup table. The LUT can be either:

- a 2d array of X-col, Y-col,

OR

- a 1d array of (X,Y) clusters.

Given an X, it will interpolate a Y value. Note that the LUT must be monotonically increasing for the LV function to work!

You can add additional logic to check for out of range X values, error generation, interpolating Y given X etc. as needed.

Cheers,

Neville.

Download File:post-2680-1134673935.vi

Link to comment
Hi,

Here is an implementation of a lookup table. The LUT can be either:

- a 2d array of X-col, Y-col,

OR

- a 1d array of (X,Y) clusters.

Given an X, it will interpolate a Y value. Note that the LUT must be monotonically increasing for the LV function to work!

You can add additional logic to check for out of range X values, error generation, interpolating Y given X etc. as needed.

Cheers,

Neville.

Hi Neville,

Have looked at the vi you attached. Correct me if I am wrong but it appears that this vi does something like curve fitting. As in given a graphical function (or in this case by interpolating a series of points on an array), the function returns a value of y for an input of x. Not too diff from say if you had a graph of y = 2x this function simply tells you what y is for a given value of x except in this case no graphical function is given but rather a 1D array is used.

If I am correct in my conclusion this isn't quite what I need because the values I have to fit into the table will probably not fit into any function or curve. Have attached a picture to illustrate what I am trying to do. It sounds really simple but I can't seem to find a simple solution for it.... I am sure there is one and its just eluding me. The parse lookup table suggestion by Michael looks a little complicated :) am trying to look thru it now to see if it does what I require.

Thanks for the help.

post-3705-1134699115.jpg?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.