View Single Post
  #2   Spotlight this post!  
Unread 08-04-2012, 17:36
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
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.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote