Go to Post Robotics season has monopolized my time for the past several weeks so I have not been keeping up with Segway news lately - Stu Bloom [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 08-03-2012, 19:50
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
After enabling, the code takes 9 seconds before it starts running

I've been having this problem since the beginning of the season, and I cannot pin down what is causing it. Around 1/2 of the time we enable the robot (whether wired or wireless, running from laptop or cRIO), the code will not run for around 8 or 9 seconds. I have checked through every VI for any errors, mismatched Refnums, misplaced loops or waits, etc... Nothing! If anyone has had this problem and could point me in the right direction, I would be eternally grateful.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-03-2012, 20:22
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: After enabling, the code takes 9 seconds before it starts running

the same thing happens to us. It only happens the first time you run the code, so it is nothing to worry about. And I think it is 8 to 9 seconds from communication, and not 8 to 9 seconds of deploying, so regardless it would be fine during competition.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-03-2012, 21:19
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: After enabling, the code takes 9 seconds before it starts running

Are you perhaps enabling the gyro somewhere other than in the Begin vi? It takes a while to calibrate when first initialized.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-03-2012, 22:10
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: After enabling, the code takes 9 seconds before it starts running

Quote:
Originally Posted by tilky View Post
the same thing happens to us. It only happens the first time you run the code, so it is nothing to worry about. And I think it is 8 to 9 seconds from communication, and not 8 to 9 seconds of deploying, so regardless it would be fine during competition.
I will test this theory tonight. What makes me worried is that we also have a recurring "The loop containing the Robot Drive code is not running fast enough" error, making me think there is something else in the code slowing it down.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-03-2012, 22:11
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: After enabling, the code takes 9 seconds before it starts running

Quote:
Originally Posted by Alan Anderson View Post
Are you perhaps enabling the gyro somewhere other than in the Begin vi? It takes a while to calibrate when first initialized.
We're running with the second robot right now, and there is no Gyro on it. I had all of the gyro code in disable structures because of this. So I think we can eliminate that for now.
Reply With Quote
  #6   Spotlight this post!  
Unread 10-03-2012, 14:58
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: After enabling, the code takes 9 seconds before it starts running

If you aren't making progress, attach code for people to look at. In your case, attach the whole thing.

Greg Mckaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 11-03-2012, 14:52
Pirate King Pirate King is offline
Team Captain
FRC #0354 (Westinghouse Pirates)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: New York
Posts: 15
Pirate King is an unknown quantity at this point
Re: After enabling, the code takes 9 seconds before it starts running

I had the same problem. All i did is start a new robot project and copied the code part by part to see what was causing the problem. I could not find anything. but the start up lag i had disappeared. Maybe i had deleted something necessary to the code by accident in the first code. Try it if you have the time.
Reply With Quote
  #8   Spotlight this post!  
Unread 15-03-2012, 00:29
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: After enabling, the code takes 9 seconds before it starts running

I discovered that it is about 10 second from when the robot gets communication with the DS, and we just happened to be hitting "enable" right when we got communication. This made it look like the actual code was lagging, but if I wait 10 seconds after getting comm, there is no problem when I enable.

I am still having some problems with the robot "spazzing" on enable. About 1/4 of the times I enable, a solenoid will fire or the turret will turn, then become still. I have set values for these in Begin so they should do nothing. Thoughts?
Reply With Quote
  #9   Spotlight this post!  
Unread 15-03-2012, 18:48
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: After enabling, the code takes 9 seconds before it starts running

Thanks for the update. The delay before and during Begin makes more sense and is actually expected.

To help with the spazzing, you may want to add a set to disable as well. If you swap from tele to disabled to auto, the old value will still be in effect until auto sets it. You may also want to search for the name of the refnum to help find everywhere it is being set, such as periodic tasks.

Greg McKaskle
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 03:50.

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