01-18-2012 02:08 PM
Hi,
Was wondering if you could help me with my problem.
I am trying to develop a data logging application. The user will look at live data being read in from a CDAQ thermocouple card and when he/she is happy that the temperature conditions are settled, press a button to log one point of data from each of the 16 channels and then look at the live data again ready to log the next set point. There must be a three minute delay between each logged point.
Current status of program. I am obtaining the live data and have a button that can be pressed to log the data. When this button is pressed the program goes to another state in the state machine. At this point i would like the temperature set point to placed into an array. And each time a set point is logged the data will be placed into a new row in the array.
Currently I cannot get the data into an array and every logged point into a new row of the array. Please could you help.
Attached is my program.
Solved! Go to Solution.
01-19-2012 09:17 AM
I looked at the FOR loop that is logging the data. You have N=1, but you are autoindexing the 1D data array. This means that only the first data point is being logged. The array the you initialize will have 16 data points, all with the same value. I don't understand why you are creating a single element array for each loop iteration and inserting it into your "data" array. Also, why is the outer FOR loop N=1?
BTW, you might want to take a step back and think about the entire structure of your program. A true state machine architecture with an event structure would be a better approach.
01-19-2012 11:02 AM