|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Pneumatics Programing
Here is a simple form of the compressor and controlling a solenoid from the trigger of joustick 2.
There is a "Solenoid with Compressor Example" too you can look at on the LabVIEW startup screen. Last edited by Mark McLeod : 08-01-2009 at 23:44. |
|
#2
|
|||
|
|||
|
Re: Pneumatics Programing
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: Pneumatics Programing
Does it help to know that button 1 is the trigger on the KOP joysticks?
Each of the joystick buttons has the number printed on it except for the trigger of course. ![]() In that example the USB 2 joystick is opened, and button 1 (the trigger) is feed into and controls the solenoid. If you want to use the trigger on joystick 3 instead, just change "USB 2" to "USB 3" in that example. In normal usage you'd put all this in the same loop you use the joysticks to tank/arcade drive. Last edited by Mark McLeod : 04-02-2009 at 00:27. |
|
#4
|
|||
|
|||
|
Re: Pneumatics Programing
This code will be used in the same loop as our tank drive setup, but i'm still a little confused. In the link you provided, there isn't a Joystick open .vi or anywhere to change the USB 2 to USB 3. I understand that the trigger is button one on the joysticks. In our setup, joysticks 1 and 2 run tank drive. Will i need to program the trigger of one of those joysticks?
I guess my question is, in the example that you provided, there never is a specified USB value. It goes from compressor open, to compressor start, to compressor stop and close. |
|
#5
|
|||||
|
|||||
|
Re: Pneumatics Programing
I think we're looking at different examples.
Take a look at the link to controlling a solenoid that was posted in another thread on the same topic. CD doesn't allow me to repost it in this thread. It uses "USB 2" on the left side of the diagram. |
|
#6
|
|||
|
|||
|
Re: Pneumatics Programing
ah yes, this solves my problem. Thanks a lot.
|
|
#7
|
|||
|
|||
|
Re: Pneumatics Programing
one more question....do i need to place the code for my compressor and solenoid valves in the teleop case loop inside my while loop? or can i just place it in it's own while loop?
|
|
#8
|
|||||
|
|||||
|
Re: Pneumatics Programing
You want the solenoid check inside your teleop loop, since that's where you are reacting to joystick commands.
The compressor you want operating in both autonomous and teleop modes so that goes elsewhere. Really, the compressor Open and Start should be in the Begin.vi and the Close in Finish.vi. You need to add the compressor cluster information to RobotData.ctl so it can be used in the Finish.vi P.S. I'm assuming by what you said that you're using the Advanced Framework. If you're using the Basic one instead it's a little different. Last edited by Mark McLeod : 04-02-2009 at 09:48. |
|
#9
|
|||
|
|||
|
Re: Pneumatics Programing
thanks, that helps.
|
|
#10
|
|||
|
|||
|
Re: Pneumatics Programing
Okay, I just sat down to program this setup and i realized that this is a timed function. How do I incorporate the timed function within my teleop loop without it affected the entire teleop loop?
|
|
#11
|
|||||
|
|||||
|
Re: Pneumatics Programing
You can leave out the timer from the example. Just take the solenoid, etc. vi's. It should run at the same rate as your other joystick based functions.
That was just a stand-alone sample of a basic loop. |
|
#12
|
||||
|
||||
|
Re: Pneumatics Programing
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| starting programing... | xanarchyx | Programming | 4 | 05-01-2008 23:48 |
| Programing | mormannoob | FIRST Lego League | 5 | 03-04-2007 14:02 |
| Programing | great_one411 | General Forum | 2 | 01-02-2003 17:27 |
| Programing of controller | DLyons | Programming | 0 | 29-11-2002 20:50 |
| Programing | pfortunejr | Programming | 1 | 08-01-2002 13:18 |