If you use an opto-isolator and the right current limiting resistor you can solve a lot of issues. The design I had in mind would be a constant current regulator driving the Opto-LED that would allow for a wide 5V to 40V operating input voltage range, and the output depending on how you configure it could operate as a NPN or PNP since the NPN- within the Opt
utput would be floating... the external circuit wouldn't care if it is NPN or PNP
You can get opto-isolated inputs on PLC's as a standard option, but (according to the guy I spoke to) it's pretty uncommon.
As I've mentioned all along, the problem in all these cases is
POWER - an open drain FET as sink in the sensor (or other feed device) takes essentially zero power, and any source requires considerable power in order to work.
This is particularly important in my application at work, as it's battery powered and potted (so non-replaceable), and is designed to give in excess of five years battery life (theoretical battery life of my new design is 50 years - and shelf life of the battery is listed as 25 years) and should considerably exceed that 5 years.
Feeding an opto-coupler from the design would absolutely cripple the battery life, as would anything that draws more current from the battery.
I've come up with an 'optional' relay board, this is simply fed from the drain of the FET, and powered externally (from a PLC?), with the N/O relay contacts floating so as to used in any way needed. But according to the 'guy' I keep mentioning, anything remotely modern simply needs a sink to earth, and the FET (which has a 100 ohm series resistor) works fine.
The sink option also means just two wires!.