|
M12 Connector Coding Explained: A, B, D & X-Coded Connector Reference
M12 Connector Coding Explained: A, B, D, and X-CodedM12 connector coding tells you which cordset works with sensors, power, fieldbus, or Ethernet. Matching the keyway prevents a mis-matched connection and, just as important, prevents you from putting network data or power on the wrong pins. Coding stops mismatingEach keyway physically blocks the wrong cordset from seating.
Match signal typeA-coded for sensors/power, D-coded for Cat5e Ethernet.
Pin count matters2, 3, 4, or 5 pole inserts for your device.
IP-rated for wetIP68/IP69 jackets survive washdown and oil when torqued fully.
Quick answer M12 connector coding is the keyway shape that decides what a connector mates with: A-coded for sensors, actuators and DC power; B-coded for PROFIBUS/fieldbus; D-coded for 100 Mbit Ethernet; X-coded for Gigabit Ethernet. All M12 share the same M12 x 1 thread, so coding, not thread size, is what determines mating. Match the code to your device first (the keys physically block a mismated connection), then pick pin count, wire gauge, and length. Which One Should You Buy?Find the row that matches your setup from our recommended picks:
How to ChooseStart with what the device expects. If it's a discrete sensor, actuator, or DC power point, you want an A-coded M12 with a single keyway (every Mencom MDC series connector is A-coded). Choose pin count by function: the MDC-2FP-2M (2 pole, 20 AWG) is for simple two-wire loads on pins 3 and 4; the MDC-3FP-2M (3 pole, 22 AWG) suits three-wire PNP/NPN sensors; the MDC-4FP-10M (4 pole, 22 AWG) covers four-wire sensors or dual-output devices at a longer 10 m reach. Need lower voltage drop on a longer three-wire run? Step up to the MDC-3FPX-2M with heavier 18 AWG conductors. All four carry the same 300 V rating and a 4 A per-contact rating (derate at elevated ambient; the 4 A figure assumes moderate temperature), with an IP69 yellow PVC jacket. For Industrial Ethernet (EtherNet/IP or PROFINET at 100 Mbit) coding changes entirely: use the D-coded Lumberg 900004221, a Cat5e bonded twisted-pair extension. Never try to force a D-coded plug into an A-coded socket; the keyways won't allow it, and forcing it damages both inserts. Our Recommended ProductsBelow are A-coded sensor/power cordsets in 2, 3, and 4 pole, plus a D-coded Ethernet extension. Pick by coding first, then pin count, gauge, and length. Mencom MDC-2FP-2M M12 Cordset, 2 Pole, Female Straight, 2 Meter
Mencom MDC-2FP-2M M12 Cordset, 2 Pole, Female Straight, 2 MeterBest for: Two-wire DC loads and simple actuators, short runView Current Price
View Product
Mencom MDC-3FP-2M M12 Cordset, 3 Pole, Female Straight, 2 M
Mencom MDC-3FP-2M M12 Cordset, 3 Pole, Female Straight, 2 MBest for: Standard three-wire PNP/NPN sensors, 2 mView Current Price
View Product
Mencom MDC-4FP-10M M12 Cordset, 4 Pole, Female Straight, 10 M
Mencom MDC-4FP-10M M12 Cordset, 4 Pole, Female Straight, 10 MBest for: Four-wire sensors or dual-output devices needing 10 m reachView Current Price
View Product
Mencom MDC-3FPX-2M M12 Cordset, 3 Pole, Female Straight, 18 AWG, 2 M
Mencom MDC-3FPX-2M M12 Cordset, 3 Pole, Female Straight, 18 AWG, 2 MBest for: Three-wire sensors on longer runs, heavier 18 AWG for lower dropView Current Price
View Product
Lumberg Automation 0985 806 127/10M Ethernet M12 Cordset, Male Right Angle / Female Straight, 4 Pin, 10 M
Lumberg Automation 0985 806 127/10M Ethernet M12 Cordset, Male Right Angle / Female Straight, 4 Pin, 10 MBest for: EtherNet/IP or PROFINET drops at 100 Mbit, D-coded Cat5e, IP68View Current Price
View Product
What A, B, D, and X coding actually meansM12 coding refers to the shape of the plastic insert and keyway inside the connector. It exists so you cannot accidentally plug a power cordset into a network port. The four codes you'll meet most:
The keys are mechanical. An A-coded plug physically will not seat in a D-coded socket. Every M12 shares the same M12 x 1 thread, so you cannot tell coding from the thread; identify your device's coding from its datasheet or the insert profile, then match the cordset. How to choose M12 pin count for sensors and powerOnce you've confirmed A-coding, pin count follows the wiring of your device:
Gauge matters on long runs. Voltage drop climbs with cable length and current and shrinks with larger wire, so for a three-wire sensor on a longer run, the MDC-3FPX-2M steps up to 18 AWG. Note the trade-off: heavier conductors mean a larger cable O.D. (0.29 in vs 0.20 in) and a stiffer bend, so allow room at the connector. Match the pinout in your sensor datasheet to the cordset's wiring color assignment before you order. A physical fit does not guarantee correct wiring. D-coded M12 Ethernet cordset wiring and useD-coded M12 is the workhorse connector for machine-level EtherNet/IP and PROFINET at 100 Mbit. It uses 4 pins on two bonded twisted pairs. The Lumberg 900004221 wires pin 1 white/orange, pin 2 white/green, pin 3 orange, pin 4 green (the standard Fast Ethernet pinout) over a teal TPE Cat5e cable, 24 AWG stranded tinned copper. This particular cordset is an extension: M12 male right-angle on one end, M12 female straight on the other, 10 meters, IP68. Use it to run a drop from an M12-ported switch or I/O block to a device without hand-terminating field connectors. Keep the run within the 100 m Ethernet channel limit including patch leads, and maintain shield/ground continuity per your network design to avoid noise on the pair. If your network is specified for Gigabit, you need an X-coded (8-pin) cordset instead. D-coded tops out at 100 Mbit. How to identify and mate M12 coding correctlyWork in this order every time:
Never force a connector. If it won't thread with light hand pressure, the coding or gender is wrong. M12 coding at a glance
Common Mistakes (and the Fix)✗ Ordering by thread size, assuming all M12 are the same ✓ All M12 share M12 x 1 threads. Check the coding and keyway, which is what actually determines mating. ✗ Using an A-coded cordset for an Industrial Ethernet drop ✓ Use a D-coded (100 Mbit) or X-coded (Gigabit) Ethernet cordset with the correct twisted-pair pinout and shielding. ✗ Picking the wrong pin count for a three- or four-wire sensor ✓ Count the active wires on the device datasheet and match 2, 3, or 4 pole accordingly. ✗ Running thin 22 AWG on a long sensor run and getting voltage drop ✓ Step to the 18 AWG MDC-3FPX cordset for lower drop on longer or higher-current circuits. ✗ Specifying a D-coded cordset for a Gigabit network ✓ D-coded is 100 Mbit only; use an 8-pin X-coded connector for Gigabit. ✗ Leaving the coupling nut loose and losing the IP seal ✓ Hand-tighten the coupling nut fully. IP68/IP69 ratings only hold when the nut is seated. ✗ Assuming a washdown-rated cordset is safe in a classified area ✓ IP69 is not hazardous-location rated. Use a Class/Division or ATEX/IECEx approved connector where required. Frequently Asked QuestionsWhat is the difference between A, B, D, and X-coded M12 connectors?Coding is the keyway pattern in the insert that determines what a connector mates with. A-coded handles sensors, actuators, and DC power. B-coded is for fieldbus signaling, most commonly PROFIBUS. D-coded carries 100 Mbit Fast Ethernet (Cat5e). X-coded carries Gigabit Ethernet (Cat6/Cat6a). The keys physically prevent plugging one coding into another. The thread (M12 x 1) is identical across all of them, so coding is what actually matters. Can I use an A-coded M12 cordset for Ethernet?No. Industrial Ethernet needs a D-coded (100 Mbit) or X-coded (Gigabit) connector with the correct twisted-pair pinout and shielding. The A-coded Mencom MDC cordsets here are built for sensor and DC power circuits, not network data — the pinout and cable construction are wrong for Ethernet. Use the D-coded Lumberg 900004221 for EtherNet/IP or PROFINET. How do I know if my sensor needs 3-pin or 4-pin M12?Count the active wires on the sensor. A two-wire loop uses 2-pole, a three-wire PNP/NPN sensor uses 3-pole, and a four-wire or dual-output device uses 4-pole. Always confirm against the sensor datasheet's connection diagram, and match the brown/blue/black/white color-to-pin assignment before ordering. Which M12 code is D-coded and which is X-coded?D-coded is a 4-pin Ethernet connector rated for Cat5e / 100 Mbit, like the Lumberg 900004221 here. X-coded is an 8-pin connector rated for Cat6a and up to 10 Gbit. If your device only lists Fast Ethernet, D-coded is correct; if it lists Gigabit, you need X-coded. What does the single keyway on the Mencom MDC cordsets mean?The single keyway is the A-coding feature. It aligns with the notch on A-coded devices so the connector seats and threads correctly, and it blocks D-coded or B-coded mates. It's the standard keying for sensor and DC power M12 connectors. Is a 3-pin or 4-pin M12 cordset compatible with Turck or Brad Harrison connectors?M12 is an international standard, so the MDC-3FP-2M and MDC-4FP-10M can be compatible with certain Turck Microfast M12 connectors and Brad Harrison/Molex parts (120065-0129 and 120065-0277 are cross-referenced). Compatibility depends on matching coding, pin count, and pinout. Always confirm those against the device datasheet before mating, since a physical fit does not guarantee a correct wiring match. What are the voltage and current ratings on these M12 cordsets?The Mencom MDC A-coded cordsets are rated 300 V and 4 A per contact, with gold-plated copper alloy contacts and IP69 yellow PVC. The D-coded Lumberg Ethernet cordset is rated 250 V, 4 A, IP68, Cat5e. The 4 A current rating assumes moderate ambient temperature. Derate at higher temperatures and never exceed the rated voltage or current. Are these M12 cordsets rated for hazardous locations?The listed ratings cover UL/CUL general-purpose use and IP68/IP69 ingress protection, not hazardous-location (Class/Division or ATEX/IECEx) service. If your application is a classified area, use a connector specifically approved for that classification and follow the applicable code. Do not assume a washdown-rated cordset is explosion-rated. Terms Worth Knowing
|