I use several software timed loops to run in parallel at different intervals to poll 4 serial ports in a Windows XP environment (LV 8.6) while passing the data (via Queues) to an alignment loop running at the fastest data rate loop to align, display, and log the data.
In the past/currently I use while loops w/ a "Wait ms function" placed inside the loop, parallel w/ the code to poll and parse the com ports (I know the "Wait ms" is not the best approach and should probably use "wait until next iteration"). (The poll and parse code executes faster than the wait)
I've tried implementations w/ timed loops in the past, but it seemed the loops weren't serviced as regularly (I will need to revisit that).
MY QUESTIONs If I don't care about the feedback info provided by timed loops:
-What timed loop implementation is most efficient and results in the best performance... a timed loop, while loop w/ wait ms function, or while loop w/ wait until next iteration?
- Differences between a timed loop and while loop w/ a wait until next iteration on a non-RT system?
Information I'm after is performance based (timing, multi-thread, overhead costs) and associated advantages/disadvantages.
(the more technical / under-the-hood the better)
Thanks