Go to Post According to a recent study, 63% of teams admit they are behind. The other 37% are lying. - nitneylion452 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 18-02-2010, 18:07
reversed_rocker's Avatar
reversed_rocker reversed_rocker is offline
Alumni
AKA: Ken Condon
FRC #0706 (Cyberhawks)
Team Role: College Student
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Hartland
Posts: 69
reversed_rocker is on a distinguished road
Re: Help Solenoid Programming

solenoids are programmed a little differently that the drive, joysticks, analog inputs, or digital inputs that you're used to so i'll just write the code you need to initialize it and then give you an example of how to let air in and how to let air out. I'm going to assume that you're using the simple robot template, if you arent this code will still work but it will be placed in a different part of your code


//defines the pointers as part of the solenoid class, goes in class RobotDemo: public Simple Robot {

Solenoid *kicker_kick;
Solenoid *kicker_return;

//initializes solenoids and gives them a channel on the relay section of the IO board goes in RobotDemo(void):

kicker_kick = new Solenoid(1);
kicker_return = new Solenoid(2);

//pushes the kicker out, remember not to let the two sides of the solenoid fight each other, goes into the while(IsOperatorControl()) {

kicker_return->Set(false);
kicker_kick->Set(true);

//pulls the kicker back in
kicker_kick->Set(false);
kicker_return->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
Labview Solenoid Programming 3p1c w1n Programming 12 12-02-2010 17:29
Solenoid Programming Issue. Dr. Manhattan Pneumatics 2 10-02-2009 17:42
solenoid programming holty531 Programming 0 10-02-2008 16:17
Programming a Solenoid Brigander Pneumatics 4 17-02-2007 14:06
Solenoid Programming duckshepherd Pneumatics 1 17-02-2003 09:15


All times are GMT -5. The time now is 11:05.

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