08-10-2006 05:35 AM
A Flat Sequence Structure is running in a While Loop. The
time pause between two adjacent frames is 200 m-Sec. All the sequences are
executing continuously. If I want to
make an event (Boolean action by a button
on UI) and to perform some operation (Digital pulse On/Off at DAQ card output
Port-0,Line-0) then how shall I
proceed? Shall I use Event Structure? I am new to Labview.
I have tested the action without event
structure. I have observed the logic change at DAQ card output at
the end of currently running cycle. But my purpose it to get the
change instantaneously as soon as I press the button.
How to do it?
A. Das
08-10-2006 06:28 AM
08-10-2006 06:38 AM
08-10-2006 08:13 AM
One nice architecture I have found to work quite well for user controled daq is to use the event structure running in its own loop and send messages via a wueue to control a daq state machine running in a seperate thread. One thing this solves is that event code should be kept short to allow for responsive GUIs. If you execute the DAQ dirrectly inside of the event structure and the daq is a synchronous vi call which takes some finite amount of time, you will not beable to execute any other events until the first event finishes. Using seperate threads for user events and data acquisition allows for a responsive and managable architecture.
Paul