08-23-2008 04:55 PM
Hi,
I am writing an event-driven program. There are two event cases. One initializes the DAQ parameters ("initialization" event). The other starts the acquisition of the data continuously ("acquisition" event). During execution, I always start the initialization event first, then go to the acquisition event.
Now I want the acquisition event to stop once I change certain values on the UI, for example, a parameter like "AO rate", and the initialization event to happen AUTOMATICALLY. What's more, once the initialization event is finished, I want the acquisition event to start automatically.
I have been using statically defined events. After reading many posts on this board, I get the impression that a dynamically defined event structure may allow me to achieve above goal. However, I cannot figure out how to actually do it.
Any suggestions or sample codes would be greatly appreciated!
08-24-2008 01:02 AM
Hi Geena,
you can use the Producer/Consumer Design to realize what you want. Make the Consumer loop as a state machine. Send only commands from the event to "init", "start", "stop" or "reinit" your DAQmx device.
Mike
08-24-2008 02:48 PM
08-25-2008 02:51 PM