How to choose a replacement M12 inductive proximity sensor
Match the mounting, target gap and PLC input before ordering. Compare four catalog models rated at 4 mm or 8 mm, including flush, quasi-flush and non-flush designs.
Need help selecting? Send photos of the model, nameplate and installation; quantity may be unknown.
A replacement for a steel locating flag
A slide stops with a steel flag in front of a sensor mounted in a steel block. The old switch reads “M12”; the remaining markings are damaged. The machine drawing calls for a 24 V DC, PNP, normally open input. A mechanic finds two M12 switches with the right connector. One says 4 mm and the other 8 mm. Which belongs on the machine?
Start at the block. If metal must extend up to the sensor face, shortlist a model explicitly approved for flush mounting. An 8 mm non-flush sensor needs clearance around its head. A longer rated range helps only when the bracket, target and input are also compatible.

Record two dimensions at the machine
Face to target. With the machine secured, measure from the active face to the near surface of the flag at its detection position. Record the smallest and largest expected gap over normal travel, along with flag material, width and thickness. The smallest gap tells you whether the flag could strike the sensor. The largest is the one the sensor still has to detect.
Face to surrounding metal. Take a side photo that shows the block, nuts and sensor nose together. Record whether the face is level with the block, sits behind it or projects into free space. Include any steel guard beside the nose. Also identify the front mounting thread and rear electrical connection separately: the former fits the machine, the latter fits the cable.
| Candidate | Mounting and output | Decision in the steel-block example |
|---|---|---|
| BEDOOK BB-M1204P-C11S12 | 4 mm; flush; PNP NO | Check usable gap and exact target |
| BEDOOK BN-M1208P-C11S12 | 8 mm; non-flush; PNP NO | Needs head clearance; cannot simply occupy the flush block |
| LANBAO LR12XBF04DPOY-E2 | 4 mm; quasi-flush; PNP NO | Verify permitted metal setback and assured distance |
| LANBAO LR12XBN08DNOY-E2 | 8 mm; non-flush; NPN NO | Review both mounting clearance and PLC input compatibility |
Compare candidates against the drawing
- A steel block with a level face. BEDOOK BB-M1204P-C11S12 is rated 4 mm, flush, PNP normally open. It is the first candidate for this case. Confirm the flag and maximum gap against the manufacturer's usable distance, then check pin assignment and available length behind the block. View the 4 mm BEDOOK sensor
- A projecting head with space around it. BEDOOK BN-M1208P-C11S12 is rated 8 mm, non-flush, also PNP normally open. It passes the initial output check but requires a different mounting envelope. If the existing block encloses the head and cannot change, eliminate this candidate. View the 8 mm BEDOOK sensor
The BEDOOK ordering table puts these part numbers in different mounting groups and identifies their connector versions. Use the full suffix when asking for a drawing. BEDOOK M12 three-wire selection table
What if the supplier proposes a LANBAO alternative?
Check the word immediately before “flush”. LANBAO LR12XBF04DPOY-E2 is a 4 mm quasi-flush, PNP normally open sensor. Ask for the permitted metal setback around this exact head before accepting it in a level steel block. Its 8 mm catalog counterpart LR12XBN08DNOY-E2 is non-flush, NPN normally open. Substituting those two also changes the direction of output current. Verify the input module's circuit and common connection. LANBAO LR12XB-Y ordering matrix
For example, suppose the measured gap varies from 2.5 to 3.5 mm. The LANBAO sheet specifies an assured range of 0 to 3.2 mm for the 4 mm version with its reference target. That leaves the last 0.3 mm of the machine's travel outside the published assurance. The 8 mm version deserves further review only if the mounting and electrical input can accommodate it. A change to the flag or bracket is another option to review with the machine owner. LANBAO LR12X technical sheet, model and target data
Send a specification the supplier can answer
| Check | Information to record | Do not substitute |
|---|---|---|
| Target | Material, dimensions and orientation | A nominal range measured on another target |
| Working gap | Minimum and maximum over normal travel | One parked measurement |
| Mounting | Face position, adjacent metal and rear clearance | Flush, quasi-flush and non-flush as equivalent |
| Electrical | Supply, PNP/NPN, NO/NC and pin assignment | Connector shape for wiring confirmation |
| Commissioning | Detection and release at travel extremes | A single successful trigger |
Example enquiry. Please quote an M12 inductive sensor for a steel locating flag. The bracket is steel and must remain level with the active face. The working gap varies from 2.5 to 3.5 mm. The circuit is 24 V DC, PNP normally open. Attached are the flag dimensions, bracket photo, terminal diagram and cable connector photo. Please confirm the exact ordering code, assured range for this target, metal clearances and pin assignment.
Before releasing the replacement for use, verify detection and release at the actual extremes of travel using the machine's approved commissioning procedure. For the physics behind that check, read the 4 mm vs 8 mm technical analysis. Browse proximity sensors
Need help selecting? Send photos of the model, nameplate and installation; quantity may be unknown.
