View Single Post
  #11   Spotlight this post!  
Unread 13-06-2016, 21:33
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: A few questions about the control system...

Quote:
Originally Posted by apalrd View Post
You should have no problem getting 100hz+ execution rate on a RoboRIO.

In the cRIO2 days, in LV, I was able to achieve a 10ms loop time with probes open. Without the overhead of probes, I believe I could have gotten 7ms (143hz), maybe even 5ms (200hz), but that would need more code optimization and very little spare CPU bandwidth. This was all on the cRIO2, with a ~400mhz PowerPC.

On the RoboRIO we continue to use the 10ms loop time, because we don't need to run any code any faster. We use CAN now, and at 1M baud rate there is a limit to how fast you can transmit messages before saturating the bus, but 100hz is plenty for anything I have encountered in FRC.

In general, the fewer devices that need to be interact with each other, the lower latency you will get. I think you can keep all of your code on the RoboRIO and achieve low latency. I would also guess that you can't get low jitter execution above 100hz on an Android device because it's not a real-time operating system. The timing jitter of the cRIO2 (running VxWorks OS) was very good, I haven't measured it on the RoboRIO.
Why are the cRIO and roboRIO so bad at fast loops? Last year, I measured loop times on a 20 ms loop up to 25 ms, average 21 ms. With a $10.99 microcontroller eval board I have sitting in front of me, I can run a loop that does a decent amount of floating point math at 15 kHz with timing jitter so small I can't measure it with my oscilloscope. It's also running a real time operating system that supports threading.

But honestly, for FRC, you probably don't need much more than 200 hz or so.
Reply With Quote