07-10-2014 12:08 PM
OK, so what I am trying to do is scan 2 voltages at 3K, temporarily write that data to a file or buffer, read the min and max values, and log those to a file once per minute. I'm at the point where I can scan and display the data, but really don't know where to go next. Any thoughts or ideas would be much appreciated. Thanks
07-10-2014 12:43 PM
07-10-2014 12:44 PM - edited 07-10-2014 12:45 PM
You need to start with a few LabVIEW tutorials and learn about dataflow and data dependencies.
Your current code is severly broken. Your upper loop cannot start until the lower loop is finished (the path wire is a data depedency). Also note that "index array" is resizeable, you only need one instance. Also notice all the coercion dots. Wite to spreadsheet file does not natively accept waveforms.
07-10-2014 01:02 PM
All I have ever programmed were single while loop VI's. I agree that tutorials would be helpful. I thought that in order to have a slower write to file function, I would need a seperate loop. Thanks for the tip on the index array resize. There was only one coercion dot, on the write to spreadsheet file. I typically use the tdms logging function, which I beleive would be of no help in what I am trying to do here. But what do I know.
07-10-2014 01:39 PM - edited 07-10-2014 02:42 PM
You only need a single loop. You can use the "elapsed time" express VI to signal when time has elapsed, and simply use a case structure to append the averages to the data before writing (in the false case just wire the current data across). You should also open the file before the loop, append inside the loop, and only close the file once the loop completes. You can use the min&max ptbypt VI to keep track of the min and max for each interval or just keep track of it using a shift register.
07-10-2014 02:30 PM
I have a great point to start now, thank you.