Go to Post They showed me a new item and said "we don't know how to list this on the inventory." I took one look, started laughing and said "In my world that is called a game piece, aka, a tote." - RoboMom [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 10-02-2015, 15:03
Wawa's Avatar
Wawa Wawa is offline
Wawa
FRC #3659 (Mighty Patriots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Miami
Posts: 30
Wawa is an unknown quantity at this point
Programming Pneumatics in Autonomous

Ok, so I have everything programmed for teleop, but I am lost with autonomous. Everyone is saying it's the same thing as teleop, but I don't understand what that's supposed to mean. Can someone walk me through this or show me an example of controlling pneumatics during autonomous?

Also, we have a motor being used for the arm, so can someone show me how to program that to go forward and backward during autonomous?

Thanks!
__________________
Our Plan B is our Plan A.
  #2   Spotlight this post!  
Unread 10-02-2015, 15:04
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,725
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Programming Pneumatics in Autonomous

What language are you using?
  #3   Spotlight this post!  
Unread 10-02-2015, 15:21
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Programming Pneumatics in Autonomous

It really is no different than teleop.

Instead of waiting for a user input, such as a button press, you wait for a different trigger, such as encoder ticks/time.

The actual code to deploy the pnuematics is the EXACT same. Just place the line of code you use in teleop in your auto method, at the appropriate time.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #4   Spotlight this post!  
Unread 10-02-2015, 17:13
Wawa's Avatar
Wawa Wawa is offline
Wawa
FRC #3659 (Mighty Patriots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Miami
Posts: 30
Wawa is an unknown quantity at this point
Re: Programming Pneumatics in Autonomous

I'm using LabVIEW.

Alright, so I think I've kind of got the idea of it. I can open the solenoid, but I don't know how to set it up afterward. What I'm really trying to figure out is how to tell the solenoid to open/close. If I use time, how do I tell it when to open, close, and how long to open it for? How do I tell it to open and close if I'm trying to do it after moving? Do I just string the two together?

Sorry if these questions seem silly, this is my first year programming and we have no alumn/mentors to help out.
__________________
Our Plan B is our Plan A.
  #5   Spotlight this post!  
Unread 10-02-2015, 17:20
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,242
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Programming Pneumatics in Autonomous

Set a timer, and use some variables.

You use the variables to keep track of where you are/what you want to do.

In autonomousinit (or something like that), you get your parameter for what you are going to do (which autonomous program steps to run), initialize your variables, initialize your pneumatics, etc. This is just like TeleopInit.


Then, like there is a call to Teleop, there is a call to Autonomous.

Inside Autonomous, you have a while loop. Let's say you want to pick up the tote and move to the Auto Zone.

1) Tell your arms to close on the tote. Wait 1 second for the arms to respond
2) Tell your lifter to pick up the tote. Wait 1 second for the lifter to pick it up
3) Whatever commands you need to move the robot and tote to the Autozone.
4) Tell your lifter to lower the tote. Wait 1 second.
5) Tell your arms to open up and release the tote.
  #6   Spotlight this post!  
Unread 10-02-2015, 20:22
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: Programming Pneumatics in Autonomous

Quote:
Originally Posted by rich2202 View Post
In autonomousinit...
The Patriots are using LabVIEW.



You will probably have the easiest time using what's called a Flat Sequence structure. It's like a filmstrip. Inside each frame you can set something to happen, and you can put a Wait function in the frame to determine how long until the next frame can start.

You control the solenoid exactly as you would in Teleop, using a Solenoid Set function. But instead of choosing which direction to control it based on a Joystick or gamepad button, you use a constant.

If you don't know how to control solenoids in Teleop, Team 358's examples might be useful. Look at the Single Solenoid Example and the Double Solenoid Example immediately following it.
  #7   Spotlight this post!  
Unread 10-02-2015, 22:49
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Programming Pneumatics in Autonomous

I would use a case structure inside a wild loop with shift registers. This is the easiest method for me and the kids I teach it to.
Attached Thumbnails
Click image for larger version

Name:	Auton.PNG
Views:	46
Size:	26.4 KB
ID:	18274  
  #8   Spotlight this post!  
Unread 12-02-2015, 22:57
Wawa's Avatar
Wawa Wawa is offline
Wawa
FRC #3659 (Mighty Patriots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Miami
Posts: 30
Wawa is an unknown quantity at this point
Re: Programming Pneumatics in Autonomous

Thank you all so much! I'm currently in the process of creating the code since it took me a day to put together what everything means and understand all the information. (Everything clicked once I realized what a while loop was.)
__________________
Our Plan B is our Plan A.
  #9   Spotlight this post!  
Unread 13-02-2015, 08:44
yara92's Avatar
yara92 yara92 is offline
M.Fawdah Mechanical engineering
AKA: Mohamed
FRC #1946 (Mechka Monster)
Team Role: RoboCoach
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Israel
Posts: 236
yara92 will become famous soon enoughyara92 will become famous soon enough
Re: Programming Pneumatics in Autonomous

We use C++ is there any Example
__________________
TEAM 1946-Tamra
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 21:06.

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