Published: July 27, 2026 · Technical Guide
The M12 connector has become the de facto standard for industrial automation — connecting sensors, actuators, fieldbus networks, and Ethernet backbones on factory floors worldwide. But the "M12" designation alone doesn't tell you what the connector does. The coding key — that small mechanical orientation tab on the connector face — is what determines pin count, data rate, power capacity, and protocol compatibility.
Plug an A-coded sensor cable into a D-coded Ethernet port and you'll get nothing. Plug a 4-pin D-coded into an 8-pin X-coded Gigabit line and you'll be stuck at 100 Mbps. Getting the coding right is the difference between a working production line and a midnight troubleshooting call. Here is your field guide to M12 coding.
| Coding | Pins | Keying Tab Position | Max Current | Max Data Rate | Primary Use |
|---|---|---|---|---|---|
| A-Coded | 3, 4, 5, 8, 12, 17 | 12 o'clock | 4A per pin (16A total for 4-pin) | — | Sensors, actuators, DC power, IO-Link |
| B-Coded | 4, 5 | 2 o'clock (offset) | 4A | — | Profibus, Interbus fieldbus networks |
| C-Coded | 3, 4, 5, 6 | 4 o'clock (dual key) | 6A per pin | — | AC power, motor drives (legacy, declining) |
| D-Coded | 4 | 6 o'clock | 1.5A | 100 Mbps (Cat 5e) | PROFINET, EtherNet/IP, EtherCAT |
| X-Coded | 8 | 7 o'clock (offset) | 0.5A | 10 Gbps (Cat 6a) | Gigabit Ethernet, IIoT backhaul, vision cameras |
| S-Coded | 2 + PE (3 total) | 10 o'clock | 16A per pin | — | AC motor power (replaces C-coded) |
| T-Coded | 4 | 11 o'clock | 12A per pin | — | DC power supply for devices (63V DC max) |
| L-Coded | 4 + FE (5 total) | 1:30 (offset) | 16A per pin | — | DC power distribution (Profibus PA, new standard) |
A-coded connectors handle 80% of factory-floor applications. Available in 3, 4, 5, 8, 12, and 17-pin configurations, they are the universal solution for proximity sensors, limit switches, solenoid valves, and DC power distribution. The 4-pin A-coded is the most common — found on virtually every industrial sensor with 24V DC power and a PNP/NPN output signal.
If your factory runs PROFINET, EtherNet/IP, or EtherCAT, you are using D-coded M12 connectors. With 4 pins arranged for 100 Mbps Fast Ethernet (two differential pairs — RX+/RX- and TX+/TX-), D-coded M12 is the backbone of industrial networking in harsh environments.
As factories deploy GigE vision cameras, high-bandwidth vibration sensors, and real-time edge AI analytics, X-coded M12 has become essential. With 8 pins carrying four differential pairs, X-coded delivers 10 Gbps at Cat 6a — the same speed as standard RJ45 but in an IP67-rated, vibration-resistant M12 form factor.
| Your Application | Recommended M12 Coding |
|---|---|
| 24V sensor (PNP/NPN output) | A-Coded, 4-pin |
| IO-Link master/device | A-Coded, 4-pin or 5-pin |
| PROFINET / EtherNet/IP fieldbus | D-Coded, 4-pin |
| Profibus DP network | B-Coded, 5-pin |
| GigE machine vision camera | X-Coded, 8-pin |
| AC motor power (230/400V) | S-Coded, 3-pin |
| High-current DC device (motor, actuator) | T-Coded, 4-pin |
| DC power distribution bus | L-Coded, 5-pin |
Airoadcon manufactures a complete range of M12 connectors in A, B, D, X, S, T, and L coding. Available in straight and right-angle orientations, male and female genders, panel-mount (front/rear), and overmolded cable assemblies in PVC or PUR jacket. All connectors are IP67 rated, RoHS and REACH compliant, with gold-plated contacts as standard.
We also offer custom labeling, laser marking, and customer-specific cable lengths with no minimum order quantity for prototypes.
Need M12 connectors for your factory automation project?
We stock A, B, D, and X-coded M12 connectors with custom cable lengths available. Free samples for qualified buyers, 1–2 week lead times.
Email: info@airoadcon.com | WeChat: 18991927716