Scaling Values Using a Lookup Table

A lookup table can be useful if you need to transform values that have a relationship that is not easily modeled mathematically. Converting thermocouple readings from voltage to degrees is a great example.

They can easily handle almost any sort of relationship so long as a linear interpolation between the known values is accurate enough for the application.

Lookup tables can also offer speed improvements if the calculation is expensive, but this is less likely to be a consideration if you’re using a modern PC rather than a slower embedded microprocessor


The simplest way to set up a lookup table in LabVIEW is to create an array of clusters of the known input and output values. You can then use Interpolate 1D Array to calculate the output value for any input in range

The X values need to be sorted from lowest to highest for this to work correctly, so I’ve included Sort 1D Array between Index & Bundle Cluster Array and Interpolate 1D Array. When passed an array of clusters, this function sorts the clusters using the value of the first element

X and Y arrays creating a lookup table.  X array and X passed into Threshold 1D Array with fractional index output.  Y Array and factional index passed into Interpolate 1D Array with intpolated Y output

Subscribe to our newsletter

Did you find this post helpful? Sign up to the Lonely Ant newsletter to get more useful tips delivered directly to your mailbox

Unsubscribe at any time. I will not share your information with third parties.

* indicates required