|
Re: Trouble understanding timed tasks in Periodic vi
The outer loop runs all the time just checking to see if the button has been pressed.
The button can't be pressed any faster than 20ms, because that's how often a fresh command packet arrives from the Driver Station.
The outside Wait is just to keep the outer loop from running as fast as possible and sucking up all the available CPU when it really isn't doing anything. All loops should be throttled by a Wait of some kind, because the Wait releases the CPU for time sharing with other tasks that are running on the cRIO.
The outside Wait can actually be 20ms.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 16-02-2013 at 15:36.
|