Thread: CPU loop speed
View Single Post
  #3   Spotlight this post!  
Unread 14-01-2006, 18:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: CPU loop speed

(I don't have a copy of the code handy, so please forgive small errors in function names.)

The "fast" loop, process_data_from_local_IO(), is essentially called again as soon as it returns, so it runs more often if it takes less time. Ours two years ago was quick enough to deal with polling digital sensors that changed every couple of milliseconds. The "slow" loop, Default_Routine(), is called every time there is a new communication packet available from the OI, approximately 39 times per second.

I have no idea where your "1.36 seconds" came from.