Go to Post Didn't you know, I can be in two places at once? - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 26-11-2009, 00:48
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: Controlling Autonomous GamePlan

I think this depends whether or not you have time to do a quick switch in your programming and re-download the code before a match, or you have to quickly switch tactics right away and it would be better to flip a physical switch. Which one are you talking about?

If you're talking about the first, here's how I would do it:
Make a case structure and put the code for the different strategies of autonomous in the different cases. Wire up a constant or a dashboard control to the case structure to decide which strategy you want to use. Then before you download your preferred code, switch this constant or control to the case that you want.

If you want something more immediate, there's a whole bunch of different ways for taking the value of a physical switch and using that to determine which case to do. Basically you read from that switch and change the case structure I was talking about depending on its value.

Here's some ideas:

-Throttle on the joysticks:
On the new 2009 joysticks there is a throttle that can be used like a switch if you aren't using it already. This is handy because you don't have to wire anything else extra up to the robot. It is the up-down dial that's front and center. You can read it's value in the code and see if it's greater than or less than 0.5/the middle. This effectively means if it's up or down. Before the match, you can switch this throttle to the desired position.

-Switch on the robot
Go to Radio Shack, buy a switch. Mount said switch on robot. Wire said switch to the digital sidecar. Switch said switch before match. Test said switch in code and switch the case structure depending on its value

-Switch on driver station
Pretty much the same as above, but hook it up to a driver station digital input. Actually, I don't know if this will work because the driver station might not be able to send data to the robot during autonomous during an official match.

Keep in mind it might be nice to put the different code in individual subVIs so that it's cleaner and the case structure isn't huge.
Hope that helps! Please ask if you need something more specific concerning one of these options!
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
 


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
Controlling team 803 Programming 10 21-02-2006 13:56
Controlling motors railerobotics Programming 6 17-01-2006 17:17
Problem controlling a servo Entropia Programming 2 18-06-2005 18:36


All times are GMT -5. The time now is 22:42.

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