LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop timing & Execution differences (non-RT system)

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

0 Kudos
Message 1 of 4
(2,768 Views)

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

Chris Bakker
SET Americas
CEO

0 Kudos
Message 2 of 4
(2,729 Views)

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?

 

 

0 Kudos
Message 3 of 4
(2,718 Views)

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.

 

How Many Threads Does LabVIEW Allocate?

 

 

Timed loops work with AMD processors

Chris Bakker
SET Americas
CEO

0 Kudos
Message 4 of 4
(2,701 Views)