Kicking while driving

We have finally gotten the kicking and the driving code working, however, we still can’t do both at the same time…

The problem is our drive code is in the main loop, but we use a timed sequnce of pnuematics to kick, however, because of this the code gets stuck in this kicking sequence and cannot drive…

We tried changing the this by adding the drive code into the sequence of waiting as well, but for some reason the drive does not seem to be responding even then…

I’m posting images of our labview code, and i hope someone can see what’s going wrong, and how we can fix it…

(BTW our drive code is the small sub vi).

Below are the two things we’ve already tried…

http://img.photobucket.com/albums/v242/wasabi_nutcracker/tickcount.jpg

http://img.photobucket.com/albums/v242/wasabi_nutcracker/elapsestructure.jpg

Please, can anyone help?

thanks…

BUMP

To understand your problem, I think we need more information on how the rest of the code is structured. For example, is this timed sequence inside teleop? Or are you trying to program autonomous (which might make more sense since it’s timed sequence).

The way timed sequence works, they execute left to right. So if you have another frame to the right of the drive code and that is the kicker, then the drive portion will execute first, then move onto the next frame for the kicker. But obviously if you only have the kicker in that second frame, then the drive will not execute. You can place another drive VI in the kicker frame (such that they will execute in parallel), but that is awfully inefficient way of programing.

You might want to revisit www.frcmastery.com and look over the video tutorials. In particular, review the walkthroughs and state machines. State machines are your friend.

The two code implementations are very similar. Do this as fast as you can until enough time passes.

A couple other approaches to try.

Put the kicking code in a parallel loop that looks at a global to see if it should kick, hold, or return the foot, etc. Then in teleop drive, just set the globals based on the joystick. In the parallel loop you can still use your timed sequence just fine.

A more efficient way of doing the notification is to use an occurrence, queue, or other programming mechanism to let drive signal the loop when it should start a new sequence.

Another approach is to break up the code and keep it in the teleop, but make it a state machine as already mentioned.

Greg McKaskle