Go to Post Powerhouse teams aren't powerhouse because they build great robots, they are powerhouses because they build great teams. - couvillion [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 06-02-2014, 16:52
anthonygraff24 anthonygraff24 is offline
Registered User
FRC #2872 (CyberCats)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Long Island
Posts: 38
anthonygraff24 is an unknown quantity at this point
Still Having Pneumatics Problems

I am using the FESTO VAVE-L1-1VH3-LP double solenoid. We have the solenoid wired so that the 24v port on the power distribution board connects to the wago on the crio breakout for pneumatics (Module NI9472 with Red Pneumatics Breakout). The solenoid wires are then plugged into double prong wires, ports 1 and 2 on the breakout. Red going to red and black going to black for each pair. When we use our joystick to actuate the piston we get a orange light for each button. We also get the green lights on the cRIO module to light up. The piston does not do anything. For reference, here is our code related to the Solenoid:

DoubleSolenoid piston = new DoubleSolenoid(1,2);
//Constructor

while(rightStick.getRawButton(4))
piston.set(DoubleSolenoid.Value.kForward);
while(rightStick.getRawButton(5))
piston.set(DoubleSolenoid.Value.kReverse);
while(!rightStick.getRawButton(4)&&!rightStick.get RawButton(5))
piston.set(DoubleSolenoid.Value.kOff);

Any and all help would be greatly appreciated!!
  #2   Spotlight this post!  
Unread 11-02-2014, 15:37
Ikillee Ikillee is offline
Registered User
FRC #4733
 
Join Date: Jan 2014
Location: Canada
Posts: 55
Ikillee is an unknown quantity at this point
I'm not a programmer but here's a link related to pneumatic wiring if the problem is with electronics. My team was wondering how to wire the solenoid to the solenoid breakout. I guess your post confirmed it was a wago connector we needed.

http://www.chiefdelphi.com/forums/sh...d.php?t=125707
  #3   Spotlight this post!  
Unread 11-02-2014, 15:50
Oblarg Oblarg is online now
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,084
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Still Having Pneumatics Problems

Caveat: While I know java, I'm not a robot programmer so I might be completely wrong about this.

That said, it seems like a really bad idea to use while loops in that way, as it makes it impossible for any code to execute at the same time as your solenoid commands. Moreover, since there is always one of your conditions that is true, you will in general never be able to execute any code other than that specific set of solenoid commands. Using different buttons for forward and backward commands on a double solenoid seems bad practice, too, without some sort of way to handle the case where both buttons are pressed at once, though I do not know off the top of my head what the behavior would be in this situation without something explicitly handling it in code, I could imagine it might be unfortunate (ironically, the fact that you're going to get caught in a loop with your given code handles this problem by itself as the forward and backward commands can't execute simultaneously, but upon revising it it'd rear its head).
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 11-02-2014 at 15:57.
  #4   Spotlight this post!  
Unread 11-02-2014, 15:55
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Still Having Pneumatics Problems

Quote:
Originally Posted by Oblarg View Post
Caveat: While I know java, I'm not a robot programmer so I might be completely wrong about this.

That said, it seems like a really bad idea to use while loops in that way, as it makes it impossible for any code to execute at the same time as your solenoid commands. Moreover, since there is always one of your conditions that is true, you will in general never be able to execute any code other than that specific set of solenoid commands. Using different buttons for forward and backward commands on a double solenoid seems bad practice, too, without some sort of way to handle the case where both buttons are pressed at once, though I do not know off the top of my head what the behavior would be in this situation without something explicitly handling it in code, but I could imagine it might be unfortunate (ironically, the fact that you're going to get caught in a loop with your given code handles this problem by itself as the forward and backward commands can't execute simultaneously, but upon revising it it'd rear its head).
You're right. The robot program is one big loop. To get it to work, you'll need to change those while loops to if/then/else.
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 17:18.

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