No compressor light on PCM, no compressor power, no CAN recognition of compressor

I’m with a rookie team. We’re programming in Java and trying to figure it out as we go. We have no real Java experts, and can’t figure out if we have a hardware issue or a coding issue. All of lights on our PCM work except for the “Comp” light, which does not turn on at all. Our compressor works when we supply direct power, but we can’t seem to power it through the PCM. When we run the self-test, the computer does not seem to recognize that a compressor is attached.

We tried creating a c.setClosedLoopControl for the compressor, and we tried to just create a DoubleSolenoid, but nothing responds. Can anyone tell me how to tell if we got a bad PCM, and what can I do about it if we did? Alternatively, is there any kind of very basic Java code we can plug in just to rule out bad programming as the issue?

We aren’t doing pneumatics this year on my team, so I’m not familiar with the new system except that I’ve read some of the documentation. Here are some initial questions (sort of at the “is it plugged in” level) that might help solve your problem:

  • Do you have a pressure switch in your system, connected back to the appropriate terminals on the PCB? As I recall, the pressure switches are normally closed, so if you don’t have one, the PCB will think that you always have full pressure.
  • Same problem, different cause: Is the pressure switch working correctly? That is, when you do not have pressure on the switch, is there connectivity (that is, essentially 0 ohms) between the terminals? Are you getting connectivity between the two wires to the pressure switch at the PCB end?
  • Is your PCB powered from the correct port on the PDP?
  • Is the compressor connected into the appropriate ports on the PCB?
  • Is the PCB in the CAN bus?
  • Is the CAN bus terminated? The easiest way to do this is to have the PDP be the last
    item on the CAN bus, at the opposite end from the RoboRIO, and have the jumper next to the CAN connectors set to terminator on.

Please take a picture of your PCM, solenoid, and PDP where the PCM wires to.

Make sure you have at least one Solenoid or DoubleSolenoid decleared in your code. The compressor will not be initialized without having at least one:


Solenoid name = new Solenoid(1);

This code should actuate the double solenoid based on joystick button:

package org.usfirst.frcEasyJ.team5122;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.DoubleSolenoid;

public class MyRobot extends IterativeRobot {

    Joystick JS1 = new Joystick(1);
    DoubleSolenoid DValve1 = new DoubleSolenoid(1, 2);
    public void autonomousInit() {

    }
    public void autonomousPeriodic() {

    }
    public void teleoperatedPeriodic() {
        if (JS1.getRawButton(1)) {
            DValve1.set(DoubleSolenoid.Value.kForward);
        } else {
            DValve1.set(DoubleSolenoid.Value.kReverse);
        }

    }
    public void teleoperatedInit() {

    }
}

Just release a new PCM User’s Guide today…
http://www.crosstheroadelectronics.com/control_system.html
…please read section 4.1 and follow the steps in order to help troubleshoot.

I’m not sure if you can tell what’s what on this photo, but I think everything pretty much matches the wiring diagrams with the exception of the CAN cables, which I reordered to match GeeTwo’s suggestion to have the CAN bus terminate at the PCM. Based on the new manual, it looks like we may have software issues.
https://lh4.googleusercontent.com/PgpFAAnLgtCNUkZxWiCquAx-OgG7gIEe-Xll1u8iBrs=s170-p-no

I think he suggested the two ends of the CAN bus are:

RoboRio
Power Distribution Board (with the Termination jumper set to On)

The Pneumatic Control Module would be in the middle.

That said, my team wired the CAN bus wrong, and it still worked.

You’re right. Thanks. I’ll switch it back, but I honestly didn’t notice any difference between the way the robot responded when wired with either of those two arrangements.

If your CAN is hosed (disconnected of wired wrong) you will get a red light on the PCM status indicator. Make sure everything is green.

Check your pressure switch. It should be a normally closed switch, so you should sense continuity (using a meter) across the wires going into the PCM.

If the status is green, and the switch if closed, but are the PCM indicator is flashing showly, and the compressor will not start, then it probably still disabled and you need to look into the code.

Please also remember the code suggestions given above. The compressor WILL NOT start unless either the compressor/PCM is defined in the code or there is some pneumatic element (solenoid) defined.

If you don’t have any solenoids defined you will need to define the compressor:


public status final Compressor myCompressor = new Compressor(0);

We had this problem over the weekend and it took a few hours to figure this out.