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.
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
- AWG Wire Gauge & Ampacity Chart — THHN, XHHW, Voltage Drop
AWG to mm² wire gauge chart with copper ampacity and voltage drop for THHN, THWN and XHHW conductors.
- Panel Load & kW-to-Amps Calculator — Single & Three Phase
Free panel load and kW-to-amps calculator: supply amps from total watts at single- or three-phase voltage, with an equipment list that totals the load.
- Light Curtain Safety Distance Calculator (ISO 13855)
Free light curtain safety distance calculator per ISO 13855: S = K × T + C from stopping time, response time, and detection capability.
Everything in the toolbox
- Conveyor Belt Pull & Drive Calculator — Straight, Incline, L, Z, Radius & S
- UHMW Wearstrip Span Calculator — Deflection, Overhang & Creep
- MDR Motorized Drive Roller Selection Chart — Torque, Belt Pull, RPM
- Conveyor Speed & Throughput Calculator — FPM, Packages per Minute, Pitch
- Incline Conveyor Length & Angle Calculator — Straight, L and Z
- Conveyor Throughput Calculator — lb/hr to Packages per Minute and Belt Load
- Packaging Line Flow Simulator — Splits, Merges, Accumulation, Rejects
- Conveyor Motor & Gearbox Sizing Calculator — Torque, HP, Gear Ratio
- Modular Belt Drive Shaft Deflection & Twist Calculator — Square Shaft
- Accumulation Conveyor Length & Buffer Calculator
- Product Giveaway & Overfill Cost Calculator
- Packaging Line Downtime Cost Calculator — $/Minute, $/Shift
- Machine Guard Opening Distance Chart (ISO 13857) & PLr Reference
- Pneumatic Cylinder Force Calculator — Bore, Rod, PSI & Bar
- ISO 286 Hole & Shaft Fit Tolerance Calculator — H7, g6, k7, p6
- Bolt, Tap Drill & Clearance Hole Chart — Metric & Imperial
- Sheet Metal Gauge to Thickness Chart — Steel, Stainless, Aluminum
- Coefficient of Friction Table — Steel, UHMW, Rubber, Plastics
- NPT, BSPP & BSPT Pipe Thread Reference — Air Fittings
- Scientific Expression Calculator
- Area Calculator — Rectangles, Circles, Trapezoids