LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition time performance problem

Hi. My LabVIEW program aquires data from USB, processes the data and shows the calculated result on the screen. The program is separated into two while loops. The first one aquires data and puts it into a queue, whereas the other while loop fetches data from the queue, processes it and publishing the result. The idea is that the loops shall run indepently and use the queue as a buffer. My problem is that data is sometimes lost, probably because the aquisition process is starved by the rest of the program. The data aquisition process must be run every 30 ms. I have tried to find a typical example on how to build such a system but haven't found one. There is a lot of information on multithreading, but using it in a practical example shows up to be more difficult that I thought. Does someone have any advice on the basic idea to make such a system work.
0 Kudos
Message 1 of 2
(2,460 Views)
Have you tried monitoring your consumer loop? If you can't reduce the data in your queue in the time alloted, then the queue will grow. This will cause LabVIEW to allocate more and more memory, which can slow the computer. If you're flushing the whole queue then you may be trying to process larger and larger arrays of data.

I would use a probe or place an indicator on the front panel to show the number of elements being processed for each iteration of the consumer loop as a starting point...



Message Edited by Phillip Brooks on 12-12-2007 12:20 PM
0 Kudos
Message 2 of 2
(2,448 Views)