FIRST Forums  

Go Back   FIRST Forums > General Discussions > FIRST Programs > FIRST Robotics Competition > Competition Discussion > Programming > LabView

Reply
 
Thread Tools
  #1  
Old 04-16-2012, 01:16 PM
TRx145coder TRx145coder is offline
Junior Member
 
Join Date: Apr 2012
Location: Upstate New York
Posts: 3
Default Autonomous to Teleop

Our robot this year was designed to be a "dumper". Two of our 3 autonomous routines were designed to use an encoder to measure distance, then once that distance had been met, to execute our "dump" routine. This worked fine if the robot didn't hit the fender. Unfortunately, the kids sometimes mis-aligned the robot and it would hit the fender and not reach the magic encoder value. When the field system transitioned from autonomous to teleop, our robot received a "No Robot Code" message, and our only solution at that point was to reboot the cRIO, which took about a minute of our teleop time. After having that happen 3-4 times on Friday, we modified our autonomous to a "do nothing" mode.

My question centers around the switch from autonomous to teleop. Is our observation that autonomous wasn't fully completed when the switch to teleop occurred the reason behind our "No Robot Code" error? Our assumption was that the teleop.vi would take off regardless of the end state of autonomous, once the field system indicated the switch. I have attached our autonomous vi for your viewing pleasure.
Attached Files
File Type: vi Autonomous Independent.vi (100.9 KB, 5 views)
Reply With Quote
  #2  
Old 04-16-2012, 02:17 PM
Kevin O'Connor Kevin O'Connor is offline
Administrator
 
Join Date: Oct 2011
Posts: 155
Default Re: Autonomous to Teleop

In general the way you described the transition is the way it should work for LabVIEW, regardless of what you are doing in your Autonomous Independent VI when the field/DS state transitions, the Autonomous Independent VI should be terminated and execution should move to the Teleop VI.

I won't have a chance to really take a look at your attached VI until at least after Championships, but were you using CAN by any chance?
__________________
FIRST®
FRC Robotics Engineer
Reply With Quote
  #3  
Old 04-17-2012, 12:09 PM
TRx145coder TRx145coder is offline
Junior Member
 
Join Date: Apr 2012
Location: Upstate New York
Posts: 3
Default Re: Autonomous to Teleop

Yes, we were using CAN.
Reply With Quote
  #4  
Old 04-17-2012, 12:13 PM
Kevin O'Connor Kevin O'Connor is offline
Administrator
 
Join Date: Oct 2011
Posts: 155
Default Re: Autonomous to Teleop

The issue you ran into is specific to teams using CAN with LabVIEW at the end of the Autonomous period from the Autonomous Independent VI. See the last entry on the NI Know Issues list here. Your code would actually run a single call of the Teleop VI, but would lock up on the first call to the motor that was being accessed when autonomous ended.
__________________
FIRST®
FRC Robotics Engineer
Reply With Quote
  #5  
Old 04-18-2012, 01:01 PM
TRx145coder TRx145coder is offline
Junior Member
 
Join Date: Apr 2012
Location: Upstate New York
Posts: 3
Default Re: Autonomous to Teleop

Thank you for your response, the problem was driving me crazy!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.