Go to Post It is not your banners that make you nor the trophies that line your walls. It is the willingness to be brave in the face of defeat and compassionate in the winds of victory that create you. - MysterE [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 26-02-2013, 21:32
eruiz22 eruiz22 is offline
Registered User
FRC #4210
 
Join Date: Feb 2013
Location: South Gate
Posts: 29
eruiz22 is on a distinguished road
Question My autonomous code isn't working.

I want the "Motor for actuator" to go down for 10 seconds. Then the "Swing" to go foward for 5 seconds. Finally, the "Motor for actuator" to go up for 15 seconds.

I built and deloyed the code. When I pressed button 11 on joystick 2, nothing happened. Is my code correct?

Thank you.
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	81
Size:	162.2 KB
ID:	14198  Click image for larger version

Name:	Untitled2.jpg
Views:	45
Size:	126.5 KB
ID:	14199  
Reply With Quote
  #2   Spotlight this post!  
Unread 26-02-2013, 22:04
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,372
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: My autonomous code isn't working.

The first issue I see is, joysticks are not read in Autonomous mode. By placing your code in a case structure that is dependent on that input, you are preventing it from running.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #3   Spotlight this post!  
Unread 26-02-2013, 22:15
Alpha Beta's Avatar
Alpha Beta Alpha Beta is offline
Strategy, Scouting, and LabVIEW
AKA: Mr. Aaron Bailey
FRC #1986 (Team Titanium)
Team Role: Coach
 
Join Date: Mar 2008
Rookie Year: 2007
Location: Lee's Summit, Missouri
Posts: 763
Alpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond repute
Re: My autonomous code isn't working.

Quote:
Originally Posted by billbo911 View Post
The first issue I see is, joysticks are not read in Autonomous mode. By placing your code in a case structure that is dependent on that input, you are preventing it from running.
I thought the initial value was read when autonomous started, but it couldn't be changed during autonomous. As it stands here the false case should be running. If the button was being pressed as autonomous started it would run the true case. Since you can't touch the control as autonomous starts you'd have to tape a rock to the button or something if you wanted the true case to run.

Below is a quote from a comment within the autonomous default project.

Quote:
Note that all Driver Station inputs are automatically latched and will not change once auto begins.
__________________
Regional Wins: 2016(KC), 2015(St. Louis, Queen City), 2014(Central Illinois, KC), 2013(Hub City, KC, Oklahoma City), 2012(KC, St. Louis), 2011(Colorado), 2010(North Star)
Regional Chairman's Award: 2014(Central Illinois), 2009(10,000 Lakes)
Engineering Inspiration: 2016(Smoky Mountain), 2012(Kansas City), 2011(Denver)
Dean's List Finalist 2016(Jacob S), 2014(Cameron L), 2013(Jay U), 2012(Laura S), 2011(Dominic A), 2010(Collin R)
Woodie Flowers Finalist 2013 (Aaron Bailey)
Championships: Sub-Division Champion (2016), Finalist (2013, 2010), Semifinalist (2014), Quaterfinalist (2015, 2012, 2011)
Other Official Awards: Gracious Professionalism (2013) Entrepreneurship (2013), Quality (2015, 2015, 2013), Engineering Excellence (Champs 2013, 2012), Website (2011), Industrial Design (Archimedes/Tesla 2016, 2016, 2015, Newton 2014, 2013, 2011), Innovation in Control (2014, Champs 2010, 2010, 2008, 2008), Imagery (2009), Regional Finalist (2016, 2015, 2008)

Last edited by Alpha Beta : 26-02-2013 at 22:19.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-02-2013, 22:39
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
Re: My autonomous code isn't working.

The code in the second picture is not needed, and the case structure and the vi's connected to it should be removed. All you need for autonomous is the while loops.
Reply With Quote
  #5   Spotlight this post!  
Unread 27-02-2013, 00:11
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,372
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: My autonomous code isn't working.

Quote:
Originally Posted by Alpha Beta View Post
I thought the initial value was read when autonomous started, but it couldn't be changed during autonomous. As it stands here the false case should be running. If the button was being pressed as autonomous started it would run the true case. Since you can't touch the control as autonomous starts you'd have to tape a rock to the button or something if you wanted the true case to run.

Below is a quote from a comment within the autonomous default project.
You are correct. Although, I believe the OP was stating that the button was pressed after Autonomous was started.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #6   Spotlight this post!  
Unread 27-02-2013, 21:32
eruiz22 eruiz22 is offline
Registered User
FRC #4210
 
Join Date: Feb 2013
Location: South Gate
Posts: 29
eruiz22 is on a distinguished road
Re: My autonomous code isn't working.

Quote:
Originally Posted by billbo911 View Post
You are correct. Although, I believe the OP was stating that the button was pressed after Autonomous was started.
I removed the joystick, left the case structure, and enclosed everything in a while loop.
I'm sure that this is the wrong way to go about this.
Can you please explain how to fix this code in simple terms?

Thank you!
Reply With Quote
  #7   Spotlight this post!  
Unread 27-02-2013, 21:36
eruiz22 eruiz22 is offline
Registered User
FRC #4210
 
Join Date: Feb 2013
Location: South Gate
Posts: 29
eruiz22 is on a distinguished road
Re: My autonomous code isn't working.

Quote:
Originally Posted by Owen Makin View Post
The code in the second picture is not needed, and the case structure and the vi's connected to it should be removed. All you need for autonomous is the while loops.
So then remove the case structure and add a while loop?
Why is a case structure inappropraite for my objective?
Reply With Quote
  #8   Spotlight this post!  
Unread 27-02-2013, 22:54
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
Re: My autonomous code isn't working.

The code within the case structure is correct. The case structure is inappropriate for autonomous because it requires you to manual change the value. Sorry, i mixed up my structures, you were correcting having the sequence loop, while loops are for autonomous also, but i have no experience with them. Keep your sequence, and remove the case structures.
Reply With Quote
  #9   Spotlight this post!  
Unread 27-02-2013, 23:49
eruiz22 eruiz22 is offline
Registered User
FRC #4210
 
Join Date: Feb 2013
Location: South Gate
Posts: 29
eruiz22 is on a distinguished road
Re: My autonomous code isn't working.

Makes sense.
Thank you for clearing that up
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 22: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