LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pass DAQ values to my graph ?

Hi,

I'm using labwindows CVI 6.0 FULL release and WIN2000.

My project is simple, I have two threads, the first thread is used to handle all my UI and the CWGraph for plotting my data. The second thread, is only used to acquire DATA from the parallel port from a ADC0801, I'm doing it as fast as possible without any delay. But how can I past my data to my other thread in a safeway without loosing data. Because I figure that I'm acquiring much faster than I can really display it. Somebody told me about the concept of circular buffer, but how do you implement it in CVI, is there a better way to do it ?

Thank you,
0 Kudos
Message 1 of 2
(2,885 Views)
We have provided a perfect tool for this in CVI called a thread safe queue (TSQ). The TSQ is a buffer between threads that is event driven that allows you to safely pass data buffers between threads. See the examples under cvi\samples\Utility\Threading\ThreadSafeQueue to see how TSQ's are used. Also see the white paper (cvi\bin\MultithreadingOverview.pdf) for more information on threading in CVI.

Best Regards,

Chris Matthews
Natioanl Instruments
0 Kudos
Message 2 of 2
(2,885 Views)