LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

high-speed data acquisition and processing problem

In your example you have your DAQ running at 51200 samples/s and you ask to collect 163840 samples - that will take approx 3 secs. Your loop will only run at this 3s rate. When your DAQ is running continuously the loop rate is determined by your scan rate and the number of samples you collect each time, you don't need the miliseconds to wait inside the loop. If your processing takes longer then this will determine the loop rate and the DAQ buffer will slowly fill and you will get a DAQ error.

0 Kudos
Message 11 of 17
(493 Views)

I understand why I have this DAQ error. The question to find another solution.

0 Kudos
Message 12 of 17
(478 Views)

If your data collection and processing times aren't going to change, you at least need to do the processing in parallel with the data collection. You can use a producer/consumer architecture to do this. However if your processing takes 3-4 times as long as the data collection, you're queue will fill up. You could have multiple consumers and distribute the processing between them.

0 Kudos
Message 13 of 17
(459 Views)

So, I need transfer data to the parallel loop. If I use queue, then I will have another problem - more and more "unprocessed data" in the queue, and overflow at the end.

0 Kudos
Message 14 of 17
(455 Views)

Or I can use file to store data, but then it will be not real-time system

0 Kudos
Message 15 of 17
(454 Views)

I agree with the others. As long as your  processing time is larger than than your data collection time you are in trouble. As asked before. Is your processing VIs made so efficient as possible. Wrong array handling may in many cases hog CPU time, then using large arrays. .



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 16 of 17
(453 Views)

If you use one queue your data will pile up. If you use multiple queues, it might not. I attached a vi with my idea. I'm not sure if it will work in your situation and I'm sure that there are better ways to do it, so feel free to comment on it.

0 Kudos
Message 17 of 17
(445 Views)