M12 A-Coded vs D-Coded Connectors: Definitions, Differences and Applications
This industry glossary explains what A-coded and D-coded mean, how the two connector types differ, and where each is typically used. Product examples are drawn from the surveyed KRONZ catalog dated November 1, 2026.
Core Terms
- M12 connector
- A circular industrial connector with an M12 threaded coupling. M12 describes the connector family and thread size; it does not, by itself, identify the pin count, electrical function or coding.
- Connector coding
- The internal arrangement of keys and grooves that controls which plug can mate with which socket. Coding helps prevent incompatible signal, power and network connections.
- A-code
- A general-purpose M12 coding widely used for sensor and actuator wiring, DC power and discrete switching signals. A-coded connectors are available with several pin counts.
- D-code
- A four-position M12 coding intended for Industrial Ethernet. Its contacts support two differential signal pairs for 10/100 Mbps communication.
- Pin count
- The number of electrical contacts in the connector. Pin count indicates how many conductors can pass through the interface, but it does not replace the coding designation.
- Cross-mating
- Connecting two interfaces intended for different functions. A-coded and D-coded M12 connectors cannot normally be cross-mated because their physical keyways differ.
What Are M12 A-Coded and D-Coded Connectors?
A-code and D-code belong to the M12 connector family covered by IEC 61076-2-101. They share the familiar M12 threaded format, but the mating faces are mechanically different.
M12 A-Code
A-code is the general-purpose coding for field-level signal and power connections. It is commonly found on inductive, photoelectric and ultrasonic sensors, solenoid valves, compact actuators and other devices that use supply conductors together with switching or analog signals.
Depending on the application, A-coded connectors may use different contact counts. The surveyed KRONZ product examples include 4-, 5- and 12-pin configurations, allowing the connector to serve anything from a simple sensor drop to a higher-density I/O connection.
M12 D-Code
D-code is a four-position coding for Industrial Ethernet. Its contacts are arranged for two differential pairs, conventionally used as transmit and receive pairs in 10/100 Mbps Ethernet connections.
A four-pin D-coded connector is not interchangeable with a four-pin A-coded connector. The shared pin count does not mean the connectors have the same keyway, wiring arrangement or application.
A-Code vs D-Code: Comparison Table
| Comparison | M12 A-Code | M12 D-Code |
|---|---|---|
| Primary purpose | Sensors, actuators, DC power and field signals | Industrial Ethernet |
| Common applications | Inductive sensors, photoelectric sensors, ultrasonic sensors, valves and compact actuators | PROFINET I/O modules, industrial switches, drives and controllers |
| Typical pin counts | 3, 4, 5, 8 or 12, depending on the device and product design | 4 positions |
| Signal arrangement | Supply conductors plus switching, analog or other device signals | Two differential Ethernet pairs |
| Communication rate | Application-specific field signals; not defined as an Ethernet interface | 10/100 Mbps |
| Power capability in surveyed examples | Up to 250 V and 4 A for the listed field-wireable 5-pin models | Used as a communication interface rather than a general-purpose power connector |
| Keyway | General-purpose A-coded mating geometry | Ethernet-oriented D-coded mating geometry |
| Cross-mating | Does not mate with a D-coded port | Does not mate with an A-coded port |
| Surveyed catalog examples | M1204F-5/P00K, H1205MA-7, H1205MA-9 and M1212FA-10/P00R | Two D-coded ports integrated into the GXPI-DI2DO12AI1/A module |
Where M12 A-Code Is Used
A-coded connections are widely used between field devices and remote I/O systems. Their main advantage is flexibility: different pin counts can accommodate simple sensor circuits, multi-signal devices or denser I/O requirements.
4-Pin A-Code: Standard Sensor Connections
The pre-assembled M1204F-5/P00K is a 4-pin A-coded connector supplied with a PVC cable in lengths from 1 to 15 meters. This format is suited to common sensor connections that combine device power with switching signals.
5-Pin A-Code: Power and Multiple Signals
The field-wireable angled H1205MA-7 and H1205MA-9 models are rated up to 250 V and 4 A. Their five contacts can carry supply and multiple signals through one connector, subject to the equipment's specified pin assignment and electrical limits.
12-Pin A-Code: Higher-Density I/O
The angled M1212FA-10/P00R provides 12 contacts in the M12 format. This type of connection is useful where several I/O conductors need to be routed through a compact interface.
Choose A-code when the device documentation specifies supply wires and field signals rather than an Ethernet physical interface. The exact pin count and wiring must still be checked against the device datasheet.
Where M12 D-Code Is Used
D-coded M12 connectors provide a rugged field interface for 10/100 Mbps Industrial Ethernet. Typical equipment includes PROFINET remote I/O modules, industrial Ethernet switches, drives and controllers.
The surveyed GXPI-DI2DO12AI1/A PROFINET I/O module includes:
- Two M12 D-coded Ethernet ports with an integrated switch, supporting line or daisy-chain network layouts without a separate switch at each node;
- 10/100 Mbps communication and a minimum cycle time of 1 ms;
- PROFINET Conformance Class B with real-time communication;
- 2 digital inputs, 12 digital outputs and 1 analog input;
- An IP67-rated enclosure for field installation.
Use D-code when the equipment datasheet explicitly identifies the port as M12 D-coded and specifies an Ethernet-based protocol such as PROFINET.
Practical Example: A-Code and D-Code on the Same Machine
Consider a packaging line with inductive sensors installed at its guard doors. Each sensor uses an A-coded cordset to carry device power and its switching output to an IP67 remote I/O module.
The remote I/O module then exchanges process data with the PLC through D-coded PROFINET ports. In this arrangement:
- A-code is used below the I/O module for sensor power and field signals;
- D-code is used above the I/O module for Industrial Ethernet communication.
Both interfaces use an M12 threaded format, but the different keyways prevent a technician from inserting the sensor connector into the Ethernet port. That mechanical incompatibility is an intentional protection feature, not a connector defect.
How to Select the Correct Coding
- Read the device datasheet. The word “M12” is not enough. Confirm the coding, pin count, voltage, current and pin assignment.
- Identify what the cable carries. Supply power and switching or analog field signals generally point to A-code. Ethernet frames point to D-code.
- Match the A-code pin count to the device. A simple sensor may use three or four contacts, while multi-signal and higher-density applications may require more.
- Expect four positions for D-code. A D-coded connector uses four contacts arranged as two Ethernet pairs.
- Check environmental requirements. Verify the required ingress protection, cable jacket, operating conditions and connector style for the installation.
- Confirm replacement parts by code letter. A-coded and D-coded connector bodies may look similar from the outside, but their mating faces are different.
Frequently Asked Questions
Can a 4-pin A-coded connector replace a 4-pin D-coded connector?
No. Although both have four contacts, their mechanical coding, contact arrangement and intended electrical functions differ. Their keyways are designed to prevent mating.
Does “M12” automatically mean a sensor connector?
No. M12 identifies the connector family and threaded coupling. M12 interfaces can serve sensors, actuators, power circuits and industrial networks, depending on their coding and pin configuration.
Is every A-coded connector rated for 250 V and 4 A?
No. The 250 V and 4 A values apply to the surveyed H1205MA-7 and H1205MA-9 examples. Ratings must be verified for each individual connector, cable assembly and application.
Is D-code used for Gigabit Ethernet?
D-code is associated with two-pair 10/100 Mbps Industrial Ethernet. For higher Ethernet data rates, consult the equipment specification to identify the required M12 coding and cable category.
Can A-code and D-code be used in the same control system?
Yes. A common architecture uses A-coded connections between sensors or actuators and a remote I/O module, while D-coded connections link that module to the Industrial Ethernet network.
Does a D-coded installation always require a shielded cable?
Cable and shielding requirements should be determined from the equipment documentation, network design and installation environment. The surveyed KRONZ catalog did not list a D-coded shielded cable, so no catalog-specific shielded cordset recommendation can be made here.
Conclusion
M12 A-code and D-code perform different jobs within the same circular connector family. A-code is the general choice for sensors, actuators, DC power and field signals, while D-code is intended for 10/100 Mbps Industrial Ethernet.
The selection process begins with the device protocol—not with the connector's external appearance. Once the required coding, pin count and electrical ratings are confirmed, the keyway provides mechanical protection against an incompatible connection.
Browse the KRONZ M12 product range for available A-coded signal connections and D-coded PROFINET equipment.
Next topic in this series: “Field-Wireable vs Molded M12 Connectors: Which Is Better for Your Project?”—a comparison of repairability, sealing, deployment speed and installation requirements.

