Industrial M12 Connector Selection Guide:
A-Coded vs D-Coded vs X-Coded

Published: July 27, 2026 · Technical Guide

Why M12 Coding Matters

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.

M12 Coding Types at a Glance

CodingPinsKeying Tab PositionMax CurrentMax Data RatePrimary Use
A-Coded3, 4, 5, 8, 12, 1712 o'clock4A per pin (16A total for 4-pin)—Sensors, actuators, DC power, IO-Link
B-Coded4, 52 o'clock (offset)4A—Profibus, Interbus fieldbus networks
C-Coded3, 4, 5, 64 o'clock (dual key)6A per pin—AC power, motor drives (legacy, declining)
D-Coded46 o'clock1.5A100 Mbps (Cat 5e)PROFINET, EtherNet/IP, EtherCAT
X-Coded87 o'clock (offset)0.5A10 Gbps (Cat 6a)Gigabit Ethernet, IIoT backhaul, vision cameras
S-Coded2 + PE (3 total)10 o'clock16A per pin—AC motor power (replaces C-coded)
T-Coded411 o'clock12A per pin—DC power supply for devices (63V DC max)
L-Coded4 + FE (5 total)1:30 (offset)16A per pin—DC power distribution (Profibus PA, new standard)

A-Coded M12: The Workhorse

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.

D-Coded M12: Industrial Ethernet

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.

X-Coded M12: Gigabit for IIoT

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.

Quick Selection Decision Tree

Your ApplicationRecommended M12 Coding
24V sensor (PNP/NPN output)A-Coded, 4-pin
IO-Link master/deviceA-Coded, 4-pin or 5-pin
PROFINET / EtherNet/IP fieldbusD-Coded, 4-pin
Profibus DP networkB-Coded, 5-pin
GigE machine vision cameraX-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 busL-Coded, 5-pin

Airoadcon M12 Product Range

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