|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Loop timing crio vs. roborio.
FWIW, I teach our programmers (C++) to never depend on the grand loop timing in the robot, always using timers to calculate time offsets. There's no stated SLA around the timing, and I have always been concerned that behavior on the field would vary from tethered operation in a meaningful way.
|
|
#2
|
||||
|
||||
|
Re: Loop timing crio vs. roborio.
The difference could be from quite a number of factors. The most obvious one would be the difference in the loop times. Another big factor is the difference in what is running in the background and how it is being scheduled.
You should expect jitter from using the "Wait Until Next ms Multiple", this is similar to the problem of using Thread.sleep() in Java. If you need more accurate timing you need to use a timed loop structure, which will also tell you if the loop runs too long and a couple of other useful things. Along with the paper from 358 link, this paper from NI has some useful info on the wait functions in LabVIEW RT. Last edited by wt200999 : 28-04-2015 at 16:13. Reason: Thread.sleep() not Time.sleep() |
|
#3
|
|||||
|
|||||
|
Re: Loop timing crio vs. roborio.
I posted about an issue in the Java implementation here. The actual task was not using a hardware interrupt for timing, but rather Thread.sleep(). Is it possible that the 2015 LabVIEW code is doing something similarly non-optimal?
|
|
#4
|
||||
|
||||
|
Re: Loop timing crio vs. roborio.
Quote:
If you require accurate timing, a timed-loop structure will give you sub-millisecon d accuracy at the price of substantially higher CPU utilization. |
|
#5
|
||||
|
||||
|
Re: Loop timing crio vs. roborio.
Ditto the experience here. We experienced less "jitter" (probably not really the correct application of the term, but you get the picture) this year than we historically did with the cRIO. Sorry, no metrics to support that.
|
|
#6
|
||||
|
||||
|
Re: Loop timing crio vs. roborio.
Quote:
This effectively, doubled the PID gains for these loops... Again we really did not see any issue with the elevator with stability.. and as MrRoboSteve pointed out it is probably a better solution to incorporate the delta-t at this high school level, just in case the field impacts the control. We had no programmers with calc yet this year, so we used NXT lego line following example as the start of the conversation, and 3 weeks later, ended with the white paper on the SRX internal PID code. The elevator code ended up with a separate P gain for raising the elevator, and a lower P gain for lowering the elevator, along with the SRX "IZone" implemented. This gave a very quick reacting and stable control for the elevator system. The mechanical gear ratio went from 35:1 minicim at Waterford, to 20:1 CIM at Championships. |
|
#7
|
|||||
|
|||||
|
Re: Loop timing crio vs. roborio.
Quote:
Quote:
Quote:
|
|
#8
|
||||
|
||||
|
Re: Loop timing crio vs. roborio.
Quote:
Quote:
Quote:
So the conversation at hand, is based on the averages for the loop time, and standard deviation from our 2014 code on a cRio, and our 2014 code on the roborio, in the same 50ms loop. The cRio data: 2014 Avg = 49.9796 with STD = 0.21929 The roboRIO data: 2014 Avg = 49.95124 with STD = 0.7159 The deviation of the loop by the roboRio is a factor of 3.2646 less repetitive than the same code on the cRio. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|