IEC metric screw sized connectors
IEC metric screw sized connectors is a family of electrical connectors defined by IEC that are named according to their ISO metric screw thread, namely M5, M8 and M12. The number gives their outer screw thread diameter in millimeters as with the identically named screws. However, the connectors are further classified by a so-called coding, denoted by one or more letters, which defines things like pin layout, shape of connecting surfaces and electrical properties. The many types are partly to prevent incorrect connection. The larger connector sizes are the most varied, with designated connectors ranging from analog and digital signals to AC and DC power. Each "coding" has a different  keyway that prevents incorrect connection between incompatibly keyed connectors. Major uses include factory automation and transportation. Products can be designed for high weather and chemical resistance (high IP rating) as well as mechanical durability. Standard listing
 IEC 61076-2-101 M12 connectors with screw-locking: M12 A, B, C, D and P-coding
 IEC 61076-2-104 M8 connectors with screw-locking or snap-locking: M8 A and B-coding
 IEC 61076-2-105 M5 connectors with screw-locking: M5 (only A-coding defined)
 IEC 61076-2-109 M12 connectors with screw-locking for data transmission frequencies up to 500 MHz: M12 X and H-coding
 IEC 61076-2-111 M12 power connectors with screw-locking: M12 E, F, K, L, M, S, T-coding
 IEC 61076-2-113 M12 connectors with screw-locking, power and signal contacts for data transmission frequencies up to 100 MHz: M12 Y-coding
 IEC 61076-2-114 M8 connectors with screw-locking, power and signal contacts for data transmission frequencies up to 100 MHz: M8 D and P-coding
 IEC 61754-27 M12-FO (fiber optic)

Variants

References 

Electrical connectors