Thread: Robot Main.vi
View Single Post
  #6   Spotlight this post!  
Unread 06-03-2010, 01:18
Greg Hoagland Greg Hoagland is offline
Registered User
FRC #0812
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: San Diego
Posts: 1
Greg Hoagland is an unknown quantity at this point
Re: Robot Main.vi

Quote:
Originally Posted by Greg McKaskle View Post
In reality, you don't even need to modify RobotMain, but instead need to modify the Team Code folder.
Greg McKaskle
I'm a relative newbie to Labview and was thinking that our team wouldn't need to modify RobotMain. Weve only been modifying code in the Team Code folder however we ran into a problem today in our first 3 matches in the San Diego regional today that caused our Robot to immediately stop when it switched from Autonomous mode to TeleOp mode.

The problem is as follows: Within RobotMain, the conditional terminal in the while loop is wired to the output of the case structure whose selector is the Robot Mode. It turns out this wire into the conditional terminal is undefined for all Robot Modes except "FINISH". I may be wrong, but it seems to me that unless RobotMain is modified to explicitly define the value on this wire for all Robot Modes, a robot may randomly stop. Our team made this change after the 3rd match, and we were able to complete the remainder of our matches successfully.

I was very surprised we hadn't run into this problem in any of our pre-regional testing but I'm guessing that this undefined boolean wire value takes on a random memory value and again I'm guessing that most memory is zeroed out so this undefined wire value is probably FALSE most of the time so the while loop in RobotMain doesn't stop prematurely.

Does it seem reasonable to others that RobotMain could randomly stop if it isn't modified to fix this issue?

If this is an issue it would probably be good if NI could put out a new LabView release to fix this becaue I bet a lot of teams aren't fixing this. I checked one other team at the SD regional and they were running RobotMain unmodified.
Reply With Quote