Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Pneumatics (http://www.chiefdelphi.com/forums/forumdisplay.php?f=54)
-   -   Code Not Recognizing Second PCM (http://www.chiefdelphi.com/forums/showthread.php?t=144742)

alambert14 25-02-2016 14:45

Code Not Recognizing Second PCM
 
I asked a question on here a while ago asking how to wire multiple PCMs, and I wired in in the can bus in series exactly how people said. As I can see on the roboRIO system configuration, the roboRIO recognizes both PCMs and has labeled them 0 and 1. However, when I upload our code to the roboRIO, and enable the robot, it says

Unhandled exception: edu.wpi.first.wpilibj.util.AllocationException: Solenoid channel 0 on module 1 is already allocated at [edu.wpi.first.wpilibj.Solenoid.initSolenoid(Soleno id.java:41)...

I have not allocated that channel anywhere in the code, and it gives the same error no matter what module ID I use or channel number.

Has anyone else had this same issue? Are the PCMs wired wrong? Thanks

Joe Ross 25-02-2016 15:42

Re: Code Not Recognizing Second PCM
 
We are succesfully using two PCMs, with Java.

Quote:

Originally Posted by alambert14 (Post 1546890)
However, when I upload our code to the roboRIO, and enable the robot, it says

Unhandled exception: edu.wpi.first.wpilibj.util.AllocationException: Solenoid channel 0 on module 1 is already allocated at [edu.wpi.first.wpilibj.Solenoid.initSolenoid(Soleno id.java:41)...

I have not allocated that channel anywhere in the code, and it gives the same error no matter what module ID I use or channel number.

If you keep reading through the trace-back from the exception, it will show what line of your code it thinks is re-allocating channel 0 on module 1. It's possible it's somewhere in your code that you forgot about.

alambert14 26-02-2016 13:56

Re: Code Not Recognizing Second PCM
 
We looked through all of our code and we are certain that it was not already allocated somewhere, especially since we had not previously had a second PCM ID in our RobotMap. In addition, it says that every single channel is already allocated.

Joe Ross 26-02-2016 17:06

It's really hard to diagnose without the trace back and your code.


All times are GMT -5. The time now is 05:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi