08-11-2010 12:17 PM
Hi,
I'm just wondering whats the best way to write a VI that includes two parts: one being an event driven GUI and the second being a continuously updating data display (i.e. temperature displays and graphs)? Would the only way to accomplish this to have both the controls and data collection incorporated in one loop and forget about an event structure? Both controls and data collection is for the same device and each command/query requires sufficient time for the device to process.
08-11-2010 12:47 PM
No, have the GUI display the data as well as have an event driven "control" part but put the data acquisition in another loop (or better yet another vi). They can communicate through any number of means; functional globals, queues, etc. Search on Producer-Consumer structures, both here (forum) and in the LabVIEW examples in your LabVIEW installation.

08-11-2010 05:16 PM
An event based application is often the best approach. If the events will take long, which you imply, then a producer/consumer structure will work better. If new events will be generated while this happens a queued producer/consumer is probably what you're after.
The simplest case of your description is assuming some polling/timed data collection and not too long processing time. Then you can do in the timeout of an event structure.
/Y