|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
|
#3
|
||||
|
||||
|
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
|
|||
|
|||
|
Re: Multiple Autonomous Codes Question
Quote:
|
|
#5
|
||||
|
||||
|
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
|
|||
|
|||
|
Re: Multiple Autonomous Codes Question
Quote:
|
|
#7
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Multiple Autonomous Codes Question
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
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |