M12, M8, RJ45 & DB9 Connector Pinouts — Ethernet/IP, PROFINET, IO-Link

Pin assignments and coding for the connectors on a packaging line, in one chart. M12 A-coded for sensors, actuators, IO-Link and DeviceNet; M12 D-coded for 100 Mbit industrial Ethernet, which is what PROFINET, EtherNet/IP and EtherCAT run on at the device; M12 X-coded for gigabit Ethernet; M8 for compact sensors and IO-Link; and RJ45, DB9 and USB for the panel side.

The coding is the keyway that stops the wrong plug from mating, and it is the first thing to check when a drop cable does not fit. Worked example: an IO-Link sensor on an A-coded M12 uses pin 1 for L+ (24 V), pin 3 for L− (0 V) and pin 4 for C/Q, the communication line; a D-coded Ethernet drop uses pin 1 TX+, pin 2 RX+, pin 3 TX− and pin 4 RX−, and the same cable serves PROFINET and EtherNet/IP because the protocol lives in the controller, not the connector.

The chart is the reference our controls engineers use when wiring VeriPak device networks: checkweighers, metal detectors, OneMotion drives and IO-Link sensors on one Allen-Bradley backbone.

Free, no login. Your inputs are saved in this browser. Values are engineering references — verify against manufacturer data and applicable codes before a final design.

Built by the engineers behind VeriPak packaging SCADA.

Engineering Toolbox
Loading toolbox

Questions engineers ask

What is the difference between A-coded, D-coded and X-coded M12 connectors?
The coding is the keyway that stops the wrong plug from mating. A-coded carries sensors, actuators, DeviceNet and IO-Link; D-coded is 4-pin 100 Mbit industrial Ethernet for PROFINET, EtherNet/IP and EtherCAT; X-coded is 8-pin gigabit Ethernet.
Which pins does IO-Link use on an M12 or M8 connector?
IO-Link uses the standard A-coded sensor pinout: pin 1 is L+ (24 V), pin 3 is L− (0 V) and pin 4 is C/Q, the communication line. Pin 2 is a second input or output on Class A ports; on Class B ports pins 2 and 5 carry the separate actuator supply.
Can the same M12 cable be used for PROFINET and EtherNet/IP?
Yes, for 100 Mbit links. Both use the same 4-pin D-coded pinout: pin 1 TX+, pin 2 RX+, pin 3 TX−, pin 4 RX−. The protocols differ in the controller and the device firmware, not in the connector or the cable.

Related tools

Everything in the toolbox