Go to Post Once you go hex you'll never go back. - sdcantrell56 [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

 
Reply
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 15-03-2010, 16:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Autonomous runs during Teleop

Quote:
Originally Posted by garrettg View Post
This should be the code in it's broken entirety. Enjoy.
OK Greg, the ball's in your court :-)


~
Reply With Quote
  #32   Spotlight this post!  
Unread 15-03-2010, 16:28
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Autonomous runs during Teleop

Quote:
Originally Posted by Greg McKaskle View Post
Next using either Find or the hierarchy window, determine if you are explicitly calling the Autonomous Independent VI.

Greg McKaskle
As you predicted, this is the issue. You can see in the attached code posted above that the call from Robot Main that is typically to Autonomous Iterative has been replaced with a call to Autonomous Independent.

For any others having this problem this is a good first thing to check. To use Autonomous Independent, the only thing you have to do is make sure that the enum at the top of Begin.VI is set to Independent and then place your code inside the existing Autonomous Independent VI accessed from the Project Explorer.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #33   Spotlight this post!  
Unread 15-03-2010, 16:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Autonomous runs during Teleop

Quote:
Originally Posted by Vikesrock View Post
As you predicted, this is the issue. You can see in the attached code posted above that the call from Robot Main that is typically to Autonomous Iterative has been replaced with a call to Autonomous Independent.

For any others having this problem this is a good first thing to check. To use Autonomous Independent, the only thing you have to do is make sure that the enum at the top of Begin.VI is set to Independent and then place your code inside the existing Autonomous Independent VI accessed from the Project Explorer.
Hi Kevin,

Do you know if there's a document somewhere which clearly explains this? If so, I want to make sure our programmers go read it thoroughly. They're working on autonomous now.

Thanks.

~
Reply With Quote
  #34   Spotlight this post!  
Unread 15-03-2010, 16:55
garrettg garrettg is offline
Registered User
FRC #1528 (Monroe Trojan Robotics (formerly iPirates))
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Monroe, MI, USA
Posts: 10
garrettg is an unknown quantity at this point
Re: Autonomous runs during Teleop

So I should replace auto indep in robot main with the iteritive VI, and then that code should work?
Reply With Quote
  #35   Spotlight this post!  
Unread 15-03-2010, 17:02
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Autonomous runs during Teleop

that, and from what it sounds like, make sure that the begin.vi states that you are using the autonomous independent function instead of iteritive. this seems a little counter intuitive to me but if it works then it would save people a lot of time.

please try it and let us know how it goes
Reply With Quote
  #36   Spotlight this post!  
Unread 15-03-2010, 17:04
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Autonomous runs during Teleop

Quote:
Originally Posted by garrettg View Post
So I should replace auto indep in robot main with the iteritive VI, and then that code should work?
Greg could tell you with more certainty than I can, but yes that is what appears to be wrong with the code. The Autonomous Independent VI is called from inside the Get Competition Mode VI by the default code when the mode in Begin is set to Independent and is aborted by the same VI when the mode is switched away from Autonomous.

Because your call was separate it was not being aborted by the Get Competition Mode VI.

Ether,
I will look around and see if this is spelled out in any documentation I have at the moment or not. I learned a lot of this through reading the comments that are in the default code and poking around inside some of the VIs such as the Get Competition Mode VI.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #37   Spotlight this post!  
Unread 15-03-2010, 17:15
garrettg garrettg is offline
Registered User
FRC #1528 (Monroe Trojan Robotics (formerly iPirates))
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Monroe, MI, USA
Posts: 10
garrettg is an unknown quantity at this point
Re: Autonomous runs during Teleop

Our robot is currently out of the bag for the next hour and 45 minutes, so I will test this adjustment when build gets build problems out of the way (I might not get to try this today, but should be able to try tomorrow).

Edit: I was able to test it today, and the change of having Iteritive in Robot Main got Independent to kick out on time. I don't understand why though. Anyone mind explaining in the clearest way possible why Iteritive needs to run if you want Independent? All help given is greatly appreciated, and I doubt I'm the only one to have changed Robot Main like this.

Last edited by garrettg : 15-03-2010 at 20:24. Reason: Didn't want to double post.
Reply With Quote
  #38   Spotlight this post!  
