Go to Post I don't have enough vacation time for them to start allowing video replay. - TJP123 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-01-2009, 23:05
morganh2550's Avatar
morganh2550 morganh2550 is offline
Actuationator
FRC #2087 (BFG)
Team Role: Electrical
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Oregon City
Posts: 23
morganh2550 is just really nicemorganh2550 is just really nicemorganh2550 is just really nicemorganh2550 is just really nicemorganh2550 is just really nice
Cool Pneumatics Programing

Anyone have any ideas about programing pneumatics in LabView?
Reply With Quote
  #2   Spotlight this post!  
Unread 08-01-2009, 23:39
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
Attached Thumbnails
Click image for larger version

Name:	Compressor.jpg
Views:	211
Size:	7.8 KB
ID:	7108  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-01-2009 at 23:44.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-01-2009, 23:46
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
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.
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2009, 17:05
morganh2550's Avatar
morganh2550 morganh2550 is offline
Actuationator
FRC #2087 (BFG)
Team Role: Electrical
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Oregon City
Posts: 23
morganh2550 is just really nicemorganh2550 is just really nicemorganh2550 is just really nicemorganh2550 is just really nicemorganh2550 is just really nice
Talking Re: Pneumatics Programing

Thanks for the help!!!
Reply With Quote
  #5   Spotlight this post!  
Unread 10-01-2009, 18:25
Kaushal.K's Avatar
Kaushal.K Kaushal.K is offline
Scouting & Things
AKA: kkaboose
FRC #1241 (THEORY 6)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Toronto, ON, Canada
Posts: 42
Kaushal.K is an unknown quantity at this point
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
__________________
FRC Volunteer Coordinator (2015 - Present)
FRC Robot Inspector (2012 - Present)
FRC 1241 - Alumni & Mentor (2007-Present)
Reply With Quote
  #6   Spotlight this post!  
Unread 10-01-2009, 21:12
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pneumatics Programing

Quote:
Originally Posted by Kaushal.K View Post
(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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 03-02-2009, 21:21
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

Quote:
Originally Posted by Mark McLeod View Post
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?
Reply With Quote
  #8   Spotlight this post!  
Unread 04-02-2009, 00:23
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-02-2009 at 00:27.
Reply With Quote
  #9   Spotlight this post!  
Unread 04-02-2009, 08:16
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 04-02-2009, 08:52
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #11   Spotlight this post!  
Unread 04-02-2009, 08:54
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

ah yes, this solves my problem. Thanks a lot.
Reply With Quote
  #12   Spotlight this post!  
Unread 04-02-2009, 09:06
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
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?
Reply With Quote
  #13   Spotlight this post!  
Unread 04-02-2009, 09:40
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-02-2009 at 09:48.
Reply With Quote
  #14   Spotlight this post!  
Unread 04-02-2009, 11:19
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

thanks, that helps.
Reply With Quote
  #15   Spotlight this post!  
Unread 04-02-2009, 13:18
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
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?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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