What a D-coded M12 connector is
An M12 D-coded connector is the 4-pin M12 coding for 10 and 100 Mbit/s Ethernet. It was the first M12 coding for Ethernet and is defined in IEC 61076-2-101. Four pins carry the two twisted pairs that 100BASE-TX needs, one pair to transmit and one to receive, inside a sealed, screw-locked housing.
That is enough for most sensors, drives, I/O and controllers, because industrial protocols send small, frequent messages rather than bulk data. It is not enough for Gigabit Ethernet, which needs all four pairs. The key position is unique to D coding, so a D-coded Ethernet cable cannot be fitted to an A-coded sensor port.
D-coded pinout
The pin assignment is fixed by the standard, and the PROFINET cable colours are widely used across other industrial Ethernet protocols too.
| M12 pin | Signal | PROFINET colour | RJ45 pin |
|---|---|---|---|
| 1 | TX+ (transmit data +) | Yellow | 1 |
| 2 | RX+ (receive data +) | White | 3 |
| 3 | TX− (transmit data −) | Orange | 2 |
| 4 | RX− (receive data −) | Blue | 6 |
| Shell | Shield | Braid and foil | Shield |
The pairs are 1 and 3, and 2 and 4, which is the detail most often wired wrong on a hand-made cable. Our M12 to RJ45 guide covers cables and adaptors for joining a D-coded port to a standard network.
Where D-coded Ethernet is used
D coding is still the most common M12 Ethernet connector on field devices, because those devices rarely need more than 100 Mbit/s.
-
//
PROFINET. PROFINET devices at IP65 and above use D-coded M12, with green-sheathed four-wire cable.
-
//
EtherNet/IP and EtherCAT. Both use D-coded M12 for sealed device connections on machines.
-
//
Rail vehicles. Many on-train networks and EN 50155 railway computers use D-coded ports for passenger information, CCTV and control.
-
//
Vehicles and mobile machines. Telematics, cameras and controllers that need a sealed 100 Mbit/s link.
-
//
Compact switches. Fast Ethernet M12 switches with D-coded ports link field devices back to the control cabinet.
Is 100 Mbit/s enough?
For control traffic, almost always. A PROFINET or EtherNet/IP device exchanges a few dozen to a few hundred bytes every cycle, typically every 1 to 10 ms, which uses a small fraction of a 100 Mbit/s link. Full-duplex operation means each direction gets the whole 100 Mbit/s, and the switch keeps devices from colliding.
Video is where the limit starts to matter. A compressed 1080p camera stream typically needs around 4 to 8 Mbit/s, so a D-coded port carries a handful of cameras comfortably, but a 4K camera, an uncompressed machine vision stream or a bulk log upload will fill it quickly. If a device will add cameras or send large files during its life, fitting X-coded Gigabit ports from the start avoids re-cabling later. The opposite also holds: there is no benefit in replacing working D-coded field wiring just to reach a computer that supports Gigabit, because a switch with both port types bridges the two.
Cable, distance and fitting
D-coded Ethernet follows the same distance rule as any 100BASE-TX link: up to 100 m per channel, including patch leads, on cable of Cat 5e class or better. Industrial cables are almost always shielded, because the link runs past motors, drives and welders, and the shield is carried through the metal coupling nut of the connector.
PROFINET defines three cable types that are a useful guide whatever the protocol. Type A is solid-core cable for fixed installation. Type B is stranded cable for occasional movement, such as a cabinet door. Type C is highly flexible cable for drag chains and robot arms. Choosing the wrong type is a common reason for intermittent faults that appear months after commissioning.
For on-site termination, field-attachable D-coded plugs with insulation-displacement contacts let an installer cut a cable to length and fit the connector without soldering. Tighten the coupling nut fully by hand, typically to around 0.4 to 0.6 Nm, so the seal is compressed, and fit caps to any spare ports so the enclosure keeps its IP rating.
D-coded or X-coded?
Choose D-coded where the network is 100 Mbit/s and the devices already use it. For Gigabit or faster links, including most modern computers and cameras, use X-coded M12 instead. The two codings do not mate, so a site that runs both needs the right cable for each port.
In practice the two often meet at a switch: D-coded ports facing the field devices and X-coded uplinks to the computer. Our M12 Ethernet switches include both Fast Ethernet models with D-coded ports and Gigabit models with X-coded ports. Our guide to M12 waterproof connectors explains the sealing and vibration benefits.
Quick answers on M12 D-coded connectors
M12 D-coded: common questions
How fast is D-coded M12?
Up to 100 Mbit/s. D coding carries 10BASE-T and 100BASE-TX Ethernet over two pairs. It cannot carry Gigabit Ethernet.
What is the D-coded M12 pinout?
Pins 1 and 3 transmit, pins 2 and 4 receive. Pin 1 is TX+, pin 2 RX+, pin 3 TX− and pin 4 RX−, with the shield on the coupling nut. The PROFINET colours are yellow, white, orange and blue.
Is D-coded M12 the same as PROFINET?
No, but they are linked. PROFINET is a protocol. D-coded M12 is the sealed connector most PROFINET devices use for it.
Can D-coded and X-coded M12 connect?
No. The keys and pin counts differ, so the connectors will not mate. Use a switch or a converter cable with the right ends.
What cable does D-coded M12 use?
Shielded two-pair Ethernet cable. Typically Cat 5e class, four-wire shielded cable, often with a green PROFINET sheath.
How long can a D-coded Ethernet cable be?
Up to 100 m. The standard 100BASE-TX limit applies to the whole channel, including any patch leads and couplers along the way.
We fit rugged, railway and vehicle computers with the D-coded or X-coded M12 Ethernet ports a network needs as standard, and we supply the matching cables before the system ships.