Go to Post When mentors and students battle it's the team that loses. - Koko Ed [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 04-02-2009, 19:48
Comatose Comatose is offline
Registered User
AKA: Lead Student Programmer
FRC #0135 (Penn Robotics)
Team Role: Programmer
 
Join Date: Sep 2008
Rookie Year: 2008
Location: United States of America
Posts: 27
Comatose is an unknown quantity at this point
Multiple autonomous?

In Labview, is there a way to load multiple autonomous programs for different situations onto the cRIO, maybe even include it in the robot main? If this is possible, is there a way between matches that you could choose which one you want to use from a computer hookup?

Thanks, Comatose
  #2   Spotlight this post!  
Unread 04-02-2009, 19:55
Urban Hawk Urban Hawk is offline
Head of R&D and Head of Scouting
FRC #1886
Team Role: Scout
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Urbana, maryland
Posts: 118
Urban Hawk is infamous around these partsUrban Hawk is infamous around these partsUrban Hawk is infamous around these parts
Re: Multiple autonomous?

well you can always change the programming of the robot in the pit so you could have several versions of autonomous saved on computer and then reprogram it while in the pits to fit the circumstances.
__________________
FEAR THE HAWK!!!
  #3   Spotlight this post!  
Unread 04-02-2009, 20:16
Cjmovie's Avatar
Cjmovie Cjmovie is offline
1293 Resident Hacker
AKA: Christopher Corsi
FRC #1293 (D5 Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: SC
Posts: 73
Cjmovie is a name known to allCjmovie is a name known to allCjmovie is a name known to allCjmovie is a name known to allCjmovie is a name known to allCjmovie is a name known to all
Re: Multiple autonomous?

I'm not using labview, however:

You might want to wire some switches up to the digital input headers on the drivers station. Then you can just have control blocks that run one piece of code if switch 1 is active, another for switch 2, etc.
Just make sure when wiring the switches up you use a pull-up resistor! A forum search should enlighten you on how to do this.

Then simply set the switch before the match, and you're good to go.
__________________
D5 Robotics, Team 1293: Programmer, CAD'er, Mechanical, Electrical... I've made my rounds.
Events: 2006-2009 Palmetto Regional
Website: http://d5robotics.org/
  #4   Spotlight this post!  
Unread 04-02-2009, 20:42
p00rleno p00rleno is offline
Team Advisor & Former Team Leader
AKA: Andy
FRC #2590 (Nemesis)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2007
Location: NJ
Posts: 29
p00rleno is on a distinguished road
Re: Multiple autonomous?

Could always make a sort of jumper if you have unused I/O ports, then read which one is closed to decide which autonomous code to use with a case structure. Or, just have a constant in the code and change it/redownload based on what you want to do
  #5   Spotlight this post!  
Unread 04-02-2009, 21:49
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Multiple autonomous?

Quote:
Originally Posted by Comatose View Post
In Labview, is there a way to load multiple autonomous programs for different situations onto the cRIO, maybe even include it in the robot main? If this is possible, is there a way between matches that you could choose which one you want to use from a computer hookup?

Thanks, Comatose
Comatose,

The answer to your first question is to create a case structure and use a constant to select which case you want. Eventually, you may wish to make the selection external with switches or jumpers...

Your second question is where to put the code. I strongly suggest that you watch this video tutorial and then post with additional questions you may have.

Regards,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #6   Spotlight this post!  
Unread 04-02-2009, 21:54
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Multiple autonomous?

Quote:
In Labview, is there a way to load multiple autonomous programs ...
Absolutely. In the basic framework there is the static reference to the Auto Independent. In the Advanced framework, this is in the Begin VI. The approach will be to make a VI reference to an additional VI. The one wired out and going into the Get Mode will be the one selected when the DS transitions to auto mode.

To make another VI for autonomous, open the Auto Independent VI and Save As... to a new file leaving the existing stuff alone. Drag a copy of the static VI reference (a container with a tabbed corner) and place it near the current one. Drag the new VI on top of the static VI reference node. Now you should have two static refs one pointing to each VI. You now need to have some logic to select which one is wired out. You can use a text file, a dip switch, a digital switch on the robot, etc. If you want to use the data coming from the DS, you should wire all of the VI refs into the loop and select inside of the loop.

If you want to, you can even use VI paths and have a full directory of stuff to run. The static VI ref is an easy way to make sure that the VI gets deployed to the cRIO and loaded into memory. But if you update the project build spec or use ftp, you can put as many VIs on disk as you like. Then instead of using the static VI ref, you use the VI Open node with a path to the VI on the cRIO. Now you need a way to select which one runs. Again, you likely want to put this inside the loop that calls Get Mode.

Greg McKaskle
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
[FTC]: Multiple Programs or One Program with Multiple Auto Modes kevin51292 FIRST Tech Challenge 4 02-01-2009 20:37
Hosting multiple sites in multiple VMs EHaskins Website Design/Showcase 6 22-12-2007 01:09
multiple autonomous modes using easyc cerberus170 Programming 3 20-02-2007 15:01
Multiple programs/autonomous routines galewind Programming 12 09-01-2004 22:25


All times are GMT -5. The time now is 21:51.

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