View Single Post
  #5   Spotlight this post!  
Unread 05-03-2012, 21:44
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: CPU usage 100% & twitchy robot?

I don't think the behavior has much to do with the teleop code. To see how often it is being called, you may want to put the Elapsed Times VI into teleop. You can find it in the support folder in your project window.

I think the twitch is likely caused by the robot drive motors being updated less than every 100ms. The next issue is to find the code that runs so often or takes so long that it slows down teleop. One place to look is vision, the other is periodic tasks. Finally, Since I can't see the code run in the other case of the button 5 switch, it could be that it is sleeping for a long time and causing the issue, but I suspect this isn't the case.

Greg McKaskle
Reply With Quote