12-15-2018 07:20 AM
Hi there,
It would be great if anyone could help.
Im trying to manipulte a 2D array of data which has been produced (Will be produced programatically but just a constant at the moment) to represent the calibration points of a set of transducers/instruments. The reason I need to manipulate the array is that I need to split the data into sets of 2D arrays which represent each transducer then feed into the linear Interpolate function.
I can prove the concept works with just one array 10x2 but not when the array has two data sets, i.e without trying to split the array with a for loop.
I am essentially trying to emulate the inbuilt calibration function inherent in DAQ Express but without using DAQ express or allowing people to fiddle with NIMAX to great channels.
I have attached my code snippet so far (Should be in LV2014) if any one can help.
Solved! Go to Solution.
12-17-2018 06:00 AM
Hi Alex,
I am not sure what you mean by not working when you have 2 data sets, but you can try this to use the Index Array functions to split a 2D array at a specified index:
https://forums.ni.com/t5/Example-Programs/Split-2D-array/ta-p/3519515
Kind regards,
Kelly
12-17-2018 07:21 AM - edited 12-17-2018 07:22 AM
12-18-2018 06:03 AM
Hi GerdW
Thank you for your reply, your method does indeed work perfectly.
The reason for the type cast is that so far as I understand (which can be extremly lacking) in order to get the Interpolate function to work the "test variable" needs to be in the form of an array, I could use a build array for each but as yet I dont know how many calibration points might be in each array so would have to use a for loop also I would presume?
i.e a flow meter might have;
4mA = 0ltrs/min
20mA = 10ltrs/min
But for accuracy on the transducers I might calibrate over 10 points.