Digital Input issue - Portenta Machine Control

I am attempting to use the Portenta Machine Control Digital Inputs to read switches.
I am switching 24V onto the pins.
The supplied example causes a weird problem as soon as I open the Serial Monitor. As soon as the Serial Monitor is started, the Digital Input port faults… When I do that, then only CH00 and CH03 work. CH01, CH02, CH04, CH05 & CH06 all illuminate the PMC indication LEDS..! They then do not detect an input.
The problem occurs when the digital input is initialised. digital_programmables.init()
The example is from: Examples > Arduino_MachineControl > Digital_programmable > Digital_input
and is called Digital_input.
Can anyone please suggest a fix or a workaround?

I am encountering exactly the same issue...
Did you find a solution to this please?

No solution

SOLUTION FOUND! Or at least, the CAUSE FOUND!
It appears to be a conflict relating to the addresses I used for the I2C displays.
I initially used 0X22 and 0X23 and experienced the problem. Changing the display Backpacks allowed me to select a different address range (0X3E and 0X3F) and the problem no longer occurs.

Hi @gadget12,

Glad you found the cause, did that help with your other Programmable Digital I/O Pull-up post?