12-09-2014 01:19 PM
Hi Guys,
I was wondering if you could help out? the issue is on the first step I am collecting data from the NI9219 from two channels. 0 and 1 at this moment. I then load all the data into an excel file and use index Array to calculate a Min and MAx value for future processing. My problem is the index array doesnt work the way it should, when ever i run the Unit under test I am getting the incorrect minimum value for the unit under test. it seems the array is not populating the data correctly anyone have any idea?
please see the code below
thanks
-Chris
12-09-2014 01:48 PM
Really hard to help when you give a password protected VI...
12-09-2014 01:50 PM
Omg LOL, I forgot about the pw, sorry, I removed it here attached below.
12-09-2014 02:47 PM
First, you have a lot of functions where you don't use the outputs. (Such as Array Min/Max, a tunnel out of your while loop, a subtraction in your while loop)
What are you really trying to do? Using insert into array seems odd in the while loop to put a 30 element array into a column of your array. Seems like the Build Array function would be more approporate.
Also, when you finally exit that loop, only the array of the last iteration gets passed out of the tunnel, all along you've been appending copies of that array into your data file, but in the end, you only use the data from the last iteration.
I'd suggest running a block diagram cleanup on your code. Then start tracking down all the unused outputs and determine whether you mean to use any of them or not.