Go to Post The only thing a team needs to survive is people who want it to survive. - Ryan Foley [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-02-2012, 15:26
JP Carlin's Avatar
JP Carlin JP Carlin is offline
Registered User
FRC #2487 (Mechanical Animals)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Sayville NY
Posts: 42
JP Carlin is on a distinguished road
robot drive isn't running fast enough...

we are getting an error that "the loop that contains robotdrive is not running fast enough." we program in labview and this error even occured when we made a fresh project with only the drive code we still get this error. could it be the two year old jaguars we are using?? plz help
  #2   Spotlight this post!  
Unread 09-02-2012, 16:02
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,534
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: robot drive isn't running fast enough...

The error messages you are seeing are not related to the actual 'speed' of your drive. They refer to how often new data is sent to the motor controllers.

This can be the result of running the robot on a congested network, clicking the run button rather than permanently deploying the code, or having time consuming loops in your teleop.

If you are developing on your driverstation computer, it can be a result of having 2 accounts running at the same time (driver station and developer), or having too many programs open.
  #3   Spotlight this post!  
Unread 16-02-2012, 19:20
Pirate programe's Avatar
Pirate programe Pirate programe is offline
Registered User
FRC #0354
 
Join Date: Jan 2012
Location: Queens,NY
Posts: 53
Pirate programe is an unknown quantity at this point
Re: robot drive isn't running fast enough...

Quote:
Originally Posted by Tom Line View Post
This can be the result of running the robot on a congested network, clicking the run button rather than permanently deploying the code, or having time consuming loops in your teleop.
Loops? We don't have any loops in our teleop code, just case structures and select functions. But we still seem to be getting this error. Do case structures actually have the same overhead as a For/While loop, or what?
Attached Thumbnails
Click image for larger version

Name:	scrncap.png
Views:	115
Size:	28.2 KB
ID:	11930  

Last edited by Pirate programe : 16-02-2012 at 19:22.
  #4   Spotlight this post!  
Unread 16-02-2012, 21:05
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,753
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: robot drive isn't running fast enough...

Neither case structures nor the loop have much overhead. But if you add code that delays teleop you will see this. If this happens using a loop, it isn't actually the loop that is the problem.

In this case, the issue is that the Mecanum is only called when button 1 is pressed. I can't see the code in the other case, but assume it is not calling the Mecanum Update. If you call teleop but it doesn't call Update for 100ms, that will still result in the safety mechanism halting the motors.

Greg McKaskle
  #5   Spotlight this post!  
Unread 16-02-2012, 21:42
CRLS97 CRLS97 is offline
Registered User
FRC #0097
 
Join Date: Jan 2011
Location: Cambridge
Posts: 28
CRLS97 is an unknown quantity at this point
Re: robot drive isn't running fast enough...

Quote:
Originally Posted by Greg McKaskle View Post
Neither case structures nor the loop have much overhead. But if you add code that delays teleop you will see this. If this happens using a loop, it isn't actually the loop that is the problem.

In this case, the issue is that the Mecanum is only called when button 1 is pressed. I can't see the code in the other case, but assume it is not calling the Mecanum Update. If you call teleop but it doesn't call Update for 100ms, that will still result in the safety mechanism halting the motors.

Greg McKaskle
Quick question when you say it doesn't update the Mecanum (for the code above)- just to clarify, you mean it has to update it in any way possible and it won't matter if in one case statement I have Arcade Drive and another Tank Drive? but they're still coming from the same Drive Ref.? As long as the Drive Ref gets some sort of update within every 100ms it's good, correct?
  #6   Spotlight this post!  
Unread 17-02-2012, 15:23
Pirate programe's Avatar
Pirate programe Pirate programe is offline
Registered User
FRC #0354
 
Join Date: Jan 2012
Location: Queens,NY
Posts: 53
Pirate programe is an unknown quantity at this point
Re: robot drive isn't running fast enough...

Quote:
Originally Posted by CRLS97 View Post
As long as the Drive Ref gets some sort of update within every 100ms it's good, correct?
I don't see any reason why that wouldn't be true, but keep in mind that updating the same drive train with two different VIs could possibly cause conflicts.
  #7   Spotlight this post!  
Unread 17-02-2012, 20:40
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,753
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: robot drive isn't running fast enough...

I'm pretty sure that is correct. The various drive options just do a bit of math and update the motor group. The RobotDrive refnum returned from the Open is the thing that has the timer associated with it. So, update the drive every 100ms or turn off the safety feature or you will receive a message and the robot motors will be zeroed in the timeout case.

Greg McKakle
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi