blog

Blog Details

Created with Pixso. Home Created with Pixso. Blog Created with Pixso.

M12 Connector Coding Explained: A Code, B Code, D Code and X Code

M12 Connector Coding Explained: A Code, B Code, D Code and X Code

2026-11-23

M12 Connector Coding Explained: A-Code, B-Code, D-Code and X-Code

An M12 connector code is the mechanical keying arrangement that determines which plug can mate with which socket. In common industrial applications, A-code is used for sensors, actuators and general signals; B-code is associated with fieldbus wiring; D-code supports 100 Mbps Industrial Ethernet; and X-code supports higher-speed Ethernet, including Gigabit applications. Because the keyways differ, connectors with incompatible codes cannot normally be mated.

This coding system is one of the first details to check when reading an M12 drawing or selecting a cable assembly. The thread diameter may look the same, but the code, pin count and electrical function can be very different. This glossary-style guide explains the four codes and connects them with examples from the surveyed KRONZ catalog.

What Is M12 Connector Coding?

M12 connector coding refers to the arrangement of keys and grooves inside an M12 circular connector interface. These mechanical features control plug-and-socket compatibility and help separate interfaces intended for different electrical functions.

M12 connector interfaces are covered by the IEC 61076-2 series, including IEC 61076-2-101 for commonly used M12 circular connectors. Different interface types and transmission applications may be addressed by different parts of the series.

Why coding matters

  1. It helps prevent mis-mating. An A-coded sensor cable is not intended to connect to a D-coded Ethernet port. Their keyways do not align.
  2. It identifies the connector’s intended role. The code provides an immediate indication of whether an interface is generally intended for signals, fieldbus, Ethernet or power.
  3. It supports signal integrity. Ethernet codes use contact arrangements suited to defined data-pair geometries, while other codes are arranged for signal or power distribution.
  4. It reduces maintenance errors. On machines with many similar-looking circular connectors, mechanical coding helps technicians avoid connecting the wrong cable during installation or replacement.
Important: Do not identify an M12 connector by thread size or coupling nut alone. Always confirm the code, pin count, gender, orientation and pin assignment in the product drawing or datasheet.

M12 Coding at a Glance

Code Typical application Common pin count Typical data capability KRONZ catalog status or example
A-code Sensors, actuators, general signals and DC power 3, 4, 5, 8 or 12 Application-dependent; not primarily an Ethernet coding M1204F-5/P00K, H1205MA-7 / H1205MA-9, M1212FA-10/P00R
B-code Fieldbus wiring, commonly associated with PROFIBUS Often 5 Depends on the specified fieldbus No M12 B-coded connector is currently listed in the surveyed catalog
D-code Industrial Ethernet, including 100 Mbps PROFINET applications 4 Up to 100 Mbps GXPI-DI2DO12AI1/A with two M12 D-coded ports
X-code High-speed Industrial Ethernet 8 Gigabit Ethernet and up to 10 Gbps in suitable systems No X-coded product is currently listed in the surveyed catalog

A-Code: The Standard Choice for Sensors and Actuators

A-code is the most widely encountered M12 coding in conventional sensor and actuator wiring. It is commonly used for discrete signals, analog signals, low-voltage DC power and compact I/O connections.

A-code is available with several contact counts. The correct pin count depends on the device wiring rather than the code alone. A 3-wire proximity sensor, a multi-output device and a high-density I/O connection may all use A-coded interfaces while requiring different numbers of contacts.

KRONZ A-coded examples

  • 4-pin A-code: The pre-assembled M1204F-5/P00K is offered with a PVC cable in lengths from 1 to 15 m. The full-metal H1204MAV-0 is a field-assembled option for on-site termination.
  • 5-pin A-code: The field-wireable H1205MA-7 / H1205MA-9 is rated at 4 A and up to 250 V, and accepts external cable diameters from 4 to 8 mm. Pre-assembled straight versions are also represented in the range.
  • 12-pin A-code: The angled M1212FA-10/P00R provides a higher-density interface for carrying multiple signals through one connector.
  • A-coded distribution accessory: The YM4-2F4/Y14A is a 4-pin Y-distributor with one male and two female A-coded interfaces.
