Go to Post It is proper to have a disagreement, but it is improper to be disrespectful. - Bill Moore [more]
Home
Go Back   Chief Delphi > Technical > Pneumatics
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-02-2016, 23:38
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
Help programming pneumatics

This is our teams first time using pneumatics. We have everything hooked up but are having issues with the programming part using LabVIEW. We would like the piston to extend when button "A" is pressed and retract when button "A" is released. How would we achieve this. Thanks in advance!

Last edited by itwasntme455 : 23-02-2016 at 00:22. Reason: enter programming program
  #2   Spotlight this post!  
Unread 23-02-2016, 00:05
Noviv's Avatar
Noviv Noviv is offline
Registered User
FRC #1477 (Texas Torque)
Team Role: Programmer
 
Join Date: Jun 2015
Rookie Year: 2013
Location: Texas
Posts: 5
Noviv is an unknown quantity at this point
Re: Help programming pneumatics

You will just need to set the value of the pneumatic to one position while the button is being pressed, and the other when it is not.

Psuedocode:
Code:
if (A button is pressed) {
    pneumatic.set(on);
} else {
    pneumatic.set(off);
}
Java Single Solenoid:
Code:
Solenoid solenoid = new Solenoid(port);
if (operator.getRawButton(1)) {//example
    solenoid.set(true);
} else {
    solenoid.set(false);
}
Java Single Solenoid:
Code:
DoubleSolenoid solenoid = new DoubleSolenoid(portA, portB);
if (operator.getRawButton(1)) {
    solenoid.set(DoubleSolenoid.Value.kForward);
} else {
    solenoid.set(DoubleSolenoid.Value.kReverse);
}
getRawButton(1) should be mapped to the A button on Xbox controllers. Switch it to getRawButton(2) for Logitech controllers.
  #3   Spotlight this post!  
Unread 23-02-2016, 00:21
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
Re: Help programming pneumatics

How about in LabVIEW?
  #4   Spotlight this post!  
Unread 23-02-2016, 02:02
Noviv's Avatar
Noviv Noviv is offline
Registered User
FRC #1477 (Texas Torque)
Team Role: Programmer
 
Join Date: Jun 2015
Rookie Year: 2013
Location: Texas
Posts: 5
Noviv is an unknown quantity at this point
Re: Help programming pneumatics

Sorry, my team has only used C++ and Java. Here are a few links that might be helpful:

http://www.chiefdelphi.com/forums/sh...ad.php?t=73821

http://www.team476.com/wpimages/wp1798b5a5_05_06.jpg

http://www.chiefdelphi.com/forums/sh...ad.php?t=90429

I hope this helps!
  #5   Spotlight this post!  
Unread 23-02-2016, 03:26
thatnameistaken thatnameistaken is offline
Programmer/Driver
AKA: Joshua Johnston
FRC #2191 (Flux Core)
Team Role: Leadership
 
Join Date: Oct 2012
Rookie Year: 2013
Location: Hamilton, NJ
Posts: 45
thatnameistaken is on a distinguished road
Re: Help programming pneumatics

Quote:
Originally Posted by itwasntme455 View Post
How about in LabVIEW?
Like so:


In the false state of the case structure in Teleop, the solenoid must be set to reverse instead of forward. Additionally, in Begin, make sure your PCM ID and solenoid channels match how you wired your robot; the forward channel is the channel wired to the end of the solenoid connected to the part of the piston further from the rod, while the reverse channel should be set to the closer end. If you're unsure, just guess and switch it if it's backwards.

Last edited by thatnameistaken : 23-02-2016 at 03:35. Reason: Reworded to flow better
  #6   Spotlight this post!  
Unread 23-02-2016, 09:37
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,690
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: Help programming pneumatics

Here's another example
Attached Thumbnails
Click image for larger version

Name:	DoubleSolenoidExample.png
Views:	20
Size:	31.7 KB
ID:	20163  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


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


All times are GMT -5. The time now is 07:19.

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