Go to Post I don't like to tempt the gods of inspection on items like this. - MrRoboSteve [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 31-03-2003, 09:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,948
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Thanks for the proper vb tags Greg. I went and read up on the vb Code help after you pointed that out.

Doug,

Here's an example of what one of our autonomous program scripts looks like. We don't recode as in my beginners example above, but we change the script instead. It makes it simpler to change the autonomous movements quickly with less risk of introducing coding errors. We have a graphical interface where you drag and click the cursor on an image of the playing field where you want the robot to go and the script gets generated automatically. When each command is executed a subroutine specific to that command does the proper setup and it gets submitted to a master control routine.

The basic command format is: COMMAND, SPEED, DISTANCE
These values are defined constants. Other commands have some variation on the arguments, for instance, some commands have "on/off" arguments and the arm commands are really POT readings.

Code:
'Basic ramp attack

LeftProg  Data CmdFrwd, SpdFull,  25	'Pull out 
	 Data CmdRght,  SpdFull, 40	'Move in front of ramp
	 Data CmdOpen, SpdFull, 10	'Open arms
 	 Data CmdArmB, SpdFull,  50	'Drop arm
	 Data CmdBack,  SpdFull, 130	'Up ramp
	 Data CmdStop,  SpdStop, 1	'Come to a stop

LeftMax  CON 6   'Auto sequence Maximum entries is 255

RghtProg  Data CmdFrwd, SpdFull,  25	'Pull out	 
	 Data CmdLeft,   SpdFull, 40	'Move in front of ramp
	 Data CmdOpen, SpdFull, 10	'Open arms
 	 Data CmdArmB, SpdFull,  50	'Drop arm
	 Data CmdBack,  SpdFull, 130	'Up ramp
	 Data CmdStop,  SpdStop, 1	'Come to a stop

RghtMax  CON 6   'Auto sequence Maximum entries is 255
The commands are stored in EEPROM by the DATA statement and READ in sequence like a script.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 31-03-2003 at 09:41.
 


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
26 variable limit Gusman1188 Programming 9 12-02-2003 22:38
Coupling the Chiaphua & a variable Drill output Jeff Sharpe Motors 9 13-01-2003 20:21
Variable Amperage in DC Circuit. How? Jordan A. Electrical 4 01-11-2002 20:26
Dashboard programs and the char variable Ian W. Programming 13 26-06-2002 02:07
what teams have a variable transmissions? Greg Perkins Technical Discussion 4 06-03-2002 06:10


All times are GMT -5. The time now is 04:23.

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