Selection shortcut: A-code is often the starting point for standard inductive, photoelectric and ultrasonic sensors. However, “often” does not mean “always.” Confirm the code and pin assignment on the device datasheet before ordering.

B-Code: Fieldbus-Oriented Mechanical Keying

B-code is an M12 coding associated with fieldbus communication, particularly PROFIBUS installations. It is commonly found in 5-pin configurations and uses a key position that differs from A-code, preventing an A-coded signal or power connection from being inserted into the B-coded bus interface.

The surveyed KRONZ catalog does not currently list an M12 B-coded connector. It does include the pre-assembled M0805BM-2/POOR, which is a straight, 5-pin, B-coded M8 connector with PVC cable. This product illustrates the use of B-type keying, but it must not be treated as a substitute for an M12 B-coded connector because M8 and M12 are different physical interface sizes.

For an M12 B-code requirement, the connector must be selected according to the fieldbus architecture, mating interface, pin assignment and cable specification. Availability should be confirmed with the supplier before the bill of materials is finalized.

D-Code: 100 Mbps Industrial Ethernet

D-code is a 4-pin M12 Ethernet coding commonly used for 10/100 Mbps industrial networks, including PROFINET applications. Its four contacts carry two data pairs: one transmit pair and one receive pair in a typical 100BASE-TX implementation.

The KRONZ catalog provides a practical example in the GXPI-DI2DO12AI1/A PROFINET I/O module. Its listed features include:

  • Two M12 D-coded Ethernet ports
  • Integrated switch
  • 10/100 Mbps communication
  • Minimum cycle time of 1 ms
  • PROFINET Conformance Class B
  • 2 digital inputs, 12 digital outputs and 1 analog input
  • IP67-rated construction

An A-coded cable cannot replace a D-coded Ethernet cable simply because both use an M12 coupling system. The different keyways prevent mating, while the required contact arrangement and cable construction also differ.

X-Code: Gigabit and Higher-Speed Ethernet

X-code is an 8-contact M12 coding developed for high-speed Industrial Ethernet. It uses four data pairs, with shielding geometry that separates the pairs to help control crosstalk and maintain transmission performance.

X-coded systems can support Gigabit Ethernet and, when the complete channel is designed and rated accordingly, data rates up to 10 Gbps. Typical use cases include machine vision, industrial cameras and high-bandwidth automation networks.

The surveyed KRONZ catalog does not currently list an X-coded product. Where an application specifies X-code, confirm all of the following before approving the BOM:

  • The mating connector is explicitly identified as M12 X-coded
  • The cable assembly is rated for the required Ethernet category and transmission speed
  • The shielding design is suitable for the installation environment
  • The pin assignment and gender match the equipment port
  • The required ingress-protection rating applies when the connector is fully mated
D-code and X-code are not interchangeable. D-code typically uses four contacts for two data pairs and 100 Mbps communication. X-code uses eight contacts for four data pairs and higher-speed Ethernet. Their mechanical keyways are also different.

Related M12 Power Codes in the KRONZ Range

Although A-, B-, D- and X-code are the focus of this guide, they are not the only M12 coding options. The KRONZ pre-molded connector range also includes T-code, S-code, L-code and K-code, which are used for power-oriented connections.

Power code Rated current Rated voltage Listed cable specification
T-code 12 A 63 VDC 4 × 1.5 mm² (4 × 16 AWG), black PVC
S-code 12 A 630 VAC 5 × 1.5 mm² (5 × 16 AWG), black PVC
L-code 12 A 63 VDC 4 × 1.5 mm² (4 × 16 AWG), black PVC
K-code 12 A 630 VAC 5 × 1.5 mm² (5 × 16 AWG), black PVC

