10 June 2023
ELECBEE
8960

M12 Connector Types and Coding: How to Choose the Right Cable or Connector

Choose an M12 connector or cable by coding, contact count and what needs replacing. Compare cordsets, field-wireable connectors and panel receptacles.

To choose an M12 cable or connector, start with the part you need to replace.

  • Replace the whole cable if the jacket or molded end is damaged, or if you need a new cable run. Choose a double-ended cordset for two equipment ports, or a single-ended cable with wire leads for a terminal block.
  • Replace the cable-end connector if only a serviceable head has failed and the rest of the cable is sound. Check what wire sizes the terminals accept and what cable diameters the gland can seal around.
  • Replace the panel receptacle if the fixed port on the enclosure is damaged. Keep the specified mating face so it still accepts the correct cable end.
A silver locking ring secures a circular cable connector to a mounted industrial device.
Illustration of a screw-lock M12 connection at an industrial device.

For each mating point, record the equipment port and the connector that will mate with it. Check the coding, fitted contacts, pins or sockets, locking system, and contact assignments on the drawings. Then confirm that the part fits the installation and meets the circuit and environmental requirements. Follow the equipment's isolation procedure before disconnecting or replacing parts.

M12 Connector Coding Chart

Coding describes the keying at the mating face. Use the typical applications below to orient yourself, then confirm the exact port in the equipment documentation.

Code and face Typical use What to check
AA-coded male mating face with four numbered contacts and a rounded key recess.4 contacts Sensors, actuators and other device-specific circuits A comes in several contact arrangements. Check the contact count and each pin's function.
BB-coded male mating face with five numbered positions and a distinct lower key profile.5 positions PROFIBUS DP fieldbus Confirm the device's fieldbus interface. For PROFINET, look for the Ethernet port specified by the equipment.
DD-coded male mating face with four numbered contacts and a distinct key profile.4 contacts Two-pair industrial Ethernet Check the common link mode supported by the ports and the assembled cable.
XX-coded male mating face with eight numbered contacts separated into four groups by a cross shield.8 contacts Four-pair industrial Ethernet Check the actual cable wiring and channel rating. An X-coded end alone gives no link speed.
LL-coded male mating face with four numbered power contacts and a position marked FE.4 + FE DC power Verify voltage, current and contact assignment. Four-contact versions are available with or without an additional functional earth (FE) contact.

Example male faces, viewed from the contact side. Use the drawing for your exact connector to confirm contact numbers and functions.

Phoenix Contact drawings for A and D, B-coded, X-coded, and L-coded interfaces.

binder's coding guide shows typical uses. IEC 61076-2-109 covers X-coded data interfaces, and IEC 61076-2-111 covers M12 screw-locking power connectors. On Phoenix Contact 1420829, the FE contact has no protective function. Follow the equipment documentation for protective earth (PE).

For pair mapping and PoE between a D- or X-coded M12 port and RJ45, see the M12-to-RJ45 wiring guide.

Verify Both Interfaces Before Comparing Products

Treat coding, contact sex, fitted contacts, locking style, and pinout as five separate checks so a look-alike part does not slip into an order.

Record the Port and the Part You Are Ordering

The EB-400-8036 has an eight-contact X-coded male plug at each end. Use the equipment diagram to determine signal and power direction.

X-coded female receptacle with four pairs of sockets around a cross-shaped divider.
Equipment port AX-coded female
The two male X-coded connectors on Elecbee cable EB-400-8036.
Male-to-male cableX-coded at both ends
Equipment port BX-coded female
The same receptacle photo illustrates the two X-coded female ports. Check the lock and wiring at each end.

Count the Contacts and Check the Drawing View

Count fitted contacts on the actual mating face separately from empty cavities. Check whether the drawing shows the mating face or the termination side before comparing contact positions.

A-coded · 4 contacts male mating face. No center pin.A-coded · 4 contactsNo center pin
A-coded · 5 contacts male mating face. Fifth contact at the center.A-coded · 5 contactsFifth contact at the center
Four- and five-contact A-coded male faces. Phoenix Contact railway catalogue, p. 27

Can a 5-pin M12 cable replace a 4-pin cable?

Only if the exact A-coded plug and socket fit and the replacement carries every required circuit. Check both conditions.

  • Physical fit. Compare the mating drawings for center-pin clearance where applicable.
  • Circuit function. Compare the pin assignments and check how the equipment handles the fifth contact or conductor.

Matching counts can also hide different keying. Four-contact A and D ports have different mating faces, as do eight-contact A and X ports. If you are identifying an eight-contact port, compare the A- and X-coded eight-contact faces.

A cable can have different codes at opposite ends when its wiring and the equipment support the connection. For example, Phoenix Contact rates its four-position D-to-X cordset 1810635 for 100 Mbps. To order a mixed-end cable, specify both interfaces, the wiring and the common link mode.

Check the Locking System and M12 Pinout

