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.
ICB18L50F12POM1 Features
ICB Series Operating Temperature: -25°C~70°C Sensing Distance: 0.472 (12mm) Voltage - Supply: 10V~36V Response Frequency: 1.5kHz Package / Case: Cylinder, Threaded - M18 Moisture Sensitivity Level (MSL): Not Applicable
ICB18L50F12POM1 Applications
There are a lot of Carlo Gavazzi Inc. ICB18L50F12POM1 Proximity Sensors applications.