Go to Post There are times when all of us - myself included - need a virtual *poink* to the back of the head and someone to say "wake up and stop behaving like a three-year-old." - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2012, 00:37
ehlochbr ehlochbr is offline
Registered User
FRC #2990
 
Join Date: Nov 2010
Location: Salem, OR
Posts: 37
ehlochbr is an unknown quantity at this point
Robot Drive running too slow????

Hi,

We've been consistently getting an error that says the loop that contains robot drive is running too slow and it talks about a possible WHILE loop causing the delay.

I've looked everywhere and can't find anything wrong. At first, I thought I could ignore this but it's starting to cause lag with our robot.

I've been getting this error ever since we re-imaged the crio with the 2012 image. I recently started a new project file and was getting this error after I first deployed it so I know it's not something I added.

Has anyone seen this error and figured out what to do about it. Thanks for your help!
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2012, 01:16
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Robot Drive running too slow????

I've had similar problems with our cRIO a few updates back. Does the diagnostics page on your Driverstation give you the location of where it might possibly be? Or perhaps where resources are being taken up?

Also I'd try removing anything that isn't required, such as the vision processing.vi and camera functions located though out code.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2012, 01:37
ehlochbr ehlochbr is offline
Registered User
FRC #2990
 
Join Date: Nov 2010
Location: Salem, OR
Posts: 37
ehlochbr is an unknown quantity at this point
Re: Robot Drive running too slow????

No, the error message is very vague. It doesn't specify what vi the problem might be in (which is weird considering all the other errors I've seen do).

I can't take out the vision code because we're going to use it this year. That's why I need to get this problem resolved, so this recurring error doesn't slow down our robot anymore than the vision code already does.

How did you make this problem go away?
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2012, 01:41
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Robot Drive running too slow????

It was fixed when I had updated all my software of LabView, Driverstation, and cRIO to the latest updates. Although I'm certain back when those updates weren't available, they were still updated to the most recent at the time.

You could attempt disabling the periodic tasks.vi temporarily to see if that accomplishes anything. I know that can eat up a lot of CPU power for the cRIO slowing it down as it has two while loops inside of there, one of which involves the robot drive.
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2012, 07:50
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: Robot Drive running too slow????

If you are processing vision, that is likely to be a part of the problem. The vision will use a pretty good amount of CPU for the time it takes to process the image. Higher priority tasks will take cuts, but some tasks could get starved out while that proceeds.

In the game, wen you aren't using the info from the camera, perhaps you should toggle the enable off or slow the frame rate. Also, the loops in periodic do not have to use much CPU. It depends on what is placed in them or how often they are asked to run. Loops that run numerous times with no delay in them are truly what eats the CPU.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 31-01-2012, 08:05
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Robot Drive running too slow????

Quote:
Originally Posted by Greg McKaskle View Post
If you are processing vision, that is likely to be a part of the problem. The vision will use a pretty good amount of CPU for the time it takes to process the image. Higher priority tasks will take cuts, but some tasks could get starved out while that proceeds.

In the game, wen you aren't using the info from the camera, perhaps you should toggle the enable off or slow the frame rate. Also, the loops in periodic do not have to use much CPU. It depends on what is placed in them or how often they are asked to run. Loops that run numerous times with no delay in them are truly what eats the CPU.

Greg McKaskle
Ah pardon my mistaken then.
Reply With Quote
  #7   Spotlight this post!  
Unread 31-01-2012, 09:29
ehlochbr ehlochbr is offline
Registered User
FRC #2990
 
Join Date: Nov 2010
Location: Salem, OR
Posts: 37
ehlochbr is an unknown quantity at this point
Re: Robot Drive running too slow????

Thanks for the replies. I'll look into trimming down the vision code, but please consider this. Yesterday, I edited the code to take all the vision code away and ran a test. The performance was better but we were still getting the error.

So I get this error regardless of if there is vision code or not. I can't figure out where it's coming from.
Reply With Quote
  #8   Spotlight this post!  
Unread 31-01-2012, 11:32
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: Robot Drive running too slow????

To help locate where this is, in Begin, you are probably opening a single RobotDrive with some numbers of motors. You are probably saving that in the registry with a name. You may want to hit Ctl-F and locate all of the places where you are updating the named RobotDrive. One of those locations is sometimes taking more than 100ms between updates -- the default timeout for the Safety watchdog. If you cannot determine which ones, post some images of ones you are unsure of. There are typically not that any updates to RobotDrive.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 31-01-2012, 12:38
ehlochbr ehlochbr is offline
Registered User
FRC #2990
 
Join Date: Nov 2010
Location: Salem, OR
Posts: 37
ehlochbr is an unknown quantity at this point
Re: Robot Drive running too slow????

Ok. I'll be working on it tonight so I'll try to grab some images and post them. Thanks so much for the input!
Reply With Quote
  #10   Spotlight this post!  
Unread 01-02-2012, 11:58
ehlochbr ehlochbr is offline
Registered User
FRC #2990
 
Join Date: Nov 2010
Location: Salem, OR
Posts: 37
ehlochbr is an unknown quantity at this point
Re: Robot Drive running too slow????

Apologies but I did not get the chance to work on this issue last night like I said. I got side tracked trying to fix another issue. No update yet.
Reply With Quote
Reply


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 08:49.

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