Go to Post A rule is a rule is a rule. - Cory [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 24-02-2011, 18:20
firstR00kie firstR00kie is offline
Registered User
FRC #3611
 
Join Date: Jan 2011
Location: Florida
Posts: 5
firstR00kie is an unknown quantity at this point
default autonomous code won't work

Okay, our robot's already shipped, but this is bugging me.

I could never get the autonomous code working at all on our robot; I could see the sensors working and the indicators for them on the dashboard changing as I moved the sample line below them, but the robot would never move. I was using the default code given when you select "framework with game code", which I thought (and read in many places) would follow a line as is. I changed absolutely nothing in the Main or Auto Independent vi's, but they never worked. I was hoping to add more to the end of the code so that we could score, but it seems we will have to sit still for 15 seconds.

I attached images of the code (which should be 100% default), does anyone see what's wrong with it?
Attached Thumbnails
Click image for larger version

Name:	Main.png
Views:	56
Size:	66.7 KB
ID:	10285  Click image for larger version

Name:	Auto.png
Views:	38
Size:	65.3 KB
ID:	10286  
Reply With Quote
  #2   Spotlight this post!  
Unread 24-02-2011, 18:47
bstites82 bstites82 is offline
Registered User
AKA: Blake Stites
FRC #2164 (multiple)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Harrisonville
Posts: 12
bstites82 is an unknown quantity at this point
Re: default autonomous code won't work

the default code does not open the dio references in begin, you have to add them and specify which channels they are plugged into. in your case even though the sensors where powered and responding, the robot was not "seeing" them.
Reply With Quote
  #3   Spotlight this post!  
Unread 25-02-2011, 20:45
firstR00kie firstR00kie is offline
Registered User
FRC #3611
 
Join Date: Jan 2011
Location: Florida
Posts: 5
firstR00kie is an unknown quantity at this point
Re: default autonomous code won't work

I actually did have those added to the begin.vi, with the same names as those in the autonomous vi, I just didn't add a picture of that, but just to make sure I did it right, I'll add a pic.

I'm not an expert at LabView, but I do know programming, and after perusing the code I can't find anything wrong with it myself. Hopefully I'll have time to play with it and figure something out before we actually compete.
Attached Thumbnails
Click image for larger version

Name:	Begin.png
Views:	20
Size:	12.5 KB
ID:	10292  
Reply With Quote
  #4   Spotlight this post!  
Unread 25-02-2011, 20:53
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: default autonomous code won't work

Were there any errors printed to the diagnostics screen on the driver station software?
Reply With Quote
  #5   Spotlight this post!  
Unread 25-02-2011, 22:10
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,752
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: default autonomous code won't work

If you run the code on the robot by clicking the run arrow, you can use breakpoints and probes. Can you verify that the auto loop is running for eight seconds? You can look for errors at the DS diagnostics tab, or probe on the diagram.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 26-02-2011, 16:02
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,113
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: default autonomous code won't work

Quote:
Originally Posted by firstR00kie View Post
I actually did have those added to the begin.vi, with the same names as those in the autonomous vi, I just didn't add a picture of that, but just to make sure I did it right, I'll add a pic.
It's impossible to be sure from looking at a picture, but it looks like the constants you added might have a space at the end. That would be a problem, as the refnum registry is extremely picky about the names having to match exactly.
Reply With Quote
  #7   Spotlight this post!  
Unread 27-02-2011, 11:48
firstR00kie firstR00kie is offline
Registered User
FRC #3611
 
Join Date: Jan 2011
Location: Florida
Posts: 5
firstR00kie is an unknown quantity at this point
Re: default autonomous code won't work

Nice catch Alan! There were spaces after the names, so hopefully that was it. But like I said, we already shipped the robot so I can't test it out or do anything involving the robot until we get it back at the competition.

Hopefully that was the only problem, but I'll be sure to check the diagnostics when I do get the chance. Thanks for all the suggestions!
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 20:33.

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