Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   A simple accurate timer (http://www.chiefdelphi.com/forums/showthread.php?t=52587)

bruss6 23-01-2007 17:42

A simple accurate timer
 
What is the easiest and most accurate delay function or a timer in the user routines_fast.


P.S. One more question... Are there any rules against the use of last year's(2006 kevin's) program???

Thanks

Ben Russell :confused:

Kevin Sevcik 23-01-2007 18:08

Re: A simple accurate timer
 
If you need an accurate timer, you need to use one of TIMER0-4. IFI has examples on their website under White Papers. They're easier than you might think. There is otherwise no way to accuratly time things in the Process_Data_From_Local_IO() function as it simply runs as fast as it runs. If you're talking about timing things in the User_Autonomous() function, you can put a simple counter inside the slow loop and it will increment once every 26.2 ms. So that's a pretty accurate and simple, if slow, timer.


All times are GMT -5. The time now is 03:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi