Reverse function optocoupler in series with physical NC switch?
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. The logic of the opto-isolator can be inverted using an NPN small signal transistor.

How it works.


When the slot-sensor is obstructed Q2 is off so Q3's base will be fed by R3 and Q3 will short LIM to ground.
When light falls on Q2 it will turn on and steal the base current from Q3.


With 1k in there for R3 Q2 will have to pass 5 mA with the amount of light received from D2. You'll need to check the current transfer ratio (CTR) of the slot switch to see if it is likely to be able to achieve this. If not you'll have to increase R3. If this is too much work then just try it as I have drawn it.



In response to comments:

From @glen_geek:


  But there are potential nasty failure modes....If any part of the opto-coupler fails, Q3 conducts (acts as a N.C. switch). That's its all OK state.


Agreed. Proving something is absent is much more difficult.

One way around this is to use Figure 1a but cut the slot sensor in half, and make a reflective sensor. The LED light would have to reflect off the obstructing surface into the receiver and then when the reflection is lost Q1 would turn off. This is likely to be difficult to set up. You could try using your phone camera to look at the infrared. (Article by me.)