Go to Post As we were lying the robot down to work on it "CAD me like one of your french robots" - 1uan [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-03-2005, 19:00
BillyJ BillyJ is offline
Registered User
no team
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Texas
Posts: 13
BillyJ is an unknown quantity at this point
Autonomous loop speed

How quickly does the code in the autonomous section execute? this is in user_routines_fast.c so does that mean it executes as fast as possible? If so, is there some way to limit it so it only executes once every 26.2ms?

thanks
  #2   Spotlight this post!  
Unread 06-03-2005, 19:07
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Autonomous loop speed

Though the autonomous function is in user_routines_fast.c, it is only called every 26.2ms by main.c.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #3   Spotlight this post!  
Unread 06-03-2005, 20:33
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Autonomous loop speed

I thought autonomous is called every 17 ms, and regular was every 26.2
__________________
http://www.mikesorrenti.com/
  #4   Spotlight this post!  
Unread 06-03-2005, 20:37
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
Re: Autonomous loop speed

according to the comments in user_routines_fast.c in the User_Autonomus_Code function. it states that it is a 26.2 millisecond loop

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! */
 
 		/* Add your own autonomous code here. */
 
 		Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
 
 	    Putdata(&txdata);   /* DO NOT DELETE, or you will get no PWM outputs! */
 	}
   }
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


  #5   Spotlight this post!  
Unread 06-03-2005, 22:01
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: Autonomous loop speed

In the User_Autonomous() function is a while loop that runs as fast as it can. Inside that is an if that is satisfied every time data is available each 26 ms. So you can place code inside the if to run it at the same rate as the normal user_routine, or you can place it outside the if (but still inside the while) to run it as fast as possible (like the normal user_routine_fast).
  #6   Spotlight this post!  
Unread 07-03-2005, 22:32
ldeffenb ldeffenb is offline
Registered User
AKA: Lynn Deffenbaugh (Mr)
None #0386 (Team Voltage 386)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Florida
Posts: 75
ldeffenb has a spectacular aura aboutldeffenb has a spectacular aura aboutldeffenb has a spectacular aura about
Send a message via ICQ to ldeffenb Send a message via AIM to ldeffenb Send a message via Yahoo to ldeffenb
Re: Autonomous loop speed

Quote:
Originally Posted by MikeWasHere05
I thought autonomous is called every 17 ms, and regular was every 26.2
17msec is the loop speed on the EduBot. The Full Robot Controller (FRC) gets new OI data every 26.2msec.

Lynn (D) - Team Voltage 386 Software
  #7   Spotlight this post!  
Unread 08-03-2005, 14:10
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Autonomous loop speed

Quote:
Originally Posted by ldeffenb
17msec is the loop speed on the EduBot. The Full Robot Controller (FRC) gets new OI data every 26.2msec.

Lynn (D) - Team Voltage 386 Software
Ahh, thats where that little number got put into my head. I knew it was from somewhere just wasn't sure where. Thanks!
__________________
http://www.mikesorrenti.com/
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop execution time for Autonomous code Transporter08 Programming 2 13-02-2005 16:17
Rewriting main loop Max Lobovsky Programming 4 04-01-2005 18:35
Despite what IFI says, you can configure autonomous from OI... TedP Programming 19 31-03-2004 10:09
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11


All times are GMT -5. The time now is 20:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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