View Single Post
  #1   Spotlight this post!  
Unread 19-02-2016, 19:23
PiMeson123 PiMeson123 is offline
Registered User
FRC #3506
 
Join Date: Jan 2015
Location: Charlotte NC
Posts: 4
PiMeson123 is an unknown quantity at this point
Using DoubleSolenoids on a PCM without a compressor

Hello,
Our team is trying to control a double solenoid through the CAN bus that is connected to a PCM without a compressor. The double solenoid controls the direction of airflow for gear shifting in our drive train, and will be connected to reservoirs of air that we charge before a match. We are a command-based Java team. This is what our GearShift subsystem looks like:
Code:
public class GearShiftSubsystem extends Subsystem {
	private DoubleSolenoid shifter;
	private Compressor compressor;
	public GearShiftSubsystem(){
		shifter = new DoubleSolenoid(RobotMap.SOLENOID_PORTS[0], RobotMap.SOLENOID_PORTS[1]); // (0, 2)
		compressor = new Compressor(50);
		compressor.setClosedLoopControl(true);
	}
	
	public void shiftUp(){
		shifter.set(Value.kForward);
	}
	
	public void shiftDown(){
		shifter.set(Value.kReverse);
	}
	
	public Value shiftedState(){
		return shifter.get();
	}
}
This is not working for us. We cannot hear or see the double solenoid moving valves although we can confirm that the PCM is receiving signalling from the RoboRIO. We are concerned about instantiating a Compressor object, when there is not in fact a literal compressor, although we need a way to pass in the PCM ID. If anyone could give us a hint or show us a resources regarding a fix to this, it would be greatly appreciated. It's probably a very simple fix, but unfortunately it has eluded us for the moment. Thanks.