


This is called only once, but it is expected that tasks in here will execute within a never ending While loop or a Flat Sequence structure. Periodic Tasks.vi gets the complex time-consuming actions that need much time to complete, like a catapult that needs to be released and cocked again as part of a single joystick button press.Ĭompared to computer speed it takes a very long time to physically pull back a mechanism, latch it, and release it again.Īnything that makes you want to add a time delay or have to wait for a sensor to tell you it's ready can more easily be done in Periodic Tasks.vi than anywhere else. Teleop.vi gets the flow-through actions, such as driving via the joysticks, that don't require delays to give a mechanical mechanism time to complete operation.
#FRC DRIVER STATION 2014 CODE#
Normal driver operating code will usually be split between Teleop.vi and Periodic Tasks.vi That means no While loops, no wait timers, no Watchdog Feed & Delay. If this vi takes too long to execute, then your driver controls will respond sluggishly, sporadically, or not at all. Do NOT write code in here that waits or takes more than a few milliseconds to execute. This is called 50 times each second as the Driver Station control packets arrive. You don't leave this, so waits and delays can be used as desired here. This is called only once, so put everything you want done during Autonomous Mode here. It is set to be automatically called and adding your own calls will disrupt that background process and can cause your robot to be inoperable during teleop. The Framework is setup here in Begin.vi to automatically call the Autonomous Independent.vi at the start of Autonomous Mode and to automatically kill it when Autonomous Mode ends.ĭo NOT add an explict call to this vi in your code. This is called only once at the very start. Open all your devices here, and create refnum names to uniquely identify each of them. Nothing outside should be touched until you hit the Advanced slopes. If you add vi's of your own they should also be kept here. The Team Code folder contains all the code you should normally modify to fit your robot and game plan.

#FRC DRIVER STATION 2014 PC#
cRIO).Īn odd side effect of this is that if you drop a library vi onto a blank vi just to drill down to study the internals, then you will probably get the PC version and you'll be studying how the cRIO simulator works, not how the robot version of the code works. The proper version of the library code gets loaded depending on the current Target (PC vs. This introduced two different versions of many of the WPILib vi's, one for executing stand-alone on a PC and another for standard operation on the robot cRIO. Special note on the library vi's: Starting in 2013 the cRIO simulator was added.
