> Hi there,
> I want to create a data acquisition VI that perform acquiring data in
> an independant thread, and when the data is ready, displaying it in a
> graph. In another word, one thread for acquisition and another one for
> UI events (button to start / stop acquisition, display cursor...).
> Data acquisition is higher priority than displaying data. Any VI
> concrete sample for multithread ?? Thanks in advance.
By default, the UI runs in the UI thread. The execution of the VI runs
in the Standard execution system, which has its own thread. By default,
these threads are at the same priority. If you want your DAQ to run at
a higher priority, you can place your DAQ code in a subVI. Then set the
subVI to run in any execution system you like at a higher
priority.
Call the subVI in parallel with the rest of your UI loop, and determine
how you want the DAQ data to get to the UI. You can use a global, a
queue, etc. Don't overlook simply using the terminal or local for the
graph. All of these other methods have their advantages, but they also
add overhead. At some point, you will need to copy the data from the
DAQ code to the UI code. This is all that writing to a terminal or
local does as long as synchronous display is not turned on.
Greg McKaskle