The Cylinder, Threaded - M18 package already includes it for your convenience. When the operating temperature is -25°C~70°C, proximity sensors will work well.
ICB18L50N20PO Features
ICB Series Operating Temperature: -25°C~70°C Sensing Distance: 0.787 (20mm) Voltage - Supply: 10V~36V Response Frequency: 1.5kHz Package / Case: Cylinder, Threaded - M18 Moisture Sensitivity Level (MSL): Not Applicable
ICB18L50N20PO Applications
There are a lot of Carlo Gavazzi Inc. ICB18L50N20PO Proximity Sensors applications.