Re: time spent in loop
- From: altenbach <x@xxxxxxxx>
- Date: Mon, 12 Mar 2007 12:10:14 -0500 (CDT)
I think your loop time is entirely determined by the hardware interaction, so the the timing is insignificantly fast in both cases.
However you current timing code is heavily flawed because it is impossible to tell at what time the first tick count is taken (No data dependency!). Most likely, the first tick count executes BEFORE (or in parallel to) the "OPEN1" and "OPEN2" nodes, so you are actually including their times in the measurnements. Remember, LabVIEW does not execute left-to-right. Any node that does not need to wait for inputs is ready to execute immediately.
You need to place the first tick count inside a sequence frame too to ensure it executes right before the FOR loop. For exact timings use a 3-frame sequence as in the image.
<img src="http://forums.ni.com/attachments/ni/170/234989/1/PreciseLoopTime.png">
Make sure that everything that should not be timed is before or after the sequence. Also make sure there is no code that can run parallel to the sequence.Message Edited by altenbach on 03-12-2007 10:01 AM
PreciseLoopTime.png:
http://forums.ni.com/attachments/ni/170/234989/1/PreciseLoopTime.png
.
- References:
- Re: time spent in loop
- From: brianlachlan
- Re: time spent in loop
- From: altenbach
- Re: time spent in loop
- From: brianlachlan
- Re: time spent in loop
- From: altenbach
- Re: time spent in loop
- Prev by Date: Re: graphing signals xy
- Next by Date: Re: Multiple use of the Indicator terminal
- Previous by thread: Re: time spent in loop
- Next by thread: White Paper - Multi Process Realtime & Compact Fieldpoint
- Index(es):
Relevant Pages
|