These power codes have distinct keying arrangements and must be matched with the corresponding equipment interface. A current or voltage rating alone is not enough to establish compatibility.

How to Select the Correct M12 Code

  1. Start with the equipment port. Read the code designation from the device drawing, datasheet or port marking.
  2. Identify the application. Determine whether the connection carries sensor signals, fieldbus communication, Ethernet data or power.
  3. Confirm the pin count. Connectors with the same code can have different contact counts. Code and pin count are separate selection criteria.
  4. Check the pin assignment. Two connectors may mechanically mate but still be electrically incompatible if their wiring differs.
  5. Verify electrical and data ratings. Review voltage, current, data rate, cable type and shielding requirements.
  6. Check the physical format. Confirm male or female, straight or angled, field-wireable or pre-molded, and panel-mount or cable-mount construction.
  7. Review environmental protection. Select the required IP rating, temperature range and housing material for the installation.

Common M12 Coding Mistakes

  • Assuming all M12 connectors mate: the M12 thread does not override the internal keying.
  • Using pin count as the code: “4-pin M12” does not automatically mean A-code or D-code.
  • Confusing M8 B-code with M12 B-code: the coding concept may be similar, but the connector sizes cannot mate.
  • Using D-code for a Gigabit port: D-code is normally used for 100 Mbps Ethernet; X-code is the relevant high-speed option.
  • Checking only the connector: the cable construction, shielding and pin assignment must also suit the application.
  • Forgetting the mating condition: an IP rating generally depends on correct assembly and full mating with a compatible counterpart.

Frequently Asked Questions

Can an A-coded M12 connector plug into a D-coded port?

No. A-code and D-code use different keying arrangements, so their mating interfaces are mechanically incompatible.

Are all 4-pin M12 connectors the same?

No. A-coded and D-coded connectors can both have four contacts, but they have different key positions and are intended for different applications. Pin count alone does not determine compatibility.

What is the main difference between D-code and X-code?

D-code normally uses four contacts arranged as two data pairs for 10/100 Mbps Industrial Ethernet. X-code uses eight contacts arranged as four data pairs for Gigabit and higher-speed Ethernet applications.

Does KRONZ currently offer M12 B-coded connectors?

No M12 B-coded connector is listed in the surveyed catalog. A 5-pin B-coded M8 model, M0805BM-2/POOR, is listed, but it is not physically interchangeable with an M12 connector.

Does KRONZ currently list X-coded M12 products?

No X-coded product is listed in the surveyed KRONZ catalog. Availability should be confirmed with the supplier for projects that require X-code.

Is A-code always the correct choice for a sensor?

A-code is common for industrial sensors and actuators, but the device documentation remains the authority. Always verify the code, contact count and pin assignment before ordering.

Conclusion

M12 coding is a mechanical compatibility system with direct electrical and operational consequences. As a practical reference:

  • A-code: sensors, actuators, general signals and DC power
  • B-code: fieldbus wiring, commonly associated with PROFIBUS
  • D-code: 4-pin Industrial Ethernet at up to 100 Mbps
  • X-code: 8-contact Gigabit and higher-speed Industrial Ethernet

Once the code has been confirmed, continue with the pin count, pin assignment, gender, orientation, termination method, cable type and environmental rating. Browse the KRONZ product range for available A-coded signal connectors, D-coded PROFINET equipment and power-coded pre-molded connectors. M12 B-code and X-code requirements should be confirmed directly with the supplier because these products are not currently listed in the surveyed catalog.

Next topic: M12 coding determines which type of interface can mate, while pin configuration determines how many conductors or signals the connector can carry. The next guide, “M12 Connector Pin Configuration: 3 Pin, 4 Pin, 5 Pin, 8 Pin and 12 Pin,” explains how common contact counts relate to industrial wiring applications.

