Autonomous failure

So after our first competition I badly want to get our autonomous mode going due to never really getting a good grasp on autonomous running correctly.

We have our shooter (on a victor) I want to power up, wait 2-3 seconds then fire a frisbee via pneumatic cylinder which takes about 2 seconds to fully force the frisbee to the wheels (its slow for some reason but I’ll live with it after seeing teams shoot 3 in 5 seconds).

I am using a flat sequence. I have attached the part of the VI (I think). When we startup autonomous mode the robot the shooter motor spins up, then cycles the valve a split second not fully extending the cylinder to eject the frisbee. Can someone help me figure out whyats going on?





What you posted looks okay.

Wild guess: You’re also controlling the shooter solenoid in Periodic Tasks, which is also running during Autonomous, so it’s constantly being turned off every 20 milliseconds or so. Is that what’s going on?

Are you using Double or Single Valves? Are they properly initialized in the Begin.vi? I had problems where I had double solenoids and kept saying true or false which causes them to behave in a manner somewhat like you described. Maybe you are the other way? Also check that no other VI is controlling you solenoids at the same time as mentioned above.

In addition to the problem of setting the solenoid simultaneously in other places…
Based on your description, you will also need a frame at the front just containing a delay to allow the shooter time to get up to speed.

Alan, I am calling the shooter motor and the shooter solenoid in periodic tasks. The shooter seems to fire up just fine, although I haven’t checked to see if it is actually at full power. Should I move both of these to teleop then or just the solenoid?

kgzak, The solenoid works fine in teleop mode other than just being slower than I’d like.

Mark, I run the shooter solenoid forced out for 2 seconds just in case during testing in the pits it got turned off before fully retracting which also acts as spin up time for the shooter. As the code sits forward and reverse might be backwards from what they really are due to my trying every iteration to get the dang thing to work.

Basically, you must never control the same thing in two places at the same time. There are many ways to solve this - you can make that part of Periodic not run during Autonomous, or you could send commands to Global in Autonomous (and TeleOp) and only have Periodic output them to the solenoid. Or, as you said, you could move the part in Periodic to Teleop, but I wouldn’t recommend this as we’ve had a lot of problems with too much code in Teleop (even if that code is very simple, there’s just too much of it and it has to run faster).