Thread: Robot Main.vi
View Single Post
  #3   Spotlight this post!  
Unread 25-01-2010, 21:47
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,751
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: Robot Main.vi

Perhaps the instructor is familiar with FTC where the FMS launches and aborts top level programs. For FRC, it doesn't do this. It is the team's job to start their own program and to pay attention to the control packets. To assist, the WPI libraries and sample code help to schedule code according to the packets.

It is not required to use RobotMain, and the elements for constructing it are in the palette as well. In reality, you don't even need to modify RobotMain, but instead need to modify the Team Code folder. For example, Begin.vi is where you init any I/O you will use and store the references. Teleop is where you use the references and input from joysticks and driver station I/O to update the motors and outputs. Autonomous Independent is what I'd recommend you start with since you don't need to worry about the protocol. The framework will start and stop the VI for you.

Build dashboard data is where you can decide what to send to the dashoard. Finish is where you can release the I/O refnums.

Greg McKaskle
Reply With Quote