banner
Blog Details
Created with Pixso. Home Created with Pixso. Blog Created with Pixso.

M12 Connector Coding Explained: A Code, B Code, D Code and X Code

M12 Connector Coding Explained: A Code, B Code, D Code and X Code

2026-11-23

M12 Connector Coding Explained: A-Code, B-Code, D-Code and X-Code

An M12 connector code is the mechanical keying arrangement that determines which plug can mate with which socket. In common industrial applications, A-code is used for sensors, actuators and general signals; B-code is associated with fieldbus wiring; D-code supports 100 Mbps Industrial Ethernet; and X-code supports higher-speed Ethernet, including Gigabit applications. Because the keyways differ, connectors with incompatible codes cannot normally be mated.

This coding system is one of the first details to check when reading an M12 drawing or selecting a cable assembly. The thread diameter may look the same, but the code, pin count and electrical function can be very different. This glossary-style guide explains the four codes and connects them with examples from the surveyed KRONZ catalog.

What Is M12 Connector Coding?

M12 connector coding refers to the arrangement of keys and grooves inside an M12 circular connector interface. These mechanical features control plug-and-socket compatibility and help separate interfaces intended for different electrical functions.

M12 connector interfaces are covered by the IEC 61076-2 series, including IEC 61076-2-101 for commonly used M12 circular connectors. Different interface types and transmission applications may be addressed by different parts of the series.

Why coding matters

  1. It helps prevent mis-mating. An A-coded sensor cable is not intended to connect to a D-coded Ethernet port. Their keyways do not align.
  2. It identifies the connector’s intended role. The code provides an immediate indication of whether an interface is generally intended for signals, fieldbus, Ethernet or power.
  3. It supports signal integrity. Ethernet codes use contact arrangements suited to defined data-pair geometries, while other codes are arranged for signal or power distribution.
  4. It reduces maintenance errors. On machines with many similar-looking circular connectors, mechanical coding helps technicians avoid connecting the wrong cable during installation or replacement.
Important: Do not identify an M12 connector by thread size or coupling nut alone. Always confirm the code, pin count, gender, orientation and pin assignment in the product drawing or datasheet.

M12 Coding at a Glance

Code Typical application Common pin count Typical data capability KRONZ catalog status or example
A-code Sensors, actuators, general signals and DC power 3, 4, 5, 8 or 12 Application-dependent; not primarily an Ethernet coding M1204F-5/P00K, H1205MA-7 / H1205MA-9, M1212FA-10/P00R
B-code Fieldbus wiring, commonly associated with PROFIBUS Often 5 Depends on the specified fieldbus No M12 B-coded connector is currently listed in the surveyed catalog
D-code Industrial Ethernet, including 100 Mbps PROFINET applications 4 Up to 100 Mbps GXPI-DI2DO12AI1/A with two M12 D-coded ports
X-code High-speed Industrial Ethernet 8 Gigabit Ethernet and up to 10 Gbps in suitable systems No X-coded product is currently listed in the surveyed catalog

A-Code: The Standard Choice for Sensors and Actuators

A-code is the most widely encountered M12 coding in conventional sensor and actuator wiring. It is commonly used for discrete signals, analog signals, low-voltage DC power and compact I/O connections.

A-code is available with several contact counts. The correct pin count depends on the device wiring rather than the code alone. A 3-wire proximity sensor, a multi-output device and a high-density I/O connection may all use A-coded interfaces while requiring different numbers of contacts.

KRONZ A-coded examples

  • 4-pin A-code: The pre-assembled M1204F-5/P00K is offered with a PVC cable in lengths from 1 to 15 m. The full-metal H1204MAV-0 is a field-assembled option for on-site termination.
  • 5-pin A-code: The field-wireable H1205MA-7 / H1205MA-9 is rated at 4 A and up to 250 V, and accepts external cable diameters from 4 to 8 mm. Pre-assembled straight versions are also represented in the range.
  • 12-pin A-code: The angled M1212FA-10/P00R provides a higher-density interface for carrying multiple signals through one connector.
  • A-coded distribution accessory: The YM4-2F4/Y14A is a 4-pin Y-distributor with one male and two female A-coded interfaces.
