Go to Post Think like a criminal, and write the law to foil them! - Tristan Lall [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 07-02-2009, 12:04
domoarigato's Avatar
domoarigato domoarigato is offline
Team #1208 CCO
AKA: Coony
FRC #1208 (Metool Brigade)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: O'Fallon, Il
Posts: 32
domoarigato is an unknown quantity at this point
Multiple Autonomous Codes Question

Hokay. So our team wants to have multiple different autonomous codes already prepared for when we go to the competition that do different things depending on where we are placed on the field/what we want our robot to do (turn in circles, head for one of our team's corners, etc)...

So basically the main code will stay the same and all I want to do is make a bunch of different autonomous codes that I can load quickly into the robot before we go out on the field. Ah yes. Working in Labview by the way.

My problem is: How do I keep everything the same but just change the autonomous for multiple different fileythings. Like, I tried to just edit the autonomous (even renaming the autonomous vi to like 'spin auto' or something and then going into the main code and changing the normal autonomous reference to 'spin auto') and then I tried the 'save project as' type thing, thinking that I could just rename the project... but for some reason it wants to like... use that new autonomous code for every autonomous called in the other projects and I have no clue why! Should I just start a completely new project from scratch and then redo all the work I did in the main vi too? CopyPasta wasn't working between separate projects.

Thank you in advance for anyone who can help me with this~~~

-Christina
  #2   Spotlight this post!  
Unread 07-02-2009, 12:33
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
Exclamation Re: Multiple Autonomous Codes Question

there was another thread which had the same question as you that i saw a few days back so you should look there. here is where you can find it:http://www.chiefdelphi.com/forums/sh...ad.php?t=73623
__________________
FEAR THE HAWK!!!
  #3   Spotlight this post!  
Unread 07-02-2009, 12:46
domoarigato's Avatar
domoarigato domoarigato is offline
Team #1208 CCO
AKA: Coony
FRC #1208 (Metool Brigade)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: O'Fallon, Il
Posts: 32
domoarigato is an unknown quantity at this point
Re: Multiple Autonomous Codes Question

Ah yes; Have seen that thready. My problem is that when I change and then try to save an autonomous as something else, it for some reason tries to... I don't know... overwrite it and use this new autonomous for every different project...? Even though it's saved under a different name....
  #4   Spotlight this post!  
Unread 07-02-2009, 13:06
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 Codes Question

Quote:
Ah yes; Have seen that thready. My problem is that when I change and then try to save an autonomous as something else, it for some reason tries to... I don't know... overwrite it and use this new autonomous for every different project...? Even though it's saved under a different name....
that is very strange. can you get the code onto the thread.
__________________
FEAR THE HAWK!!!
  #5   Spotlight this post!  
Unread 07-02-2009, 13:15
domoarigato's Avatar
domoarigato domoarigato is offline
Team #1208 CCO
AKA: Coony
FRC #1208 (Metool Brigade)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: O'Fallon, Il
Posts: 32
domoarigato is an unknown quantity at this point
Re: Multiple Autonomous Codes Question

Unfortunately I'm not on the right computer for that at the moment...
But will try to describe the situation as best I can.

So I start out by opening the cRIO project thing that I've been editting for the past forever. It's got an autonomous code for going forward then spinning in the middle of the field which is just still called 'Autonomous Mode' or whatever it started out as. SO. I'll edit it to do something else (say go left and pin an opponent robot into the corner) and save that as maybe 'Autonomous Pin' or something like that. Then I go to the main code and change the reference to the original autonomous code to 'Autonomous Pin' and save the project as something different like "Pin auto code" or something like that. But then I'll want to go back to the original project with the 'Autonomous Mode' code or whatever .... and for that project it thinks 'Autonomous Mode' is the same as 'Autonomous Pin' even though it was clearly saved as something else.... grrrr.....
  #6   Spotlight this post!  
Unread 07-02-2009, 13:23
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 Codes Question

Quote:
So I start out by opening the cRIO project thing that I've been editting for the past forever. It's got an autonomous code for going forward then spinning in the middle of the field which is just still called 'Autonomous Mode' or whatever it started out as. SO. I'll edit it to do something else (say go left and pin an opponent robot into the corner) and save that as maybe 'Autonomous Pin' or something like that. Then I go to the main code and change the reference to the original autonomous code to 'Autonomous Pin' and save the project as something different like "Pin auto code" or something like that. But then I'll want to go back to the original project with the 'Autonomous Mode' code or whatever .... and for that project it thinks 'Autonomous Mode' is the same as 'Autonomous Pin' even though it was clearly saved as something else.... grrrr.....
make sure that the reference and what you save it as are the same. I'm not a labview programmer however i know both visual basic and java and i know that can throw the program if they are not the same. another suggestion is to open an entirely new project and then copy and paste the code into the new file and see if that works.
__________________
FEAR THE HAWK!!!
  #7   Spotlight this post!  
Unread 07-02-2009, 15:24
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 Codes Question

In the other thread it gives the steps.

Some of them you are doing correctly, but I can't tell on others.

1. Make the different autonomous VIs and save them. Notice that when you Save As... LV asks if you want the current references in memory to point to the new file. This isn't what you want. You simply want to make file copy to the new location.

2. Make another static VI reference and drag your new VI to it.

3. Add logic to decide which of these will be run when the FMS or DS transitions to Auto.

You do not want to duplicate the project. Keep the Robot Main and all of the autonomous options in one project.

If you have several static VI refs that point to the wrong files, just drag from the project or the file explorer over then again to point them to the correct set of files. By the way, giving them unique icons will help a bunch to tell them apart.

Greg McKaskle
  #8   Spotlight this post!  
Unread 07-02-2009, 19:07
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: Multiple Autonomous Codes Question

Quote:
Originally Posted by domoarigato View Post
So basically the main code will stay the same and all I want to do is make a bunch of different autonomous codes that I can load quickly into the robot before we go out on the field. Ah yes. Working in Labview by the way.
You might have more luck including all your autonomous routines, each of them as one case of a structure that is controlled by a switch or group of switches on your robot. Instead of trying to reload the software just before a match, just flip the switches appropriately and let the program select the case containing the routine you want to run.
  #9   Spotlight this post!  
Unread 11-02-2009, 16:26
danderson's Avatar
danderson danderson is offline
Lord Alfredo
AKA: Daniel Anderson
FRC #0449 (The Blair Robot Project)
Team Role: Alumni
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Silver Spring, Maryland
Posts: 16
danderson will become famous soon enoughdanderson will become famous soon enough
Re: Multiple Autonomous Codes Question

Okay, why not just create an input value or series of switches to select which autonomous to use, and just have them all in one huge case structure?

This should ignore all problems, as they'd all be in one file
__________________
Over thinking, over analyzing separates the body from the mind.
Withering my intuition leaving all these opportunities behind.


Team 449: The Blair Robot Project

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
Multiple autonomous? Comatose Programming 5 04-02-2009 21:54
multiple autonomous modes using easyc cerberus170 Programming 3 20-02-2007 15:01
Computer with multiple hard drives question. Elgin Clock Technical Discussion 2 03-12-2004 11:41
Multiple programs/autonomous routines galewind Programming 12 09-01-2004 22:25
question for teams created among multiple high schools archiver 2001 20 24-06-2002 03:58


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

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