Unread 15-03-2010, 20:43
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,748
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: Autonomous runs during Teleop

I just got home from work and looked at the code. To fix the auto that won't stop, delete the call from the Robot Main. It is not necessary to call the iterative there as it is an empty template anyway.

Begin VI is still set for using Independent, and the AutoIndependent VI is the one that it will call and abort.

I'll post again with more explanation of what the framework does, why this behaved the way it did, and where the docs are.

Good Luck with your auto.
Greg McKaskle
Reply With Quote
  #39   Spotlight this post!  
Unread 15-03-2010, 21: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,748
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: Autonomous runs during Teleop

There are tutorials on NI.com/first and on the LVMastery.com sites. I'll admit that I didn't write them, and I haven't watched all of them for correctness, but they should show how to write the autonomous that works.

The other documentation on the framework is in the code itself. The green comment to the left of the loop in RobotMain states

Quote:
Robot Main implements the framework and scheduler for your robotics program.

It should not be necessary to modify the framework. You should be able to implement your code within the following VIs. ...
As usual, more documentation can be added, especially once we know what the misunderstandings are. Actually, no final decision yet, but we may look at some simplifications while we are at it. The initial framework was a widely cast net, intended to support many different programming styles and abilities. Now that we've seen what most teams prefer to use, I think it can be vastly simplified.

Back on topic, the auto was supported in two ways, independent and iterative. Iterative is basically the same as TeleOp -- called for each packet, expected to complete in under 20ms, and no easy support of sequences or repetitive code. Independent, on the other hand, is called once asynchronously, is automatically aborted when auto is over, making it east to do sequences and repetitive tasks. The way Iterative is called is pretty obvious, a subVI call for each packet. Independent is less obvious. In Begin, a VI reference is designated as being the AutoIndependent VI reference. Then the Get Mode VI in the Robot Main loop will automatically run the referenced VI when auto begins and abort it when the period completes. The syntax for calling and aborting was intentionally hidden in part because it is complicated by the different state transitions of the DS, and partly to prevent it form becoming broken by curious programmers.

By adding a subVI call to Auto Independent, the Run method will return an error. It is a little complicated, but VIs have a number of states they can be in (Broken, Idle, Active, Running, Reserved, Suspended, and I'm sure more that I can't remember off the top of my head) which define the operations that are valid on the VI. Run only works on Idle VIs. SubVIs are Reserved by their caller, so are not runnable because the are callable. Anyway, For that reason, I'm pretty sure the VI refnum was invalid so that Abort also failed. To be more sure what the value of the refnum was from the failed Run, I'll need to run that app.

Anyway, if there are any more questions or any more things to learn from this, fire away.
Greg McKaskle
Reply With Quote
  #40   Spotlight this post!  
Unread 15-03-2010, 22:10
Madification's Avatar
Madification Madification is offline
Registered User
FRC #2486 (CocoNuts)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2007
Location: Northern Arizona
Posts: 9
Madification has a spectacular aura aboutMadification has a spectacular aura about
Re: Autonomous runs during Teleop

Our bot is definately doing the same thing but I'm Build and Chairman's team so I have no idea what you're talking about lol I'll get our programmer to look at this.
__________________
-2008 AZ FTC Regional Inspire Award
-2008 AZ Judges Award
-2009 AZ Chairman's Award
-2010 AZ Engineering Inspiration Award
-2011 AZ Chairman's Award
-2012 UT Engineering Inspiration Award
-2012 AZ Chairman's Award
Reply With Quote
  #41   Spotlight this post!  
Unread 15-03-2010, 22:25
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,748
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: Autonomous runs during Teleop

If you can't find the issue, post code to this thread. There are lots of people willing to help.

Greg McKaskle
Reply With Quote
Reply


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
Directions During Autonomous helenajoy NI LabVIEW 2 22-02-2010 19:30
HELP!!!! we need help w/ compressors/pneumatics for teleop/autonomous in LABVIEW rokenboker NI LabVIEW 9 05-02-2010 17:10
Scoring During Autonomous Mode KrakatoaCoo Rules/Strategy 7 15-01-2010 16:16
Labview Autonomous AND Teleop Two-Face Programming 1 14-02-2009 18:33
No Tracking During Autonomous jdejoannis Programming 4 10-02-2007 14:46


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

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