Go to Post Please, if you don't actually know what you're talking about, don't offer safety advice on the subject. - CENTURION [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 03-19-2013, 11:50 AM
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 305
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Pneumatics Programming help

Taking a quick look at your code,

You stated that you have your pressure switch connected to digital 3, and your relay (that is then connected to the compressor) connected to relay 2 as well. In this case you have the Compressor instantiation in the wrong order. It should be Compress(3,2).

Also as noted by Alan, you have not declared your compressor object. You need to add the line: "Compressor Compress;" somewhere before the constructor... which starts with the lines
"public:
RobotDemo(void):"

I also noticed that you are not calling Compressor.Start() until the OperatorControl function which will not run until the robot is enabled in TeleOp. We generally start that process from our constructor (in your case this could be right after the line "myRobot.SetExpiration(0.1);").

Also, are you getting any error messages displayed on the driverstation or the netconsole? Or is it just not working? Are you seeing a proper value on the digital input? (You can read this using: DigitalModule::GetInstance(1)->GetDIO(3)) and then printing to the netconsole or displaying on the dashboard).

If you see the digital correctly then is the relay being set? Do you see the LED next to relay 3 changing from color on the digital side car? Is it also changing on the relay itself? If either of these is not true then it could also be a wiring issue.

Hope this helps.
__________________
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


All times are GMT -5. The time now is 09:52 AM.

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