Go to Post Holy Orbit ball Batman!!!!!!!!!!:yikes: - yodameister [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 14-02-2012, 21:44
Zero_Viscosity Zero_Viscosity is offline
Registered User
FRC #3344
 
Join Date: Feb 2012
Location: Fayetteville Georgia
Posts: 5
Zero_Viscosity is an unknown quantity at this point
Post DoubleSolenoid programming

Hello Forum, we are a relativley experienced team but this is my first time programming with windriver. I have previous experience in C++.

Anyways, I've written code for the solenoids to extend when a button on the controller is pressed. Unfortunatley, when the corresponding button is pressed, nothing happens. I don't have the code infront of my now, but this is about how it looks:

Code:
if(controller.GetRawButton(1))
solenoidName.Set(solenoidName.kForward);
else
solenoidName.Set(kOff);
The code compiles and builds without any warnings or errors. The cables are plugged in to their correct ports and the code most likely has those ports entered correctly.
Any help would be greatly appreciated as I am very confused.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2012, 01:42
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: 667
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: DoubleSolenoid programming

It could be a number of problems but since you did not provide enough info, it's hard to tell. For example, is that an electrical problem that you connected the solenoid incorrectly? Your code did not show how you initialize/instantiate your double solenoid. Make sure your solenoid is connected to the correct channels of the solenoid module in slot3 (or slot 7) of your cRIO. Make sure your solenoid module is powered by either 12V or 24V (depending on your solenoid's power requirement). When your code set the solenoid forward or reverse, did you see the corresponding LED light on the solenoid module lit up?
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2012, 16:54
Zero_Viscosity Zero_Viscosity is offline
Registered User
FRC #3344
 
Join Date: Feb 2012
Location: Fayetteville Georgia
Posts: 5
Zero_Viscosity is an unknown quantity at this point
Re: DoubleSolenoid programming

Sorry for the delay in answering. I fixed the problem though.

One: The Solenoid was being powered by 12V instead of 24V.
Two: The "Solenoid(ModuleNumber,Forward,Reverse)" was incorrect.
Three: The solenoid was plugged into an Analog Breakout instead of a Solenoid Breakout.
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 02: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