You might have a device in code that isn’t on your bus (like a motor controller). Make sure you have all your IDs in code correct, and also make sure you don’t have any devices in code that’s not on the bus
No, it can, the constructor of the Solenoid and DoubleSolenoid class can take the CAN ID of the pneumatics module. I am not sure if this is your issue but we have had similar issues before and I do believe adding the CAN ID solved it.
I’m glad it worked! I have ran into this issue multiple times and always forget because it seems odd for the CAN ID to be in the solenoid rather than the pneumatics module itself, I’m sure there must be a reason for it though.
I don’t know if this still holds true but I was told at one point the reason this was done was if you were splitting a double solenoids relays onto two different PCM modules. It’s an edge case but in that scenario you want to tell it which relay and module by solenoid.
Edit. Reading the API the double doesn’t support that anymore so I’m not sure why I was told this.
If you contructed it like the following then the two objects aren’t linked together and the PCM would use CAN ID 10 and the Solenoid would use the default CAN ID 0. What PCM would the solenoid be associated with if you had multiple PCMs?
PneumaticsControlModule pcm = new PneumaticsControlModule(10);
Solenoid sol = new Solenoid(PneumaticsModuleType.CTREPCM, 0);
If you constructed it like the following, then they would associated and both would use CAN ID 11.
PneumaticsControlModule pcm2 = new PneumaticsControlModule(11);
Solenoid sol2 = pcm2.makeSolenoid(0);
The former syntax has the advantage that for robots with solenoids in multiple subsystems, you don’t need to pass PCM objects around, but with the disadvantage that you have to put in the CAN ID each time.