Hi,
that diagram that Roaster has come up with is exactly what I mean. There is a path from the supply of the prox sensor (12V) through a diode, a 10K resistor through the 2 ohm resistor to the
57CNC. You don't want to apply 12V to the 57CNC input, it will handle 5.5V max.
In the first pic you have the sensor represented as a plain open collector transistor, no problems, the series resistor and Zener diode are not required.
The second pic the sensor is depicted as an open collector transistor with a pull-up resistor R2. This is close to what Roaster has posted. The series resistor R1 and the Zener diode are now
required otherwise the supply of the proximity sensor has a path to the 57CNC. The Zener will ensure that the pin is not subjected to greater than 4.7V.
The last picture is an alternative. It requires a diode only, it will prevent the supply voltage via R2 getting into the 57NC.
Crai