PCM IS NOT ENABLED

I am trying to get our compressor to turn on, and it was working a few days ago. Now when the robot is turned on the PCM flashes green slowly, and the self-test in the web interface says:

“PCM IS NOT ENABLED! If the robot is enabled maybe the ID is wrong? Close Looping is ON, but PCM is DISABLED Comp is OFF Pressure is not full”

I am using c++ to code, and I have 2 solenoids declared
The compressor is wired to the PCM, but it reports no power to the compressor.

Is the compressor not working? Is the PCM broken? Do I need to add more code?

1 Like

Can you confirm that the CAN id for the PCM is 0?

I assume you have a pressure switch wired in and you have tried enabling the robot. Please correct me if that is wrong.

Did you check your CAN bus connection?

You won’t know if the compressor is working or not. If the PCM is not energizing the connection to the compressor, then the compressor will not receive power. The PCM will not energize the connection if the PCM is not enabled.

Double-check this assumption. We had the same experience in Labview. In our case the solenoids weren’t declared/opened properly. It acted like the PCM would not enable the compressor unless the code knew there was a corresponding solenoid to enable it for.

Is the CAN id for the PCM required to be 0 for C++?

Because unless an update changed something, the PDP is needed to be 0, in C++. There is no constructor in WPILib for the PowerDistributionPanel class to make the PDP anything other than 0. (http://www.chiefdelphi.com/forums/showthread.php?t=133028 Read the 2nd post).

Edit: Ignore me.

Both the PDP and the PCM should have CAN ID 0. At least the first PCM.
They don’t conflict because they are different types of devices and the full CAN ID includes that too.

That’s good to know. I was under the impression that having both with the same ID would cause one to not get enabled.

Thanks for correcting me.

It doesn’t matter what language you use, the PCM controlling your compressor needs to be set with a CAN ID of 0. Mark explained how you can have PCM and PDP ID’d as 0.

You set the ID through the roboRIO web interface. More information on that can be found at For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation.

I guess I worded my post ambiguously. I know how to change the ID through the web interface, what I meant was there isn’t a way, when writing the code, to specify a PDP with a device ID other than 0.