Need help with timing auton

OK so my programmer is gone and I would like to program a simple autonomus.

Of course I have little idea how to do it.

I would like to drive forward (that I can do.)

Fire our kicking solenoid.

Retract the solenoid.

and repeat.

Can anyone help out (or write an easy example?)


The “easy” way to do this is probably to use Autonomous Independent and string together a sequence using the error terminals of each VI.

Use the Watchdog Delay & Feed VI for delays between events to keep the watchdog happy.

So you want to connect the error wires of the VIs in the sequence you want to run.


Arcade Drive VI (Set to 1 for forward)
Watchdog Delay & Feed (Drive forward time)
Arcade Drive VI (Set to 0 for stop)
Solenoid Set (Set to 1 to extend)
Watchdog Delay & Feed (Wait for firing to finish)
Solenoid Set (Set to 0 to retract)

To repeat this sequence exactly you can either use a loop or you can just keep stringing elements onto the sequence, allowing you to make the sequence slightly different for the further iterations.

If this isn’t clear enough, let me know and I can probably post up a sample VI for you.

Thanks, can you post the sample VI.

This VI makes some assumptions about your robot, most importantly about the pneumatics. The VI is written assuming you are using a single acting solenoid that “fires” when set to true and the cylinder retracts using springs or some other method when set to false.

If you need help fixing the pneumatics code up for your setup, please post details about the process you want the pneumatics to go through (single or double solenoid, which side to set when, etc.) (12.6 KB) (12.6 KB)

We are using the the KOP double acting solenoids.

we are firing on port 4 and retracting on port 3.

Also, most likely, -1 is forward.

Greg McKaskle

Here’s an updated version which will control the double solenoid for kicking and reflects Greg’s comment that -1 is usually forward.

The program will follow the black and yellow error wire through the VI from left to right.

The main thing you will have to change to use this VI will be the refnum values on the far left of the code. You need to identify the appropriate refnum names from Begin.VI and replace the names in this sample.

The other thing you will probably want to change is the delays for each action.

The sample in this post drives, fires, retracts, drives, fires and retracts. Some copy-pasting and wiring should allow the addition of a third sequence if desired. (15.4 KB) (15.4 KB)