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?
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).
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.
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.
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.