View Single Post
  #7   Spotlight this post!  
Unread 22-01-2011, 19:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,793
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Switching from Autonomous to Tele-op

I'd recommend opening devices in Begin.vi and nowhere else.
I think that's your basic issue here.

What you posted has some problems, but the full answer is in all your code, not just this one piece. I'm just speculating because I'd need to see the rest of your code to positively tell you what 's wrong.

What is happening is that you are opening your drive motors in this vi, then going into an infinite loop. This vi (and only this Autonomous Independent.vi) gets killed automatically at the end of the Autonomous period. That means the Motor closes never happen by the way and they maintain the last value given them in the Autonomous loop.

I bet you try to open the motors again somewhere else (like in Begin.vi maybe?) and that leaves the motor reference in Teleop.vi invalid. You can't Open the same motor more than once.

So Autonomous leaves your motors running forever, and Teleop can't reference those same motors, as it normally should, to stop them.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-01-2011 at 19:40.
Reply With Quote