LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Streaming to disk and analyzing data in real time.

14 channels. 500S/sec. 4 FFT calculations and displays, 8 time domain displays. 1 analysis subvi to calculate 6 extra arrays of data. Save 2 hours worth of data and be able to do all these simultaneously.

Can it be done? I am finding a gap between each iteration of the loop due to what I think is the time that it takes to calculate and manipulate the data.

Any help will be appreciated. Thanks in advance.
0 Kudos
Message 1 of 4
(2,928 Views)
Assuming the PC has adiquit memory and speed,

Yes it can!
and
You are half way there!

Move everything you can out of you data collcetion loop (left loop) into the other loop.

Take a look at the "Continuous Acquistion" examples and mod the data collection loop so it just reads the data waiting in the buffer, and passes it (via the queue) to the other loop. (explicitly; Start outside loop, Check-n-Read backlog inside loop).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(2,928 Views)
Thank you so far Ben,
Let me see if I understood you correct.
Step one - perform data collection on a loop by it self. Make sure AI Start is done outside of this loop. Check and Read Backlog inside this loop. Read the data from the buffer and pass it to the queue.

Step two - Move all the data analysis/manipulation to the other loop.

I am assuming that the data acq loop will execute faster than the data manipulation loop. If my assumption is correct, the queue should be able to provide the necessary buffer to perform the data manipulation. How do I determine what�s a good buffer size for the queue?

Also, to be able to save the data continuously, I have to strip the �Y array� from the waveforms and save only that. Is this correct?
0 Kudos
Message 3 of 4
(2,928 Views)
Re:queue size

Start by benchmarking your data analysis code. What you want to find out is "can I crunch faster than I can collect?"

If you can (crunch faster), then make the queue large enough to handle whatever resonable delay you would expect on the machine. What I mean by this is, lets say you want to open Excel or something while the app is running. This may take several seconds from the time you click, until it is open. Make the queue large enough to hold 2X this time period. This way the app will be able to catch-up.

If you cannot (crunch faster) look into speeding your code (post a seperate Q if this is the case). If you cannot speed it up then make the queue big enough to handle eveything!

Re; File saving,
The Waveform pallette has VI
for saving waveforms. Investigate thoughs.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,928 Views)