|
Re: Loop Timing on Robot Drive
The error you're experiencing ("the loop that contains RobotDrive is not running fast enough...") occurs when the default safety timers within the drive code trip. Whenever the drive motors go >100ms without an update, the motors will be disabled. This prevents things like runaway robots.
When you set the wait on your loops to be 100ms, you're cutting this threshold very close. The Wait VI is not extremely precise (it's good enough for our purposes but there are ways to do it with more accuracy), and it's possible that your loop times could differ by a little bit, thus tripping the safety.
If you reduce the wait on your loop (~20ms is usually pretty good - that's the speed at which new packets are received by the robot), you should eliminate this problem. Times greater than 20ms often occur some control lag, since new data is being sent faster than the robot can process it, and you want your loops throttled somewhat to be nice to the CPU. 20ms is a pretty good number for this.
|