Go to Post Incidentally, the best Delphi is ChiefDelphi! :) - Max Lobovsky [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 18-06-2015, 14:36
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Can't get Solenoid to fire?

Hi! We have spent many hours trying to get our Double Solenoid to work but all attempts have ultimately failed. We get green lights on the card in the CRIO slot showing us that it does have signal. The Solenoid is yellow on both sides and is 12V which is the voltage we are giving it. There is no clicking or any evidence the solenoid is bad or can't fire. We tried many other solenoids without luck. Any help will be greatly appreciated! Code:
Code:
package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton; 


public class RobotTemplate extends SimpleRobot {
     private final Joystick DriverStick,other;                       //defines Axis Camera
     private final DoubleSolenoid s1;  
     RobotDrive myDrive;//defines solenoids
    private boolean orange;


    public RobotTemplate() {
          myDrive = new RobotDrive(3,2);
          DriverStick = new Joystick(1);            
          Compressor airCompressor;  
          airCompressor = new Compressor(14,7);
          airCompressor.start(); 
          other = new Joystick(2);
          s1 = new DoubleSolenoid(3,8);

     }
     public void operatorControl() {
         while (isOperatorControl() && isEnabled()){
               myDrive.tankDrive(other, DriverStick);
         
          if(DriverStick.getRawButton(1) == true)
          {
              
               s1.set(DoubleSolenoid.Value.kReverse);
           }
           if(DriverStick.getRawButton(2) == true)
           {
               
                s1.set(DoubleSolenoid.Value.kForward);
            }
           
         }
    }
    }
    

}
  #2   Spotlight this post!  
Unread 18-06-2015, 15:50
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,679
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Can't get Solenoid to fire?

You specified that you are using the cRIO. Are you using the 2014 version of wpilib? My understanding is that there are enough changes from cRIO to roboRIO that the 2015 version does not work on the old hardware.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #3   Spotlight this post!  
Unread 18-06-2015, 17:07
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,855
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: Can't get Solenoid to fire?

Programming:
  • Make sure the solenoid module LEDs show one side of the solenoid to be off while the opposing side of the solenoid is on and vice versa.
  • If the solenoid module LEDs are alternating and changing as you expect, then the code is doing all it can.
Electrical:
  • Verify that the solenoid breakout power LED is on.
  • Verify with a multi-meter that each side of the solenoid is receiving 12v when the module LEDs signal that it should be.
  • Verify with your meter that when one solenoid coil is energized that the opposite coil is not.
  • Make sure both solenoid side yellow indicators are not on at the same time. One should be on while the other is off.
  • The solenoid coils might be wired backwards, so use the meter to verify that the polarity is correct.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #4   Spotlight this post!  
Unread 18-06-2015, 17:34
SenorZ's Avatar
SenorZ SenorZ is offline
Physics Teacher
AKA: Tom Zook
FRC #4276 (Surf City Vikings)
Team Role: Teacher
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Huntington Beach, California
Posts: 937
SenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond repute
Re: Can't get Solenoid to fire?

Brute force: always try manually pushing the blue button on the solenoid to see if the mechanism is able to work.
__________________
2013-present: FRC Team 4276, Surf City Vikings
2011-2012: FRC Team 3677, The Don Bots
  #5   Spotlight this post!  
Unread 18-06-2015, 18:54
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,855
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: Can't get Solenoid to fire?

That's a good point.
Make sure there is sufficient pressure for the solenoid to activate (>20 or 25psi).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #6   Spotlight this post!  
Unread 18-06-2015, 19:11
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Can't get Solenoid to fire?

The LEDs do alternate and when I press the blue button, the piston fires. I haven't checked the voltage yet on the wires so I will the next time. The only thing I see from I what you said is that the solenoid is yellow on both sides which you said wasn't supposed to happen. How can I fix this problem? Thanks for all the replies!
  #7   Spotlight this post!  
Unread 18-06-2015, 22:11
SenorZ's Avatar
SenorZ SenorZ is offline
Physics Teacher
AKA: Tom Zook
FRC #4276 (Surf City Vikings)
Team Role: Teacher
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Huntington Beach, California
Posts: 937
SenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond reputeSenorZ has a reputation beyond repute
Re: Can't get Solenoid to fire?

I'm not a programmer, but I think you've got an issue of no "else" statement. It would seem if button 1 is pressed, then button 2, both solenoids would be getting the "go" signal.

My extent of programming help ended when my old team using labview 4 years ago. So if you're shaking your head in disgust at my theory, I am sorry!
__________________
2013-present: FRC Team 4276, Surf City Vikings
2011-2012: FRC Team 3677, The Don Bots
  #8   Spotlight this post!  
Unread 18-06-2015, 22:35
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,855
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: Can't get Solenoid to fire?

No "else" is necessary. The last "set" wins.
The code just works out that button 2 wins any tie, and in a tie the solenoid just gets set twice, but so fast that the system won't even notice.

Having both yellow signal lights on means both sides are energized and attempting to pull in opposing directions. So the solenoid shouldn't move from whatever position it is current in.

The yellow solenoid signal lights for each side should only light when they have power and consequential are active, otherwise they don't get power to even light the signal light.
If the solenoid module is showing green for one of the sides (power on), and dark for the opposite side (power off), then the corresponding signal lights should be yellow and dark.
So there seems to be some sort of short sending power to the wrongly lit side of the solenoid.

Either wires are crossed or the solenoid module is powering output pins when it shouldn't be.
Use your meter to verify that power is indeed getting to what should be the unpowered side. Test at the solenoid module pins without the solenoid connected.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 18-06-2015 at 22:51.
  #9   Spotlight this post!  
Unread 18-06-2015, 22:43
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,679
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Can't get Solenoid to fire?

Edit: I see Mark beat me to this, and knows more authoritatively.

Quote:
Originally Posted by SenorZ View Post
I'm not a programmer, but I think you've got an issue of no "else" statement. It would seem if button 1 is pressed, then button 2, both solenoids would be getting the "go" signal.

My extent of programming help ended when my old team using labview 4 years ago. So if you're shaking your head in disgust at my theory, I am sorry!
SenorZ,
I have not worked with the pneumatics methods (only mentored programming in 2015, and we didn't use pneumatics), but if it's anything like the spike methods (which we did use for LEDs), setting kForward and kReverse automatically clear the other side.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
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 21: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