Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Pneumatics Programing (http://www.chiefdelphi.com/forums/showthread.php?t=71649)

morganh2550 08-01-2009 23:05

Pneumatics Programing
 
Anyone have any ideas about programing pneumatics in LabView?:confused:

Mark McLeod 08-01-2009 23:39

Re: Pneumatics Programing
 
1 Attachment(s)
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.

whitetiger0990 08-01-2009 23:46

Re: Pneumatics Programing
 
You use the Solenoid Breakout and the Solenoid VIs

http://www.usfirst.org/uploadedFiles...s-Rev-0-5a.pdf go down to Solenoid Breakout. It plugs into one of the cRIO modules.

morganh2550 10-01-2009 17:05

Re: Pneumatics Programing
 
Thanks for the help!!!:] :D

Kaushal.K 10-01-2009 18:25

Re: Pneumatics Programing
 
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

Re: Pneumatics Programing
 
Quote:

Originally Posted by Kaushal.K (Post 797886)
(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

Re: Pneumatics Programing
 
Quote:

Originally Posted by Mark McLeod (Post 796429)
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.

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

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.

zebrabots 04-02-2009 08:16

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.

Mark McLeod 04-02-2009 08:52

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.

zebrabots 04-02-2009 08:54

Re: Pneumatics Programing
 
ah yes, this solves my problem. Thanks a lot.

zebrabots 04-02-2009 09:06

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?

Mark McLeod 04-02-2009 09:40

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.

zebrabots 04-02-2009 11:19

Re: Pneumatics Programing
 
thanks, that helps.

zebrabots 04-02-2009 13:18

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?


All times are GMT -5. The time now is 22:20.

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