Go to Post To limit FIRST to robots, tools, and competition is to strip away its immense potential. - Madison [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 29-03-2013, 12:05
wre136's Avatar
wre136 wre136 is offline
Registered User
AKA: Will Edds
FRC #2461 (The METAL-SKINS)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2002
Location: Oklahoma City
Posts: 30
wre136 is an unknown quantity at this point
Autonomus Only Runs One Iteration Issue

Our team is trying to program an autonomous that simply spins a wheel and the activate a pneumatic ram 3 times. However, all we are doing is spinning the wheel and that is it.

Does this years autonomous only run itself once and that is it or is there a way to make it loop so we can use state machines in it or at least perform all the steps in a flat sequence box?
  #2   Spotlight this post!  
Unread 29-03-2013, 12:13
Andrew Lobos Andrew Lobos is offline
Registered User
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 61
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: Autonomus Only Runs One Iteration Issue

Quote:
Originally Posted by wre136 View Post
Does this years autonomous only run itself once and that is it or is there a way to make it loop so we can use state machines in it or at least perform all the steps in a flat sequence box?
Are you using SimpleRobot or IterativeRobot?

If iterative robot, make sure all your code that you want to run in a loop is in autonomousPeriodic()

If simple robot, you may want to wrap all your code in a while loop with the condition isAutonomous() && isEnabled() Note the "i" in "is" is capitalized in C++, lowercase in Java.
  #3   Spotlight this post!  
Unread 29-03-2013, 12:19
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,600
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: Autonomus Only Runs One Iteration Issue

Quote:
Originally Posted by wre136 View Post
Does this years autonomous only run itself once and that is it or is there a way to make it loop so we can use state machines in it or at least perform all the steps in a flat sequence box?
You're missing one important piece of information, the programming language you are using. 4ndr3wl answers apply to C++ and Java.

Since you mention a flat sequence, I think you are probably using LabVIEW. For LabVIEW, autonomous independent only runs once, but you may put a while loop or for loop or a flat sequence structure to control your execution.
  #4   Spotlight this post!  
Unread 29-03-2013, 14:44
John Sabath's Avatar
John Sabath John Sabath is offline
LabVIEW Software Developer
FRC #3792 (The Army Ants)
Team Role: Alumni
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Columbia, MO
Posts: 53
John Sabath is a splendid one to beholdJohn Sabath is a splendid one to beholdJohn Sabath is a splendid one to beholdJohn Sabath is a splendid one to beholdJohn Sabath is a splendid one to beholdJohn Sabath is a splendid one to beholdJohn Sabath is a splendid one to beholdJohn Sabath is a splendid one to behold
Re: Autonomus Only Runs One Iteration Issue

Joe's correct, it's perfectly acceptable to put a loop in Autonomous Independent. Even if it doesn't finish execution by the time autonomous is over, the VI will be aborted.

__________________
Freshman at Missouri S&T ( Computer Science )

FRC 3792 (The Army Ants) from 2012-2013
  #5   Spotlight this post!  
Unread 29-03-2013, 22:12
Gregor's Avatar
Gregor Gregor is offline
#StickToTheStratisQuo
AKA: Gregor Browning
no team
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Kingston, Ontario, Canada
Posts: 2,447
Gregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond reputeGregor has a reputation beyond repute
Re: Autonomus Only Runs One Iteration Issue

Have you checked to see if the solenoid valve was firing? Did you have pressure, was your release valve open?
__________________
What are nationals? Sounds like a fun American party, can we Canadians come?
“For me, insanity is super sanity. The normal is psychotic. Normal means lack of imagination, lack of creativity.” -Jean Dubuffet
"Insanity is doing the same thing over and over again and expecting different results." -Albert Einstein
FLL 2011-2015 Glen Ames Robotics-Student, Mentor
FRC 2012-2013 Team 907-Scouting Lead, Strategy Lead, Human Player, Driver
FRC 2014-2015 Team 1310-Mechanical, Electrical, Drive Captain
FRC 2011-xxxx Volunteer
How I came to be a FIRSTer
<Since 2011
  #6   Spotlight this post!  
Unread 29-03-2013, 22:26
Kusha's Avatar
Kusha Kusha is offline
Crimpin' ain't easy
AKA: Kusha Gharahi
no team (Looking for a team)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Dallas, Texas
Posts: 207
Kusha is a jewel in the roughKusha is a jewel in the roughKusha is a jewel in the roughKusha is a jewel in the rough
Re: Autonomus Only Runs One Iteration Issue

Could we see your code?
__________________
https://kusha.me
  #7   Spotlight this post!  
Unread 30-03-2013, 22:12
wre136's Avatar
wre136 wre136 is offline
Registered User
AKA: Will Edds
FRC #2461 (The METAL-SKINS)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2002
Location: Oklahoma City
Posts: 30
wre136 is an unknown quantity at this point
Re: Autonomus Only Runs One Iteration Issue

Thank you for the pointers. We are using LabVIEW and below is the snippet of code that isn't working. We are only getting to the first box and then nothing else. Any ideas on whether this should or not and why?
Attached Thumbnails
Click image for larger version

Name:	Autonomous Code Issue.png
Views:	62
Size:	15.6 KB
ID:	14479  
  #8   Spotlight this post!  
Unread 31-03-2013, 07:46
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,756
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: Autonomus Only Runs One Iteration Issue

I think that if you run under the debugger -- open Robot Main and press the run button -- you will see that the code is indeed running. Open the diagram and probe the refnum in the frames, or turn on execution highlighting.

To identify why it doesn't seem to be running, look for an error message about your solenoid or verify that the configuration matches the robot.

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