View Single Post
  #11   Spotlight this post!  
Unread 04-06-2016, 21:25
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,748
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: A few questions about the control system...

The DS sends joystick info at 50Hz, or every 20ms because that is about as fast as needed for a human input device. But this doesn't put any limits on how fast the roboRIO executes code or how fast it commands outputs. The speed controllers used by FRC are capable of a new update about every 5ms, but it is dependent on the model of motor controller.

You don't mention what language you use, but the biggest consideration is to look at what controls the scheduling. The LV template code has periodic task loops that can run at any rate you like and are totally independent of the DS messages. In C++, you'd spawn a thread or task and do anything you like. The Java code can do this as well, but don't ask me for details.

If you see a limit as to how things are being scheduled, it is likely being caused by the framework you are using. I believe that the command-based framework defaults to a 20ms schedule rate.

Also, if you look at the chart tab on the DS, it shows the roboRIO CPU. Unless your CPU is pegged, you don't necessarily need a faster processor, but different code running on it.

Greg McKaskle
Reply With Quote