The Short Answer
A coding is the default M12 layout for anything that is not Ethernet, fieldbus or high-current power. The single key lets an A-coded plug mate only with an A-coded socket of the same pin count, so a sensor cable cannot be screwed onto an Ethernet or power port.
-
//
Pin counts 3, 4, 5, 8 and 12 pins; 4 and 5-pin are the most common.
-
//
4-pin pinout Pin 1 supply (brown), pin 2 signal (white), pin 3 0 V (blue), pin 4 signal (black).
-
//
Standard IEC 61076-2-101.
-
//
Typical uses Sensors, actuators, DC power, serial, USB and digital I/O.
A-Coded Connectors on Computers
Rugged and waterproof computers use A-coded M12 for their DC power input and for serial, USB and digital I/O ports, each with a pin count chosen for the signals it carries. Pin assignments for serial and USB are not fully standardised, so wire cables from the device datasheet. Our guide to M12 connectors compares every coding, and the M12 coding FAQ explains how coding works.