View Full Version : Pneumatics Programing
morganh2550
08-01-2009, 23:05
Anyone have any ideas about programing pneumatics in LabView?:confused:
Mark McLeod
08-01-2009, 23:39
Here is a simple form of the compressor and controlling a solenoid (http://www.chiefdelphi.com/forums/attachment.php?attachmentid=7101&d=1231352592) from the trigger of joustick 2.
There is a "Solenoid with Compressor Example" too you can look at on the LabVIEW startup screen.
whitetiger0990
08-01-2009, 23:46
You use the Solenoid Breakout and the Solenoid VIs
http://www.usfirst.org/uploadedFiles/3-FRC%20Control%20System-Component-Datasheets-Rev-0-5a.pdf go down to Solenoid Breakout. It plugs into one of the cRIO modules.
morganh2550
10-01-2009, 17:05
Thanks for the help!!!:] :D
Kaushal.K
10-01-2009, 18:25
I have a quick question, in the Advanced Framework, how do we get all the code parts (eg. USB 2.. or Solenoid 1.. or Relay 6)?.. were they just made up or are they in the WPI Robotics Library?
thanks for the help, the code samples were really helpful
Mark McLeod
10-01-2009, 21:12
(eg. USB 2.. or Solenoid 1.. or Relay 6)?
Those are enumerated in the LabVIEW FRC palettes.
You automatically get them when you wire a Constant to the WPI vi's, such as, Joystick Open.
zebrabots
03-02-2009, 21:21
Here is a simple form of the compressor and controlling a solenoid (http://www.chiefdelphi.com/forums/attachment.php?attachmentid=7101&d=1231352592) from the trigger of joustick 2.
There is a "Solenoid with Compressor Example" too you can look at on the LabVIEW startup screen.
I looked at your example, but i am unable to tell how the program knows that it is to run off the trigger of joystick 2. In our setup, we have a third joystick used to control two motors and hopefully also used to control our solenoid with the trigger of joystick 3. any ideas?
Mark McLeod
04-02-2009, 00:23
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.
zebrabots
04-02-2009, 08:16
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.
Mark McLeod
04-02-2009, 08:52
I think we're looking at different examples.
Take a look at the link to controlling a solenoid (http://www.chiefdelphi.com/forums/attachment.php?attachmentid=7101&d=1231352592) 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.
zebrabots
04-02-2009, 08:54
ah yes, this solves my problem. Thanks a lot.
zebrabots
04-02-2009, 09:06
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?
Mark McLeod
04-02-2009, 09:40
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.
zebrabots
04-02-2009, 11:19
thanks, that helps.
zebrabots
04-02-2009, 13:18
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?
Mark McLeod
04-02-2009, 13:23
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.
star_lancer
16-02-2009, 13:40
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.
Can I get an image on how this is done? I don't know what you mean by begin.vi or finish.vi
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.