M12 connector coding (A, B, D, X) and wire colours
M12 jungtys – standartas pramonės jutikliams, vožtuvams ir tinklui. Iš išorės jos atrodo vienodai: metalinė veržlė su M12×1 sriegiu. Bet viduje skiriasi kodavimas – iškyšos ir kontaktų išdėstymas, kuris neleidžia sujungti netinkamų jungčių. Jei užsakote kabelį jutikliui ar keičiate sugedusį, pirmiausia reikia žinoti, koks kodas reikalingas. Šiame straipsnyje – ką reiškia raidės A, B, D, X ir kitos, bei kokios laidų spalvos būna jutiklių kabeliuose.
What is coding
Coding is a mechanical 'key': the connector insulator has a groove or key in a specific position. An A-coded plug will physically not fit into a D-coded socket. This prevents, for example, an Ethernet cable from being plugged into a sensor or power socket. Coding is defined by the standards IEC 61076-2-101 (A, B, C, D), IEC 61076-2-109 (X), IEC 61076-2-111 (power S, T, K, L) and IEC 61076-2-113 (Y).
Comparison of codes
Data according to the Murrelektronik M12 coding overview (voltage and current – maximum per contact; always check the specific connector's data sheet for exact figures):
| Code | Purpose | Contacts | Voltage / current | Data rate |
|---|---|---|---|---|
| A | Sensors, actuators, signals, IO-Link | 3, 4, 5, 8, 12, 17 | 3–4 contacts: 250 V, 4 A; 5 contacts: 60 V, 4 A; 8 contacts: 30 V, 2 A | – |
| B | PROFIBUS fieldbus | 5 | 60 V, 4 A | – |
| D | Industrial Ethernet (PROFINET, EtherNet/IP and others) | 4 | 60 V, 4 A | 100 Mbit/s (CAT5e) |
| X | High-speed Ethernet, e.g. vision cameras | 8 | 50 V AC / 60 V DC, 0.5 A | 10 Gbit/s (CAT6A) |
| S / K | AC power supply (e.g. for motors) | 4 / 5 | 630 V, 12 A | – |
| T / L | DC power supply (e.g. for 24 V modules) | 4 / 5 | 63 V; T – 12 A, L – 16 A | – |
| Y | Data and power in one cable | 8 | 50 V; signal 0.5 A, power 6 A | 100 Mbit/s |
In practice: almost all inductive, optical and other sensors with an M12 connector use A coding (usually 3- or 4-pin). D and X are for networks, S, T, K, L are for power. B coding is mostly found today in older PROFIBUS systems.
How to recognise the code
- Check the data sheet of the sensor or device – it states 'M12, A-coded', 'D-coded' etc.
- Cable code manufacturers often use letters or numbers for the code and contact count – decode it using the manufacturer's catalogue.
- Inspect the connector and compare it with the manufacturer's drawing: the groove position and contact layout differ for each code. The X code is the easiest to recognise – 8 contacts separated by a cross-shaped divider.
- Not sure? Photograph the connector from the front – it is easiest to identify from a picture.
Sensor cable wire colours (A code)
In standard sensor cables, the contacts and colours are usually as follows (e.g. in Beckhoff documentation):
| Contact | Wire colour | Function (PNP / NPN sensor) |
|---|---|---|
| 1 | brown (BN) | + supply (e.g. +24 V DC) |
| 2 | white (WH) | second output (e.g. NC) or diagnostics |
| 3 | blue (BU) | 0 V |
| 4 | black (BK) | output (signal; on an IO-Link sensor – C/Q) |
| 5 | grey (GY) | not used or function specified by the manufacturer |
A 3-wire cable usually has only brown, blue and black wires (contacts 1, 3, 4) – sufficient for a simple sensor with one output. If the sensor has two outputs (NO + NC), a 4-wire cable is required. Important: not all devices follow this scheme – always check the sensor and module data sheets before connecting. More about PNP and NPN – how to replace a discontinued sensor, about checking – how to test a sensor with a multimeter.
How to choose a cable for a sensor
- Code and number of contacts – as in the sensor connector.
- Socket or plug – the sensor usually has a plug (pin contacts), so the cable needs a socket (female).
- Straight or angled connector – an angled one is useful when space is limited.
- Sheath: PVC – for general use, PUR – when the cable moves (chains, robots) or is exposed to oil.
- Length – 2, 5 or 10 m; better slightly longer than too short.
Examples: Turck RKC4.4T-5/TEL (straight, 4 wires, 5 m, PVC), Turck WKC4.4T-5/TXL (angled, 4 wires, PUR), Turck RKC4T-2/TEL (3 wires, 2 m), Carlo Gavazzi CONE14NF-A5P. If you prefer to assemble the cable yourself – field-wireable connectors with screw terminals, e.g. binder 99 0429 14 04 (plug, 4 contacts) or binder 99 0436 19 05 (5 contacts).
When feeding the cable into a cabinet, a suitable cable gland is needed for sealing – see how to choose a cable gland, o IP67 ar IP69K reikšmės paaiškintos straipsnyje apie IP klases. Jungtis būna sandari tik tada, kai veržlė priveržta iki galo.
How to find them on inteq.lt
M12 jungtis ir kabelius rasite kategorijoje Connectors and terminals, jutiklius su M12 jungtimi – Sensors. Turite seną kabelį ar jutiklį? Įveskite jo kodą į search by code arba įkelkite 📷 jungties nuotrauką – parinksime tinkamą kabelį ar analogą. Reikia D ar X kodo jungčių, kurių nėra kataloge – parašykite per užklausos formą, surasime iš daugiau nei 500,000 prekių.
