![]() |
Compressor won't start
For some reason, our compressor won't start when the code deploys fine, and we have the compressor and pressure gauge switch hooked up correctly ( I think). The compressor should start soon as the robot is turned on correct? The compressor for us doesn't even start even if we enable teleops in the DS. Any help will be appreciated. I may be missing a simple step, so if anybody has an idea, please give suggestions. Here is the code btw:
Code:
#include "WPILib.h"ken |
Re: Compressor won't start
As far as I know, the WPILib kills any and all attempts to supply power to *anything* when the Watchdog hasn't been fed, or the robot is disabled. Try setting the compressor to start when Teleop is enabled.
Good luck. :) |
Re: Compressor won't start
I tried the method above and no success. I have also connected to the netconsole, and there seems to be no errors. I need help guys xP
|
Re: Compressor won't start
Are you sure it's not a wiring problem? Is the Spike powered by +12V and connected to the correct Relay output? Is there a breaker in the distribution board? Is the sidecar powered? Does the compressor turn on if it's connected direct to +12V? The code seems fine to me.
The pressure switch shouldn't be a problem, because the compressor will turn on even if that's disconnected. |
Re: Compressor won't start
I'm quite sure everything is wired correctly. The solenoids etc are currently not wired, but the compressor is attached to the spike relay. the spike has power and the pwm is in relay 1. The pressure guage is plugged into digital 1. If it helps I tried using the GetPressureSwitchValue() function, and I only get the readings of 0 or 1, unless that is normal. We tried running the compressor directly from the battery to see if the readings will change, but no change.
|
Re: Compressor won't start
Quote:
Code:
compressor(4,2) |
Re: Compressor won't start
Quote:
I know you can run the compressor using the relay class, but I also know that using the compressor class simplifies things a lot, so I want to avoid that. |
Re: Compressor won't start
Quote:
The software turns the compressor on even if the pressure switch is not wired. It's one less thing to go wrong when you are first testing, but you must use the pressure switch after things are working. Leave the selected digital port unconnected for now, just to be sure it's not preventing the compressor from turning on. As you suggested, I would try using the Relay class next. Something like this, untested: Code:
Relay *m_relay_1; |
Re: Compressor won't start
Quote:
|
Re: Compressor won't start
ok, I just tried it and the compressor did not run. Is it suppose to run when I turn on the robot or when I enable teleops? It did not work either way anyways. I'm assuming there is a problem with the wiring then?
|
Re: Compressor won't start
bump. I still can't get the compressor running :3. Should the relay port on the sidecar's LED (the 2 things on the side), should one of them be on when the compressor is in operation? I remember it being on berfore, but is not on right now.
|
Re: Compressor won't start
The compressor WILL NOT RUN without the pressure switch connected, this is because the switch is a normally closed contact, that goes open when its reached pressure.
The code you showed shows Digital In 4 as where its expecting the switch, and Relay 2 as where its outputting the signals. The LEDs on the sidecar near the relay ports will switch when its working. Also, I highly recommend using pointers instead of directly instantiating your objects: Code:
class myRobot : public SimpleRobot |
Re: Compressor won't start
Quote:
|
Re: Compressor won't start
Quote:
I didn't check our pressure switch, but it's odd that everything works. The compressor turns on and off as expected, confirmed by the pressure gauge, and the compressor runs when the switch is not wired. That's why I thought the switch must be normally open, but reading the spec, it is normally closed. We're declaring the standard Compressor object and using m_compressor->Start(). Maybe the floating cRIO digital input is picking up noise and sensing it as a logic low, turning on the compressor? |
Re: Compressor won't start
Is possible, maybe... Floating digital inputs generally read high, but I've seen them be low occasionally... I would check for an aluminum shaving or something lodged in your sidecar.
|
| All times are GMT -5. The time now is 12:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi