which BOB are you using ?
depending on the BOB you may be able to add a pullup resistor of about 200 to 300 ohms
between the BOB input and +5V
with the -24V power supply terminal connected to the BOB's common / ground
the sensors open collector NPN output will ground the BOB's input when triggered
when the sensor output is off
the pullup resistor will pull the BOB's input towards +5V
the exact voltage depends on the BOB's input circuit
if for example the BOB's input circuit is a 74HC14 CMOS IC with a 10K pull down resistor to ground
a 200 ohm pull up resistor will pull the input up to +5V
John