kchen wrote:
> Hi folks,
>
> If I have a wait VI and other VIs in the same loop.
> Would other VIs excute first, hold for the wait time,
> then go on to next loop or it waits then other VIs excute?
Execution-wise, there's nothing special about the Wait VIs; dataflow
will determine the order of execution of these and the other objects
within a loop. So, if you have a Wait node sitting all by itself and
another piece of code on the other side of the loop, there's no way to
tell if 1) the Wait will execute, then the other code, 2) the other code
will execute first, then the Wait, or 3) Part of the other code will
execute, then the Wait, then the rest of the other code. Any of these
things could potentially occur.
If you're certain that your main loop code can always e
xecute faster
than the time delay you specify for "Wait Until Next ms Multiple," then
what you've got is a software-timed loop where the loop code is executed
once per time interval specified. The degree of regularity of the
execution will depend on what else your computer's processor is being
asked to do at the same time (mouse, other I/O, other numerical
calculations, etc.).
There's a wrinkle if you instead use the "Wait (ms)" node. The
following KnowledgeBase entry on the NI Web site gives a good
explanation of the difference between these two Wait functions:
http://digital.ni.com/public.nsf/websearch/12b2ea9ad5b265ad86256257004dd8e2
Best Regards,
John Lum
National Instruments