View Single Post
  #3   Spotlight this post!  
Unread 28-04-2015, 16:42
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,532
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Loop timing crio vs. roborio.

Quote:
Originally Posted by Jared Russell View Post
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?
By design. As someone else already stated, the metronome, or 'wait' in Labview means 'execute no FASTER' than your set time. It does not enforce timing, and if enough CPU is used elsewhere the loop times will vary. Our CPU usage this year was around 65%, and we could count on the wait loops to be very consistent.

If you require accurate timing, a timed-loop structure will give you sub-millisecon d accuracy at the price of substantially higher CPU utilization.