Go to Post I, for one, have no particular problem with singing, dancing and sex appeal. Mark Leon combines all that with a career at NASA! - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 24-02-2010, 09:49
Rikard023's Avatar
Happy Birthday! Rikard023 Rikard023 is offline
Programmer/Animator/Captain/Ninja
AKA: Rikard
FRC #0522 (The Robowizards)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Staten Island,NY
Posts: 20
Rikard023 is an unknown quantity at this point
Send a message via AIM to Rikard023
need Solenoid help

If anyone knows how to write a solenoid program correctly or any where i can get info on it, I would be very Grateful
__________________
"Sharp edges are prone to cause bleeding trust me i know" T.T

http://www.robowizards.com
Reply With Quote
  #2   Spotlight this post!  
Unread 24-02-2010, 10:06
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: need Solenoid help

Have you looked at the documentation? It should give you a good start.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 24-02-2010, 11:05
Rikard023's Avatar
Happy Birthday! Rikard023 Rikard023 is offline
Programmer/Animator/Captain/Ninja
AKA: Rikard
FRC #0522 (The Robowizards)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Staten Island,NY
Posts: 20
Rikard023 is an unknown quantity at this point
Send a message via AIM to Rikard023
Re: need Solenoid help

Yea i looked at it and wrote from it and it didn't work
__________________
"Sharp edges are prone to cause bleeding trust me i know" T.T

http://www.robowizards.com
Reply With Quote
  #4   Spotlight this post!  
Unread 24-02-2010, 13:05
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 674
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: need Solenoid help

Are you doing pneumatics? If so, there are a number of ways to wire pneumatics. Assuming you hook the pneumatic valve to two Solenoid channels (DO channels). Here is the code to operate it.

Disclaimer: I am new to pneumatics, so this may not be the right way to do it, but it works for us. Another way to do it is to use a relay instead of two solenoid channels but it requires a relay.

Code:
#define SOLENOID_EXTEND_CHANNEL  1
#define SOLENOID_RETRACT_CHANNEL 2
private:
    Solenoid *m_solenoidExtend;
    Solenoid *m_solenoidRetract;
...

// In some constructor
    m_solenoidExtend = new Solenoid(SOLENOID_EXTEND_CHANNEL);
    m_solenoidRetract = new Solenoid(SOLENOID_RETRACT_CHANNEL);

...

// To extend the pneumatics
    m_solenoidRetract->Set(false);
    m_solenoidExtend->Set(true);

// To retract the pneumatics
    m_solenoidExtend->Set(false);
    m_solenoidRetract->Set(true);
Reply With Quote
  #5   Spotlight this post!  
Unread 24-02-2010, 13:13
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 674
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: need Solenoid help

Forgot to mention a few more things: make sure your DO module is in the default slot 8 (or you have to specify the slot in the code). Also make sure the soloenoid bumper is powered with appropriate voltage. FIRST provided 24V valves this year, so you need to feed 24V to the bumper (not 12V).
Reply With Quote
  #6   Spotlight this post!  
Unread 24-02-2010, 13:35
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 674
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: need Solenoid help

BTW, forgot to mention one more thing: you need to create a compressor object too. The compressor power should be hooked to a Spike relay and the pressure switch should be hooked to a digital input channel.
Code:
#define PRESSURE_SWITCH_CHANNEL  1
#define RELAY_COMPRESSOR_POWER  1
private:
Compression *m_compressor;
...

// In some constructor
    m_compressor = new Compressor(PRESSURE_SWITCH_CHANNEL, RELAY_COMPRESSOR_POWER);
    m_compressor->Start();

Last edited by mikets : 24-02-2010 at 13:42.
Reply With Quote
  #7   Spotlight this post!  
Unread 24-02-2010, 14:20
Rikard023's Avatar
Happy Birthday! Rikard023 Rikard023 is offline
Programmer/Animator/Captain/Ninja
AKA: Rikard
FRC #0522 (The Robowizards)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Staten Island,NY
Posts: 20
Rikard023 is an unknown quantity at this point
Send a message via AIM to Rikard023
Re: need Solenoid help

thanks that should be egood enough
__________________
"Sharp edges are prone to cause bleeding trust me i know" T.T

http://www.robowizards.com
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Festo Solenoid and Labview Team2883 General Forum 3 17-02-2010 12:56
Need help with SMC solenoid valves Ed Law Pneumatics 6 04-02-2010 06:43
Solenoid Help aznbadboixx Pneumatics 0 15-02-2008 15:53
Solenoid Help Brigander Programming 2 14-02-2007 17:13
Need instructions for SMC Single/Double solenoid WHou Pneumatics 5 29-01-2005 08:17


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

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