LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timing while loop with resolution less than one second

Hi,
I am trying to time a while loop using "elapsed time.vi", but I can only get a resolution of 1 second. Could anyone please tell me is there any method that is able to measure the execution time of a while loop with a resolution of 0.1 or 0.01 second? Thank you.
 
Regards,
Yang
0 Kudos
Message 1 of 6
(3,784 Views)
Hi Yang,

You could use two tick count.vi's. One before the loop and then one after the loop executes. This gives millisecond resolution. See the followin thread

http://forums.ni.com/ni/board/message?board.id=170&message.id=121328&query.id=11484#M121328


Cheers,

--Russ
Message 2 of 6
(3,780 Views)
Yang,

Russ is right, but one or even several milliseconds are quite a long time for recent CPUs, I know there is an interface to a Windows-DLL that gets the actual CPU timer, which give the resolution of the PC crystal clock (usually much much less than 1 µs). I could dig if this is reall necessary..
Greetings from Germany!
--
Uwe

Message 3 of 6
(3,770 Views)
Hi Russ,
Thanks a lot. Now I get it. You are so helpfulSmiley Happy
 
Regards,
Yang

Message Edited by YangLi on 05-10-2006 06:01 AM

0 Kudos
Message 4 of 6
(3,759 Views)
Hi Lul,
You'll be my saviour if there is a method like that, which would be a  solution for another problem that I ve been seeking for long time! I used to think there was no way to measure time with resolution less than 1ms using soft timing. Could you please explain the method? I would like to see whether it can be used to measure a duty cycle with a 1ms period. Maaaany thanks..
 
Regards,
Yang

Message Edited by YangLi on 05-10-2006 06:03 AM

0 Kudos
Message 5 of 6
(3,758 Views)
The first link I found is this:
http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B45EACE3E68356A4E034080020E74861
As it explains everything it should be sufficient to point you toward that.
Greetings from Germany!
--
Uwe

0 Kudos
Message 6 of 6
(3,746 Views)