|
Re: Timing Autonomous with While Loops?
Loops are used/required a couple of places, such as Robot Main and Periodic Tasks.vi
User programs loop to keep working and checking for driver packets, changes of robot state (Disabled/Enabled/Teleop/Autonomous), etc.
If you have to check constantly to see if a limit switch is reached then a loop can be used (just always throttle it with a Wait). If the operation is commonly used both for Teleop and for Autonomous, then a loop in Periodic Tasks might be a better location for it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 06-03-2015 at 14:23.
|