That will indicate the stb4100 input terminal is connected to the +24V via a resistor and the LED inside the opti-isolator as in the last photo in post 2


most of the missing 2V will be the forward volt drop across the LED


That means you can connect the proximity sensor directly to the stb4100 input terminal

when the proximity sensor switches on the NPN transistor will ground the stb4100 input terminal to the -24V supply
and I would expect a current of about 10mA will flow out of the stb4100 input terminal and to ground via the proximity sensor

you can check this by connecting a stb4100 input terminal to ground via a meter set to the 200mA range


John