I am using a PLC (norvi.lk) that can handle 24V in it's digital input pins.
The idea is to have an interrupt triggered when a voltage pulse is sent to the pin. Unfortunately this won't work because the pins are floating and therefore always reading high.
Is it possible to correct this through software, or do I need to do a hardware modification? If a hardware modification is needed what would you recommend doing?
If the input pin is 24volts and floating, and the PLC can be configured to interrupt on a falling edge, I'd pull it lightly high, say with a 47k resistor and I'd use a simple NPN transistor (in open collector configuration) to pull it low to force the interrupt. Use, say, a 1k base resistor. If you want a rising 24volt pulse (or a pulse of a higher voltage than the ESP32 pin can deliver), instead, use two transistors (a PNP and an NPN) configured as a high side switch, to deliver the pulse.
EDIT
Forget that. I've just looked here. https://norvi.lk/industrial-esp32-norvi-iiot/ . It seems this device you are trying to interrupt is an ESP32. I assumed that the esp32 was sending the pulse.
I am guessing that the "24volts capable" pins are already an open collector configuration with a pullup resistor. Your option is then to trigger the interrupt on a falling edge.
The documentation available is not clear about how is implemented, unless you have found something better. Have you a schematic diagram of your particular model ?
To create a positive pulse for that from a 3.3volt or 5.0v volt device would require, as far as I see, a 2 transistor level shifter (configured as a high side switch). However, here may be an easier way.
It is a bit difficult to know what exactly is sitting between the ESP32 GPIO pins and the 24volt screw terminal inputs of that module.
Sounds like a s simple NPN that is normally is needed.
If the roles are reversed, that is ESP32 on the right side, change 3.3V and 24V pullups, and resistor values accordingly.