REV PDH Switchable Port Issue

We can see our pdh on rev hardware client and can enable the switchable port on it. But when we try to enable it via java code like this:

public class Robot extends TimedRobot {
  private Command m_autonomousCommand;

  private final RobotContainer m_robotContainer;

  private PowerDistribution pdh;

  @Override
  public void robotInit() {
      pdh = new PowerDistribution(1, ModuleType.kRev);
      pdh.setSwitchableChannel(true);
  }

it just does not power the port. We can also get the voltage data from pdh via java code and can write it on SmartDashboard so we think we can access the phd via code. On our first try we wired cancoders to the switchable port but then we thought that the canbus was not completed because that switchable port was not open and cancoders were off. So on our second try we wired the radio to swtichable port and canbus is now completed but again port did not turn on.

The channel should be on by default. You don’t need to create a PowerDistribution object just to use it.

(Note that, according to the 2025 game manual, you should not use the switchable channel for either roboRIO or radio. R615B, R617B)

Is the PDH at can ID 1? Are there any errors in the DS console (particularly about firmware versions)? Do the data getters return accurate data (indicating that the PDH is on the bus and is transmitting)?

I’ve seen it change state in both directions just by power cycling it.

I can’t argue with your experience, but as RI/CSA I’ve seen many teams use it reliably, including for Rio/radio where the only issue was fussy Robot Inspectors.