Selection shortcut: A-code is often the starting point for standard inductive, photoelectric and ultrasonic sensors. However, “often” does not mean “always.” Confirm the code and pin assignment on the device datasheet before ordering.

B-Code: Fieldbus-Oriented Mechanical Keying

B-code is an M12 coding associated with fieldbus communication, particularly PROFIBUS installations. It is commonly found in 5-pin configurations and uses a key position that differs from A-code, preventing an A-coded signal or power connection from being inserted into the B-coded bus interface.

The surveyed KRONZ catalog does not currently list an M12 B-coded connector. It does include the pre-assembled M0805BM-2/POOR, which is a straight, 5-pin, B-coded M8 connector with PVC cable. This product illustrates the use of B-type keying, but it must not be treated as a substitute for an M12 B-coded connector because M8 and M12 are different physical interface sizes.

For an M12 B-code requirement, the connector must be selected according to the fieldbus architecture, mating interface, pin assignment and cable specification. Availability should be confirmed with the supplier before the bill of materials is finalized.

D-Code: 100 Mbps Industrial Ethernet

D-code is a 4-pin M12 Ethernet coding commonly used for 10/100 Mbps industrial networks, including PROFINET applications. Its four contacts carry two data pairs: one transmit pair and one receive pair in a typical 100BASE-TX implementation.

The KRONZ catalog provides a practical example in the GXPI-DI2DO12AI1/A PROFINET I/O module. Its listed features include:

  • Two M12 D-coded Ethernet ports
  • Integrated switch
  • 10/100 Mbps communication
  • Minimum cycle time of 1 ms
  • PROFINET Conformance Class B
  • 2 digital inputs, 12 digital outputs and 1 analog input
  • IP67-rated construction

An A-coded cable cannot replace a D-coded Ethernet cable simply because both use an M12 coupling system. The different keyways prevent mating, while the required contact arrangement and cable construction also differ.

X-Code: Gigabit and Higher-Speed Ethernet

X-code is an 8-contact M12 coding developed for high-speed Industrial Ethernet. It uses four data pairs, with shielding geometry that separates the pairs to help control crosstalk and maintain transmission performance.

X-coded systems can support Gigabit Ethernet and, when the complete channel is designed and rated accordingly, data rates up to 10 Gbps. Typical use cases include machine vision, industrial cameras and high-bandwidth automation networks.

The surveyed KRONZ catalog does not currently list an X-coded product. Where an application specifies X-code, confirm all of the following before approving the BOM:

  • The mating connector is explicitly identified as M12 X-coded
  • The cable assembly is rated for the required Ethernet category and transmission speed
  • The shielding design is suitable for the installation environment
  • The pin assignment and gender match the equipment port
  • The required ingress-protection rating applies when the connector is fully mated
D-code and X-code are not interchangeable. D-code typically uses four contacts for two data pairs and 100 Mbps communication. X-code uses eight contacts for four data pairs and higher-speed Ethernet. Their mechanical keyways are also different.

Related M12 Power Codes in the KRONZ Range

Although A-, B-, D- and X-code are the focus of this guide, they are not the only M12 coding options. The KRONZ pre-molded connector range also includes T-code, S-code, L-code and K-code, which are used for power-oriented connections.

Power code Rated current Rated voltage Listed cable specification
T-code 12 A 63 VDC 4 × 1.5 mm² (4 × 16 AWG), black PVC
S-code 12 A 630 VAC 5 × 1.5 mm² (5 × 16 AWG), black PVC
L-code 12 A 63 VDC 4 × 1.5 mm² (4 × 16 AWG), black PVC
K-code 12 A 630 VAC 5 × 1.5 mm² (5 × 16 AWG), black PVC