Compare the locking mechanisms on both halves. IEC 61076-2-101 covers M12 screw-locking interfaces. IEC 61076-2-012 defines a specific pairing of an inner push-pull fixed female connector and a correspondingly coded male screw-locking free connector. For your parts, confirm the locking combination in their specifications.

To read an M12 pinout, identify the contact numbers in the stated drawing view. Then trace each required circuit from its device pin through the assembly to the other connector or terminal. Phoenix Contact's 1095969 drawing gives a numbered plug face and a separate pin-to-wire map for that part. Use the assembly drawing and the device wiring diagram together before connecting the leads.

Choose the Right Product Form: Cordset vs. Field-Wireable vs. Panel Receptacle

The parts below all have an A-coded four-contact female face. What they replace is different. Use the drawing for the exact part to confirm it fits your installation.

Factory-molded right-angle M12 cable end next to its free wire leads.
Preassembled cordsetRight-angle molded head and free wire leadsEB-400-2354
Field-wireable M12 socket insert and its separate black housing with cable entry.
Field-wireable connectorRemovable housing and cable entryEB-400-2316
Metal M12 panel receptacle showing its mating face, mounting nut, seal and prewired leads.
Panel receptaclePanel nut, seal and prewired leadsEB-400-2012

Preassembled Overmolded Cordset

Choose a factory-molded cordset for a complete run. A double-ended cordset arrives with both ends terminated. A single-ended version still needs its flying leads connected at the cabinet or device.

Choose a straight or right-angle outlet to suit the available space. For a right-angle head, check which way the outlet points with the key aligned. Allow room for the connector body and the cable bend. Confirm the usable length, shielding and ratings for the actual route and operating conditions.

Field-Wireable Connector

Choose a field-wireable connector when the existing cable run is intact and only the head failed, or when bulk cable must be pulled through conduit before on-site termination.

Check the conductor size at the terminal and the jacket outside diameter at the gland. Phoenix Contact's 1408991 datasheet lists these separately. Your chosen part needs to accept both, along with the required termination and shielding. Check the assembly and mating conditions that apply to its sealing rating.

Fixed Panel Receptacle (Bulkhead Mount)

Choose a fixed panel receptacle when the enclosure, junction-box, or cabinet port itself needs replacement, or when adding a new fixed port.

Separate the M12 mating thread from the panel cutout dimensions and mounting thread, confirm front vs. rear installation access and wall thickness, and verify internal termination (pigtail leads, PCB pins, or solder terminals). Remember that the replacement receptacle retains the required equipment-side mating face.

Find the Part in the Catalog

  • Browse M12 Series Connectors for field-wireable connectors and panel receptacles. Filter by Key, Number of Positions, Contact Type, Termination, and Mounting Type.
  • Browse M12 Series Cable Assemblies for overmolded cordsets and prewired assemblies. Use the separate first-end and second-end filters plus Cable Assembly Type.

A prewired panel receptacle can also appear under cable assemblies. Confirm the form from the exact part drawing and mounting details.


Worked Example: When a 2 m Cable Is Too Short

Suppose a machine has a documented A-coded four-contact male port with screw locking. Its replacement cable needs a female right-angle M12 connector at the machine and free leads at the cabinet terminal block. Measure along the tray and around the bends, then add the slack needed to service the equipment.

Machine port ACabinet terminals B
1.8 m routed path0.3 m service slack
Usable length needed
2.1 m
Nominal example cable
2.0 m
The EB-400-2354 is 0.1 m short if the supplier measures length between the same points.

When comparing longer cordsets, check where the right-angle outlet points when the key is aligned, how much space the body needs, and whether the first bend can clear the guard. At the cabinet end, confirm the conductor map and terminal preparation. If that end instead connects to a second equipment port, record its exact interface and look for a double-ended assembly with the required wiring.

If the damage is to the cabinet's female panel port itself, the order changes. The replacement retains the specified female port face for the existing male cable end. Use the panel drawing to check the cutout, mounting thread and access from the specified mounting side, and measure the short internal run to the terminal strip separately. The port opening, internal leads and mating face all have to match the installation.

M12 Connector and Cable Ordering Checklist

Fill in the applicable fields before ordering or requesting a quote.

Field Record
Equipment port A Model and port label, code, fitted contacts and empty positions, pins or sockets, locking system
Part to order at A For a cable or connector head, record the mating interface, compatible lock and outlet direction. For a panel receptacle, record the required port face, existing mating cable, cutout, mounting thread, fitting side and internal connection.
End B Record the second equipment interface and the cable end that mates with it. For free leads, record the destination, usable lead length and required termination.
Circuit and drawings Required operating voltage and current or protocol and link mode, pin-to-pin or pin-to-wire map, equipment drawing and assembly drawing revisions
Actual route Length including service slack, supplier measurement reference, connector clearance and bend radius
Cable fit and environment For a field-wireable head, record jacket diameter in mm and conductor size in AWG or mm². Specify shielding, motion, exposure and the required electrical and ingress ratings.
Part number Preassembled cordset, field-wireable connector or panel receptacle, with the selected SKU and its drawing revision