The standard pinouts behind M8 and M12 sensor cabling — 3- and 4-pin M8, 4- and 5-pin A-coded M12 — the colour convention (brown/blue/black/white), when to choose angled versus straight and field-wireable versus moulded, and fault-finding sensor circuits with a meter.
Industrial sensors standardised on circular connectors: M8 (3- or 4-pin) for miniature devices, M12 A-coded (4- or 5-pin) for everything else. The conventions that make any brand plug into any cordset:
| Pin (M12 A-coded) | Wire colour | Function (DC 3/4-wire) |
|---|---|---|
| 1 | Brown | +24 V |
| 3 | Blue | 0 V |
| 4 | Black | Switching output (NO or main) |
| 2 | White | Second output (NC/complementary) or input |
| 5 | Grey/green-yellow | Diagnostics or functional earth (5-pin) |
M8 3-pin carries pins 1/3/4 with the same colours; M8 4-pin adds the white. A-coding's keyway prevents mating with B/D-coded (fieldbus/Ethernet) circuits that share the thread.
Moulded cordsets are the reliability choice — vibration-sealed, IP67/IP69K per rating. The catalogue carries straight and angled M8/M12 cordsets in standard lengths (e.g. XZCP0666L5 — angled M8 female, 3-pin, 5 m) and the full XZCP family alongside the sensors. Field-wireable connectors (XZCC12FCM40B — M12 female, angled, 4-pin, screw terminals) rescue odd lengths and on-machine repairs: strip per the insert's gauge, land colours per the table, torque the gland, and treat them as serviceable rather than disposable. Choose angled heads where the cable would otherwise bow against guarding (the strain that kills moulded tails), straight where the exit runs along the mount.
With a meter at the open cordset end, the whole sensor circuit is diagnosable in a minute: 24 V between brown and blue (supply present); on a PNP sensor, black→blue reads ~24 V with target present, ~0 V without (output alive); a sensor whose indicator follows the target while the PLC never sees it means cordset or input card, not sensor — swap the cordset first. Chronic connector failures trace to three causes: unsupported cable bouncing at the plug (clamp within 100 mm), coolant wicking through a loose coupling nut (torque it; check the O-ring), and pin corrosion from washdown chemistry (use the stainless/food-grade cordset classes where the sensors themselves are the stainless variants — see the inductive guide).