These power codes have distinct keying arrangements and must be matched with the corresponding equipment interface. A current or voltage rating alone is not enough to establish compatibility.

How to Select the Correct M12 Code

  1. Start with the equipment port. Read the code designation from the device drawing, datasheet or port marking.
  2. Identify the application. Determine whether the connection carries sensor signals, fieldbus communication, Ethernet data or power.
  3. Confirm the pin count. Connectors with the same code can have different contact counts. Code and pin count are separate selection criteria.
  4. Check the pin assignment. Two connectors may mechanically mate but still be electrically incompatible if their wiring differs.
  5. Verify electrical and data ratings. Review voltage, current, data rate, cable type and shielding requirements.
  6. Check the physical format. Confirm male or female, straight or angled, field-wireable or pre-molded, and panel-mount or cable-mount construction.
  7. Review environmental protection. Select the required IP rating, temperature range and housing material for the installation.

Common M12 Coding Mistakes

  • Assuming all M12 connectors mate: the M12 thread does not override the internal keying.
  • Using pin count as the code: “4-pin M12” does not automatically mean A-code or D-code.
  • Confusing M8 B-code with M12 B-code: the coding concept may be similar, but the connector sizes cannot mate.
  • Using D-code for a Gigabit port: D-code is normally used for 100 Mbps Ethernet; X-code is the relevant high-speed option.
  • Checking only the connector: the cable construction, shielding and pin assignment must also suit the application.
  • Forgetting the mating condition: an IP rating generally depends on correct assembly and full mating with a compatible counterpart.

Frequently Asked Questions

Can an A-coded M12 connector plug into a D-coded port?

No. A-code and D-code use different keying arrangements, so their mating interfaces are mechanically incompatible.

Are all 4-pin M12 connectors the same?

No. A-coded and D-coded connectors can both have four contacts, but they have different key positions and are intended for different applications. Pin count alone does not determine compatibility.

What is the main difference between D-code and X-code?

D-code normally uses four contacts arranged as two data pairs for 10/100 Mbps Industrial Ethernet. X-code uses eight contacts arranged as four data pairs for Gigabit and higher-speed Ethernet applications.

Does KRONZ currently offer M12 B-coded connectors?

No M12 B-coded connector is listed in the surveyed catalog. A 5-pin B-coded M8 model, M0805BM-2/POOR, is listed, but it is not physically interchangeable with an M12 connector.

Does KRONZ currently list X-coded M12 products?

No X-coded product is listed in the surveyed KRONZ catalog. Availability should be confirmed with the supplier for projects that require X-code.

Is A-code always the correct choice for a sensor?

A-code is common for industrial sensors and actuators, but the device documentation remains the authority. Always verify the code, contact count and pin assignment before ordering.

Conclusion

M12 coding is a mechanical compatibility system with direct electrical and operational consequences. As a practical reference:

  • A-code: sensors, actuators, general signals and DC power
  • B-code: fieldbus wiring, commonly associated with PROFIBUS
  • D-code: 4-pin Industrial Ethernet at up to 100 Mbps
  • X-code: 8-contact Gigabit and higher-speed Industrial Ethernet

Once the code has been confirmed, continue with the pin count, pin assignment, gender, orientation, termination method, cable type and environmental rating. Browse the KRONZ product range for available A-coded signal connectors, D-coded PROFINET equipment and power-coded pre-molded connectors. M12 B-code and X-code requirements should be confirmed directly with the supplier because these products are not currently listed in the surveyed catalog.

Next topic: M12 coding determines which type of interface can mate, while pin configuration determines how many conductors or signals the connector can carry. The next guide, “M12 Connector Pin Configuration: 3 Pin, 4 Pin, 5 Pin, 8 Pin and 12 Pin,” explains how common contact counts relate to industrial wiring applications.