|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
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? |
|
#5
|
|||
|
|||
|
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~ |
|
#6
|
||||
|
||||
|
Re: Programming Autonomous pneumatic kicker
Quote:
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 |
|
#7
|
|||
|
|||
|
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. Last edited by tanguma26 : 25-02-2010 at 12:23. Reason: miss spelled |
|
#8
|
||||
|
||||
|
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. |
|
#9
|
|||
|
|||
|
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 |
|
#10
|
||||
|
||||
|
Re: Programming Autonomous pneumatic kicker
Quote:
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. Last edited by billbo911 : 03-03-2010 at 11:46. Reason: Added Kicker State Machine.vi |
|
#11
|
|||
|
|||
|
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. |
|
#12
|
||||
|
||||
|
Re: Programming Autonomous pneumatic kicker
Quote:
Last edited by billbo911 : 06-03-2010 at 21:48. |
|
#13
|
||||
|
||||
|
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. |
|
#14
|
||||
|
||||
|
Re: Programming Autonomous pneumatic kicker
Quote:
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. ~ |
|
#15
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |