Go to Post If regolith ever makes a return, I will jump out of a window. - Oblarg [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 07-09-2011, 13:21
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Help with Solenoid Code In Java?

looking for some help. we're reprogramming our bot from last year in java to practice for next season.

I've run into a problem with our pneumatic system. I can turn on the compressor on but our code to switch the solenoids doesn't seem to do anything. Note that our pneumatics are not completely hooked up mechanically but we should still be able to hear the solenoids click if they were switching right?

We have the double solenoids that Festo provided in the Kit of parts last year. Looking through the Java packages I found both a "Solenoid" package and a "DoubleSolenoid" package. I wasn't sure which one to use so I tried both but both do not work. If anybody has any insight that would be greatly welcomed.

All of our code is online at http://code.google.com/p/sail-octopirates-first-3502/

Note, code for both packages is in there, one of them has been commented out.

Thanks a bunch!!
Reply With Quote
  #2   Spotlight this post!  
Unread 07-09-2011, 14:26
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help with Solenoid Code In Java?

Quote:
Originally Posted by twiggzee View Post
I've run into a problem with our pneumatic system. I can turn on the compressor on but our code to switch the solenoids doesn't seem to do anything. Note that our pneumatics are not completely hooked up mechanically but we should still be able to hear the solenoids click if they were switching right?
Most of the solenoids we use need a minimum pressure to activate (15-20 psi). If you don't have enough pressure, you won't hear anything.

Are the lights on the NI 9472 module lighting up? That should be sufficient to tell you that your code is working. There is 1 light for each solenoid output.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-09-2011, 00:53
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Help with Solenoid Code In Java?

we've done some more troubleshooting but still are not getting the right results. here's what we've figured out.

we called festo and found out that we had our solenoid configured wrong. we had the connections for the air tubes in the wrong places. anyhow, now we know that the solenoids are right because we can manually apply voltage to them and have them switch correctly.

we also have our pneumatics fully hooked up mechanically now and we know it holds pressure.

so then we tried the code again. when the robot is turned on, one of the lights on the solenoid turns on. this is before we ever enable the driver station. after enabling and waiting for it to get up to pressure, we try to switch it but no go.

did some more investigating on the solenoid breakout. there is no voltage coming out of any of the slots / pin pairs (1 through 8) except for the one that gives us lights. this should be normal right? as in only voltage should go to one side of the double solenoid at a time.

so it must be our code right? but once we get this double solenoid working, we actually want to add in another one. is there a way to code so that the solenoid breakout gives power to 2 slots / pin pairs at a time?

befuddled.
__________________
Wendy
Team 3502
Reply With Quote
  #4   Spotlight this post!  
Unread 12-09-2011, 12:20
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help with Solenoid Code In Java?

Quote:
Originally Posted by twiggzee View Post
did some more investigating on the solenoid breakout. there is no voltage coming out of any of the slots / pin pairs (1 through 8) except for the one that gives us lights. this should be normal right? as in only voltage should go to one side of the double solenoid at a time.
That sounds correct, electrically.

Quote:
Originally Posted by twiggzee View Post
so it must be our code right? but once we get this double solenoid working, we actually want to add in another one. is there a way to code so that the solenoid breakout gives power to 2 slots / pin pairs at a time?
It does sound like the code. Have you tried simplifying your code so you aren't dependent on your joystick code, to help isolate the problem? I don't see anything obviously wrong, but I'm not a java expert.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-09-2011, 15:19
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Help with Solenoid Code In Java?

try making it grip.set(true)
also make sure that you're not putting the solenoids in the digital sidecar, but on the solenoid breakout and on the ports you identified in the code
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 20-09-2011, 17:36
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Help with Solenoid Code In Java?

We figured it out! After much research into the wpilibj files, it turns out we just had the 9472 module plugged into the wrong slot. (although we did try to define the slot in the code before and it didn't work either). our code is working great now and we've even been able to get two double solenoid valves working.

of course after we figured that out, i noticed that the driver station even says "slot 8" for the solenoids. never noticed that before. whew!

and just in case anyone else is looking for the info, the default slots in the cRio are:

slot 8 for the 9472 module,
slot 1 for the analog module, and
slot 4 for the digital module.

thanks for everyone's help!
__________________
Wendy
Team 3502
Reply With Quote
  #7   Spotlight this post!  
Unread 20-09-2011, 18:09
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help with Solenoid Code In Java?

Quote:
Originally Posted by twiggzee View Post
and just in case anyone else is looking for the info, the default slots in the cRio are:

slot 8 for the 9472 module,
slot 1 for the analog module, and
slot 4 for the digital module.

thanks for everyone's help!
Alternate slots are 7 for the 9472, 2 for the analog module, and 6 for the digital module. Any other module in any other slot won't work.
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


All times are GMT -5. The time now is 00:40.

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