Go to Post Want the TL;DR of it? Keep it simple, effective, and easy to use. - Andrew Schreiber [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 15-02-2006, 15:46
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Question pneumatic programming

hi, my team is having some problems using pneumatics, and we can't seem to figure out what the problem is. The problem is that we can only shift or fire the pistons in one direction. here is my code:

if (p1_sw_trig == 1)
{
relay1_fwd = 1;
relay1_rev = 0;
}
else if (p1_sw_top == 1)
{
relay1_fwd = 0;
relay1_rev = 1;
}
else
{
}

that's all there is to the code for shifting. The thing is, if we start the piston in the retracted position, we can click the trigger on port one to fire it. however pressing port one to return it to the old position won't do anything. we're also having this one-directional problem with another piston used in our launching mechanism. Pressing both buttons on the joystick one cause the bot to make a clicking sound on one of the elctronic devices, but nothing happens. Do you know anything about what could cause this? Most of our problems arise from my programming errors hehe; but it doesn't seem feasible that is the problem in this case. could it be a wiring problem we're not aware of? thanks a bunch
-Team Lugnut (1008)
  #2   Spotlight this post!  
Unread 15-02-2006, 15:48
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: pneumatic programming

What kind of solenoid is it?
  #3   Spotlight this post!  
Unread 15-02-2006, 16:03
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: pneumatic programming

My understanding of pneumatics is that you either want them on (a one and a zero) or off (two zeros). Your code should read:

Code:
if (p1_sw_trig == 1)
{
relay1_fwd = 1;
relay1_rev = 0;
}
else if (p1_sw_top == 1)
{
relay1_fwd = 0;
relay1_rev = 0;
}
else
{
}
All that flipping the relay fwd and backward does is reverse the polarity of the electricity which, in this case, does nothing. You want to simply turn OFF the signal by sending two zeros.
  #4   Spotlight this post!  
Unread 15-02-2006, 16:06
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: pneumatic programming

Quote:
Originally Posted by Greg Marra
All that flipping the relay fwd and backward does is reverse the polarity of the electricity which, in this case, does nothing. You want to simply turn OFF the signal by sending two zeros.

At least, that's the way our pneumatics code works.
You are using a single acting solenoid then. This type of solenoid could be compared to a pushbutton switch, with an 'NC' and 'NO' output. It will stay closed until you apply power, and close again once power is lost.

A double (or latching) solenoid only requires a momentary flow of electricity to either side, and will switch to the side with the applied current. This could be comapred to a toggle switch.

If Stephen is using a single solenoid, it would only open when either button is pushed (per code posted.)

Last edited by Tom Bottiglieri : 15-02-2006 at 16:08.
  #5   Spotlight this post!  
Unread 16-02-2006, 11:48
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: pneumatic programming

thanks so much for your help. the problem turned out to be most likely electrical, since replacing the relay controllers that control the pneumatics worked fine. (idk what they're called). programming wasn't the problem for once!
-Stephen
  #6   Spotlight this post!  
Unread 16-02-2006, 12:01
Greg Needel's Avatar Unsung FIRST Hero
Greg Needel Greg Needel is offline
REVving up for a new season
FRC #2848 (All-sparks)
Team Role: Engineer
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Dallas, TX
Posts: 3,107
Greg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond reputeGreg Needel has a reputation beyond repute
Re: pneumatic programming

Now i am not a programmer but i just thought i would post a reminder that when using a double acting solenoid with 1 spike relay you need to solder diodes into the electrical path so you can control the cylinder in both directions. Since you will be revercing the voltage to have the opposite effect the diodes prevent both ports from opening at the same time.
__________________
Greg Needel│www.robogreg.com
Co-founder REV Robotics LLC www.REVrobotics.com
2014 FRC World Champions with 254, 469, & 74
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Vex w/ MPLab dababyjebus FIRST Tech Challenge 27 25-04-2008 09:11
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
Programming Forum Warning Brandon Martus Announcements 10 29-12-2005 13:32
Organizing a programming team. scitobor 617 Programming 7 28-01-2005 19:18
Robot Programming Education phrontist Programming 11 03-05-2004 07:32


All times are GMT -5. The time now is 01:33.

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