View Single Post
  #2   Spotlight this post!  
Unread 21-02-2010, 18:58
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: Sequence of solenoids triggered by a button?

Im not sure what language your using, but we're doing the same thing in labview.

Basically i have a case structure being controlled by an Enum control. The enum is first created as a constant in the init phase of teleop. for ex., we have it with 7 steps

1. ready to fire
2. wait .5 seconds
3. retract kicker (piston 1)
4. wait 1 second
5. extend trigger (piston 2)
6. wait 1 second
7. extend kicker (piston 1)

during init, a local variable is set to 1.Ready to fire

then, in teleop, we have the variable control a case structure. in each case we perform the functions nessacary and set the variable to the next case. When its in 1.ready to fire, it stays there until a button is pressed, then it retracts our trigger and continues through the cases again.

attached is a zip contain 2 pictures to help plus a 'kicker proof of concept vi' the vi was made in labview 2009 im afraid though.
Attached Files
File Type: zip kicker proof of concept.zip (64.9 KB, 40 views)
Reply With Quote