08-18-2009 03:20 PM
I use several software timed loops to execute 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").
I've tried implementations w/ timed loops in the past, but it seemed the loops weren't serviced as regularly (I willl 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
08-19-2009 09:58 PM
Hi, I think your question will be answered in this forum discussion.
http://forums.ni.com/ni/board/message?board.id=170&message.id=268167&requireLogin=False
08-20-2009 06:26 AM
It somewhat answers my questions, but not nearly as much as I was hoping for.
Is it true that all timed loops operate on a single thread (4 loops, 1 thread)? (I heard or read this somewhere, but its not logical to me.)
or 4 timed loops on 4 individual threads?
I also remember something about timed loops not working on computers w/ AMD processors? True/fixed?
08-21-2009 06:15 PM
There are 20 exectution threads with 4 priority levels each. The timed loops can use all of these. Here is a KB that details this.
Timed loops work with AMD processors