LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about implementing lookup tables with arbitrary indices

Solved!
Go to solution
First some background: I have calibrated a pyrometer every 25C from 350 up to 1000.  I placed the values in two tab delimited text file tables (two different pyrometer output ranges).  In the program I wrote, an arbitrary temperature level between 350 and 1000 can be entered in, and a fractional index for one of the two tables will be calculated.  Linear interpolation is used, and a current level is the output.  This works fine like this.

The problem is that it is a very long process to calibrate a pyrometer for specific temperature levels.  It would be much easier to calibrate for specific current levels and get arbitrary temperature readings for those currents.  I am wondering how to implement this with lookup tables.  I tried simply placing all the values I had at the Row number corresponding to their temperature level.  IE, 500 C's current level would have the index 500 (actually it would be 500-350, since the spreadsheet won't save the blank rows before the first value).  This works fine as long as you input a temperature level that has a current value.  The problem is that the linear interpolation function no longer works, since it only does interpolation between two adjacent index values.  I need something that will interpolate between two arbitrary index values, like between 500 and 525 (or maybe 522 and 573, for instance, in the future).

Any thoughts or suggestions would be greatly appreciated.
0 Kudos
Message 1 of 3
(3,183 Views)
Solution
Accepted by topic author PiMaster
To linearly interpolate xy data, you can use "interpolate array with an "array of clusters" input where each array element is an xy pair. Check the online help. 🙂
 
(Of course you should ensure that the array elements are sorted in X)
 
 
LabVIEW 8.0 added quite a few new iterpolation routines. Try them if you have LabVIEW 8.0.
 
 

Message Edited by altenbach on 07-31-2006 08:23 AM

Download All
Message 2 of 3
(3,175 Views)
Of course!  I knew it'd be something relatively simple.  And here I had started to write out some pseudocode to do it in C.

Thanks!
0 Kudos
Message 3 of 3
(3,167 Views)