Go to Post So NASA is planning on blasting NERD deep into space? - Joe Matt [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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