Go to Post You really can't have a bad year. The only way you can is to come out of it and not learn anything. - Dan Petrovic [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 22-02-2010, 13:28
tanguma26 tanguma26 is offline
Registered User
FRC #3999
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Killeen
Posts: 48
tanguma26 is an unknown quantity at this point
Exclamation Programming Autonomous pneumatic kicker

We have finished making the main program for the robot but we do not know how to program the pneumatics for a kicker in autonomous.
I am a rookie programmer so pictures and a detailed explanation would be MUCCH appreciated.

Thank you so much~ (:

-647<3333
Reply With Quote
  #2   Spotlight this post!  
Unread 22-02-2010, 13:37
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Programming Autonomous pneumatic kicker

How are you kicking the ball?
How are you kicking the ball in telop mode?

Gives us some idea on how your robot is going to kick a ball and I am sure someone can tell you how to program that.

Just about every team has a different way to kick a ball.
__________________
Omar
Reply With Quote
  #3   Spotlight this post!  
Unread 22-02-2010, 14:58
tanguma26 tanguma26 is offline
Registered User
FRC #3999
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Killeen
Posts: 48
tanguma26 is an unknown quantity at this point
Re: Programming Autonomous pneumatic kicker

We have two cylinders with two solenoids and three magnetic relays. Two of them go on the back cylinder and one on the front. When the back cylinder is cocked back with a button the front one with only one magnetic relay goes out. Than another button is pushed and the back cylinder with the two relays are shot out and the front one with the one relay pulls back releasing the kicker and it than kicks the ball. Sorry if this is a little confusing :/

you can look at the pictures for a better understandingg<333

-647
Attached Thumbnails
Click image for larger version

Name:	DSCN1179.JPG
Views:	74
Size:	56.9 KB
ID:	8757  Click image for larger version

Name:	DSCN1180.JPG
Views:	46
Size:	74.8 KB
ID:	8758  Click image for larger version

Name:	DSCN1181.JPG
Views:	42
Size:	104.7 KB
ID:	8759  Click image for larger version

Name:	DSCN1182.JPG
Views:	49
Size:	108.7 KB
ID:	8760  
Reply With Quote
  #4   Spotlight this post!  
Unread 22-02-2010, 16:49
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Programming Autonomous pneumatic kicker

Let me see if I understand
We need to break it down into each single step.

1 Somebody presses a BUTTON (???) On the joystick?
2 The BACK cylinder Extends to the cocked position?
3 Limit Switch detect BACK cylinder is cocked.
4 Causing the FRONT cylinder extend
5 Then somebody presses another button (???)
6 Both cylinders retract at the some time kicking the ball.

I assume this is how it is done in Teleop with the button pressing.
Do you have code that now works in Teleop mode using buttons and you need to replace the buttons pressing.

How will you detect that a ball is present and it is time to kick. (A timer? Distant traveled? A limit switch?)

I am not sure how you are using all the limit switches.

Anyway does the flow of the VI match what is actually going on in your code?
Attached Files
File Type: vi CrudeSolution.vi (15.7 KB, 35 views)
__________________
Omar
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2010, 17:25
tanguma26 tanguma26 is offline
Registered User
FRC #3999
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Killeen
Posts: 48
tanguma26 is an unknown quantity at this point
Re: Programming Autonomous pneumatic kicker

Is it possible to get your phone number to explain to you better how it works? If not well:
number 6 is wrong and there are only 2 solenoids
the one in the front retracts after the cylinder in the back comes back out

in teleop:
1. Button #3 is pressed - back cylinder is cocked back and turns on relay 1
2. After relay 1 shows that the back cylinder is cocked back, the front cylinder goes forward and grabs the kicker
3. relay 3 on the front cylinder than shows that the kicker is ready to shoot
4. Button #1 is pressed - back cylinder shoots out and turns on relay 2
5. After relay 2 is on, front cylinder pulls back, releasing the kicker

(however we have not actually tested it but what we have on the computer, logically should work (we think)) ://

During teleop we are just going to guesstimate if the ball is in the right position and than kick

but in autonomous, we want to use a timer
and yeahh~
Reply With Quote
  #6   Spotlight this post!  
Unread 23-02-2010, 10:57
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Programming Autonomous pneumatic kicker

Quote:
Originally Posted by tanguma26 View Post
in teleop:
1. Button #3 is pressed - back cylinder is cocked back and turns on relay 1
2. After relay 1 shows that the back cylinder is cocked back, the front cylinder goes forward and grabs the kicker
3. relay 3 on the front cylinder than shows that the kicker is ready to shoot
4. Button #1 is pressed - back cylinder shoots out and turns on relay 2
5. After relay 2 is on, front cylinder pulls back, releasing the kicker

(however we have not actually tested it but what we have on the computer, logically should work (we think))
Can you post the part of your Teleop code that deals with items 1 to 5 above and I will look at it and advise from there.

To code your kicker you need to break down the steps even farther.

When you are ready to arm the kicker (the start of Autonomous mode or the end of your driving code)
1. There is no Button #3 to press
2. Solenoid #Back is set True (or False, I don't know which)
3. Back cylinder starts to move.
4. Loop Reading DIO IN #1 (Relay 1) until it True (Back cylinder is cocked).
5. Solenoid #Front is set True (or False, I don't know which)
6. Font cylinder starts to move.
7. Loop Reading DIO IN #3 (relay 3) until it goes True (Front cylinder is extended)
The kicker is armed and ready to kick

If the driving part is done (the robot is at a ball) AND the kicker is ready

THEN in place of pressing Button #1
8. Set Solenoid #Back to False. Back cylinder starts to move
9. Loop Reading DIO In #2 (relay 2) until it goes True
10. Set Solenoid #Front to False. Front cylinder starts to move back kicking the ball

Repeat for next ball
__________________
Omar
Reply With Quote
  #7   Spotlight this post!  
Unread 25-02-2010, 12:20
tanguma26 tanguma26 is offline
Registered User
FRC #3999
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Killeen
Posts: 48
tanguma26 is an unknown quantity at this point
Re: Programming Autonomous pneumatic kicker

Her is the program that i made in the Tleop. for the kicker.

There are 3 limit switches Two are for the back cylinder that detects if the foot is cocked back and the last one is for the small cylinder that tell us if it has retract to let the foot out.
Attached Images
File Type: bmp Kicker2.bmp (60.1 KB, 49 views)

Last edited by tanguma26 : 25-02-2010 at 12:23. Reason: miss spelled
Reply With Quote
  #8   Spotlight this post!  
Unread 25-02-2010, 13:03
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: Programming Autonomous pneumatic kicker

Here is a suggestion.
We built our kicker control as a single State Machine. It runs as an independent Vi. It only needs one external signal to cause it to fire the kicker. That signal comes from a joystick trigger in Tele or from the Autonomous code during Auton.
The State Machine takes care of reading all sensors and recycles the kicker automatically and gets it ready to re-fire in 2.5 seconds.
__________________
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
  #9   Spotlight this post!  
Unread 03-03-2010, 09:49
tanguma26 tanguma26 is offline
Registered User
FRC #3999
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Killeen
Posts: 48
tanguma26 is an unknown quantity at this point
Exclamation Re: Programming Autonomous pneumatic kicker

Can you explain me more about what you said about a single state machine i dont understand

or if you have any more advise i would apresiated.


thank you
Reply With Quote
  #10   Spotlight this post!  
Unread 03-03-2010, 10:26
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: Programming Autonomous pneumatic kicker

Quote:
Originally Posted by tanguma26 View Post
Can you explain me more about what you said about a single state machine i dont understand

or if you have any more advise i would apresiated.


thank you
Let's start with what a State Machine is. It is a series of steps, or states, that a machine or software runs through to perform a task.

Let's use the kicker as an example.

State 1: Precharge Kicker
State 2: Wait for "Fire" signal. Release kicker.
State 3: Wait .5 sec. for kick to complete.
State 4: Retract kicking mechanism.
State 5: Wait for retraction to complete.
State 6: Latch mechanism. Return to state 1.

The best advice I can give at this point is to visit http://www.lvmastery.com/tipjar

It will teach you all you need to know to start building state machines.
(This is not a paid advertisement for LVMastery.com)

I'm attaching an example vi. You will also need to create the DevRefNum's in the begin.vi.
Attached Files
File Type: vi Kicker State Machine.vi (17.5 KB, 35 views)
__________________
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

Last edited by billbo911 : 03-03-2010 at 11:46. Reason: Added Kicker State Machine.vi
Reply With Quote
  #11   Spotlight this post!  
Unread 06-03-2010, 19:36
archwaykitten archwaykitten is offline
Registered User
AKA: John McBryan
FRC #1212 (Sentinels)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Arizona
Posts: 10
archwaykitten is an unknown quantity at this point
Re: Programming Autonomous pneumatic kicker

I am trying to make a very similar state machine kicker myself.

My problem is this: Say you tell your program to "wait" in a particular state for two seconds while a piston extends... I would expect the rest of your program to "freeze" for two seconds while that state machine code waits to execute. We want to be able to continue driving around and entering comands while our ball kicker state machine does its thing.
Reply With Quote
  #12   Spotlight this post!  
Unread 06-03-2010, 20:52
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: Programming Autonomous pneumatic kicker

Quote:
Originally Posted by archwaykitten View Post
I am trying to make a very similar state machine kicker myself.

My problem is this: Say you tell your program to "wait" in a particular state for two seconds while a piston extends... I would expect the rest of your program to "freeze" for two seconds while that state machine code waits to execute. We want to be able to continue driving around and entering comands while our ball kicker state machine does its thing.
The key is to have the vi run parallel to all other process. This way the other process, ie teleop.vi, do not have to wait for the kicker to cycle. We did this by placing the kicker state mchine in the main.vi. (See the attached picture) It requires no input from any other processes to complete, therefore it runs immediately. It also doesn't output any information that other vis need.
Attached Thumbnails
Click image for larger version

Name:	main w kicker.jpg
Views:	66
Size:	34.9 KB
ID:	8838  
__________________
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

Last edited by billbo911 : 06-03-2010 at 21:48.
Reply With Quote
  #13   Spotlight this post!  
Unread 07-03-2010, 20:56
I am error's Avatar
I am error I am error is offline
The Error
FRC #0686 (Bovine Intervention)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Frederick
Posts: 20
I am error is an unknown quantity at this point
Re: Programming Autonomous pneumatic kicker

Hi,
I tried you example, changed everything around and put it in the main vi, but it did not function properly and i could not drive my motors in teleop. I'm trying to make so that when a button a latch is released by a piston retracting to fire a kicker from the default, then two pistons extend to reach the kicker and the latch piston extends to grab the kicker. Then the two pistons retract to rearm the device and the cycle repeats. I tried to implement that to your example but with no luck and also while running I could not drive the motors on the robot. Thanks for any help.
__________________
I am Error. Yes.

Reply With Quote
  #14   Spotlight this post!  
Unread 07-03-2010, 21:31
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Programming Autonomous pneumatic kicker

Quote:
Originally Posted by archwaykitten View Post
I am trying to make a very similar state machine kicker myself.

My problem is this: Say you tell your program to "wait" in a particular state for two seconds while a piston extends... I would expect the rest of your program to "freeze" for two seconds while that state machine code waits to execute. We want to be able to continue driving around and entering comands while our ball kicker state machine does its thing.
The "wait" in a state machine is NOT code that causes the processor to loop there until a desired amount of time has passed. Rather, it is code that tests whether the desired amount of time has passed, and if not, allows execution to continue. On the next iteration, it tests again. It keeps testing every new iteration until the desired time has elapsed, at which point it performs some action and changes state so it is no longer waiting.

You can put such a state machine in teleop along with other state machines and they will all peacefully coexist - i.e. they will all appear to execute "simultaneously", since none of them contain any code that "freezes" the processor waiting for time to elapse.

~
Reply With Quote
  #15   Spotlight this post!  
Unread 07-03-2010, 21:40
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: Programming Autonomous pneumatic kicker

You can of course do what you want with your code, but the framework gave you places to put code so that you wouldn't need to modify Robot Main.

Any code that you put into TeleOp or the Robot Main loop needs to finish within 20ms or it will start to affect the joystick code handling. This can be done provided you write the code to retain when something started and do time comparisons to determine when to move to the next kicker stage, note that time, etc.

OR

You can write the code with delays, but put that code into a parallel loop such as Periodic. Then in teleOp, you read the joystick and other stuff and if the conditions are right, you trigger a kick by setting a global. In periodic, you poll the global and start the sequence. At the end of the sequence, you clear the global.

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Team 1522's pneumatic kicker kornjones Robot Showcase 0 15-02-2010 20:59
pic: Pneumatic Kicker Rev_0 preparing to fire professor1212 Extra Discussion 5 18-01-2010 00:31
pic: Pneumatic Kicker Rev_1 professor1212 Extra Discussion 6 17-01-2010 23:07
pic: Pneumatic Kicker Rev_0 professor1212 Extra Discussion 0 17-01-2010 01:15
pneumatic programming stephenthe1 Programming 5 16-02-2006 12:01


All times are GMT -5. The time now is 21:59.

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