Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Need help with timing auton (http://www.chiefdelphi.com/forums/showthread.php?t=84035)

IndySam 08-03-2010 18:02

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?)

Thanks
Scott

Vikesrock 08-03-2010 18:58

Re: Need help with timing auton
 
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.

Ex.

Arcade Drive VI (Set to 1 for forward)
|
V
Watchdog Delay & Feed (Drive forward time)
|
V
Arcade Drive VI (Set to 0 for stop)
|
V
Solenoid Set (Set to 1 to extend)
|
V
Watchdog Delay & Feed (Wait for firing to finish)
|
V
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.

IndySam 08-03-2010 19:49

Re: Need help with timing auton
 
Thanks, can you post the sample VI.

Vikesrock 08-03-2010 20:09

Re: Need help with timing auton
 
1 Attachment(s)
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.)

IndySam 08-03-2010 20:16

Re: Need help with timing auton
 
We are using the the KOP double acting solenoids.

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

Greg McKaskle 08-03-2010 21:01

Re: Need help with timing auton
 
Also, most likely, -1 is forward.

Greg McKaskle

Vikesrock 09-03-2010 00:26

Re: Need help with timing auton
 
1 Attachment(s)
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.


All times are GMT -5. The time now is 11:03.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi