LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Min/ Max interval data storage

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

 

0 Kudos
Message 1 of 6
(2,865 Views)
You can use the Array min/max primitive to find the minimum and maximum values. Then you can write that to a file may be using the write to spreadsheet vi.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 6
(2,851 Views)

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.

 

 

 

0 Kudos
Message 3 of 6
(2,850 Views)

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. 

0 Kudos
Message 4 of 6
(2,836 Views)

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.

Message 5 of 6
(2,815 Views)

I have a great point to start now, thank you. 

0 Kudos
Message 6 of 6
(2,801 Views)