Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Loop execution time for Autonomous code (http://www.chiefdelphi.com/forums/showthread.php?t=34494)

Transporter08 12-02-2005 14:13

Loop execution time for Autonomous code
 
I know that the speed of execution for a non-autonomous code loop is 26.2 ms, but I jcan't find documentation of how long an autonomous code will take to loop. What is the correct time, for counter purposes?

AIBob 12-02-2005 14:22

Re: Loop execution time for Autonomous code
 
If you look at the code, it shows the autonomous mode and the non-autonomous mode called at the same time, so I am pretty sure it is the same time for a loop in autonomous mode as it is in non-autonomous mode.
they might be off by a microsecond or two, because of the functions called, but they're basically the same

ConKbot of Doom 13-02-2005 16:17

Re: Loop execution time for Autonomous code
 
If you look at the beginning of User_Autonomous_Code() you see
Code:

while (autonomous_mode)  /* DO NOT CHANGE! */
  {
    if (statusflag.NEW_SPI_DATA)      /* 26.2ms loop area */
    {
        Getdata(&rxdata);  /* DO NOT DELETE, or you will be stuck here forever! */

the non-autonomous mode code only excecutes on the first cycle of the autonomous mode, after that, it is in that loop there.

So that gets executed every 26.2ms, and Process_Data_From_Master_uP() is not.

I'm not sure what you are asking, do you want to know how long it takes for the code to run?


All times are GMT -5. The time now is 18:17.

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