LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Lookup table in Labview 7.1

For a particular input voltage, the output is distance in cm. For example if the the voltage is 6.2mV the output should be 2.5cm, for 6mV the output is 6cm. Whenever an input voltage between any of these values is given, the output should be interpolated and displayed in cm. I would like to maintain a lookup table for this purpose in Labview 7.1. The graph between input and ouput is a linear graph. I would to know how to create a lookup table and configure it in Labview 7.1..
0 Kudos
Message 1 of 13
(11,890 Views)
A lookup table can be an array, either a diagram constant or a front panel control with vaules saved as default.

If the process is linear, you could enter the slope and intecept values and calculate the values from that. I think you can set custom scaling in DAQmx which would allow your readings to come out directly in distance units.

Lynn
Message 2 of 13
(11,878 Views)
my experiment is calculating linear displacement using photovoltaic cell. i have the experimental values. and according to the theory , the voltage and the displacement must vary linearly. but due to disturbances and errors, they may not vary linearly at some points. how should i proceed? please suggest....
0 Kudos
Message 3 of 13
(11,873 Views)

Well since it is still AE Week here is an AE implementation of a LUT

Inititalize it with an array of raw values along with an array of the tranlsated values.

Use the Lookup action to translate raw to tranalsted.

Itr uses the threshold and interpolate VI to do the translation.

Ben

Message Edited by Ben on 04-12-2007 12:45 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
0 Kudos
Message 4 of 13
(11,859 Views)
 thank you for the solution. but i m just a biggener in lab view, and i couldnt actually get the concept of AE. could you please help me out in some other way. it will be fine even if interpolation cannot be done ie. it wil be fine if it displays one output for a range of inputs.
  voltage         distance
4- 4.2 mv          2 cm
4.3- 4.5 mv       1.5 cm
so if my input is 4.1 mv , it should display 2 cm
 please suggest me how to procede....
0 Kudos
Message 5 of 13
(11,838 Views)

Here is an enhanced version complete with demo.

THe LUT has been updated as well.

I start by defining the Look-up table using the "Init" action.

After that I enter a loop were a random number simulate the measurement and the LUT is used to do the translation.

Have fun!

Ben

Message Edited by Ben on 04-13-2007 07:31 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 6 of 13
(11,816 Views)
i m actually confused.... for the LUT ypu sent, where do i enter my values of range of voltage and its corresponding displacement? what is the necessisity of random number generator? moreover i m not able to run it on my labview....
0 Kudos
Message 7 of 13
(11,808 Views)

Are you using the ctl I posted in the previous post?

The left array passed in to the "Init" are the physical values.

The right array contains the translated values.

The random num just simulates a measurement.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 13
(11,799 Views)
yea i did include the .clt file.....
could u please tell me if look table is the only way to solve my problem?
i mean,  for the table i mentioned, if i give 4.1 as input, the output should be displayed as 2 cm.
 
0 Kudos
Message 9 of 13
(11,794 Views)

For the limited info you have provided, it would also be possible to do this with a case structure.

Try running my demo in execution highlighting mode and watch how it works.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 13
(11,779 Views)