![]() |
Cannot turn on compressor programatically via Spike Relay
Hey guys,
We're having a lot of trouble getting the air compressor to turn on and regulate itself via a Spike Relay. Here's our setup:
Here is a link to our code, if you'd like to take a look. The compressor code is in the UpdatePressure class in the launcher package. Any help would be appreciated. We've been working on this for two days with no luck. All we know is that the problem is between the DSC and the Spike Relay, but we can't figure out why. |
Re: Cannot turn on compressor programatically via Spike Relay
We were having a very similar issue earlier.
Our problem is that our ribbon cable was not in correctly. If you are using a ribbon cable, make sure to screw down both ends, (in the cRio module and Digital Side Car). This fixed our issue for us. |
Re: Cannot turn on compressor programatically via Spike Relay
I would not put the compressor in a command. It's designed to run in the background automatically. I would declare the compressor in your launcher subsystem, and call start in the constructor of that subsystem. You don't need any other code.
|
Re: Cannot turn on compressor programatically via Spike Relay
You want this command to always run on the compressor so that it will always have full pressure and so that it will automatically shut off at the right time. To do this you need to set your UpdatePressure command as the default command for the compressor.
Here is an example from my team's code: Compressor Subsystem Code:
public class Compressor1 extends Subsystem {Code:
public class CompressorCommand extends Command { |
| All times are GMT -5. The time now is 05:25. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi