The Omron E3FA-RN21 (Z3724-ND) is a plastic body NPN retro-reflective sensor. Using a red light, it has a range of 0.1 to 4m when used with reflector E39-R1S (OR1042-ND). It can be used with voltages between 10 and 30V DC. The sensor itself fits Omron’s M18 mounting bracket E39-L183 (OR1158-ND).
The wiring diagram below shows the connections that need to be made to the circuit. The sensor has a 4 pin M12 connection that requires a cable, XS2F-M12PVC4S5M (236-XS2F-M12PVC4S5M-ND). As the sensor is capable of being either light or dark on, the Pink or sometimes White wire, will need to be connected to the Brown (Light on) or Blue (Dark on) connection.