{"id":9168,"date":"2026-12-01T20:56:13","date_gmt":"2026-12-01T18:56:13","guid":{"rendered":"https:\/\/inteq.lt\/m12-jungciu-kodavimas-a-b-d-x-laidu-spalvos\/"},"modified":"2026-12-01T20:56:13","modified_gmt":"2026-12-01T18:56:13","slug":"m12-jungciu-kodavimas-a-b-d-x-laidu-spalvos","status":"publish","type":"post","link":"https:\/\/inteq.lt\/en\/m12-jungciu-kodavimas-a-b-d-x-laidu-spalvos\/","title":{"rendered":"M12 connector coding (A, B, D, X) and wire colours"},"content":{"rendered":"<p>M12 jungtys \u2013 standartas pramon\u0117s jutikliams, vo\u017etuvams ir tinklui. I\u0161 i\u0161or\u0117s jos atrodo vienodai: metalin\u0117 ver\u017el\u0117 su M12\u00d71 sriegiu. Bet viduje skiriasi <strong>kodavimas<\/strong> \u2013 i\u0161ky\u0161os ir kontakt\u0173 i\u0161d\u0117stymas, kuris neleid\u017eia sujungti netinkam\u0173 jung\u010di\u0173. Jei u\u017esakote kabel\u012f jutikliui ar kei\u010diate sugedus\u012f, pirmiausia reikia \u017einoti, koks kodas reikalingas. \u0160iame straipsnyje \u2013 k\u0105 rei\u0161kia raid\u0117s A, B, D, X ir kitos, bei kokios laid\u0173 spalvos b\u016bna jutikli\u0173 kabeliuose.<\/p>\n<h2>What is coding<\/h2>\n<p>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).<\/p>\n<h2>Comparison of codes<\/h2>\n<p>Data according to the Murrelektronik M12 coding overview (voltage and current \u2013 maximum per contact; always check the specific connector's data sheet for exact figures):<\/p>\n<table>\n<thead>\n<tr>\n<th>Code<\/th>\n<th>Purpose<\/th>\n<th>Contacts<\/th>\n<th>Voltage \/ current<\/th>\n<th>Data rate<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>A<\/strong><\/td>\n<td>Sensors, actuators, signals, IO-Link<\/td>\n<td>3, 4, 5, 8, 12, 17<\/td>\n<td>3\u20134 contacts: 250 V, 4 A; 5 contacts: 60 V, 4 A; 8 contacts: 30 V, 2 A<\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><strong>B<\/strong><\/td>\n<td>PROFIBUS fieldbus<\/td>\n<td>5<\/td>\n<td>60 V, 4 A<\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><strong>D<\/strong><\/td>\n<td>Industrial Ethernet (PROFINET, EtherNet\/IP and others)<\/td>\n<td>4<\/td>\n<td>60 V, 4 A<\/td>\n<td>100 Mbit\/s (CAT5e)<\/td>\n<\/tr>\n<tr>\n<td><strong>X<\/strong><\/td>\n<td>High-speed Ethernet, e.g. vision cameras<\/td>\n<td>8<\/td>\n<td>50 V AC \/ 60 V DC, 0.5 A<\/td>\n<td>10 Gbit\/s (CAT6A)<\/td>\n<\/tr>\n<tr>\n<td><strong>S \/ K<\/strong><\/td>\n<td>AC power supply (e.g. for motors)<\/td>\n<td>4 \/ 5<\/td>\n<td>630 V, 12 A<\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><strong>T \/ L<\/strong><\/td>\n<td>DC power supply (e.g. for 24 V modules)<\/td>\n<td>4 \/ 5<\/td>\n<td>63 V; T \u2013 12 A, L \u2013 16 A<\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><strong>Y<\/strong><\/td>\n<td>Data and power in one cable<\/td>\n<td>8<\/td>\n<td>50 V; signal 0.5 A, power 6 A<\/td>\n<td>100 Mbit\/s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In practice: <strong>almost all inductive, optical and other sensors with an M12 connector use A coding<\/strong> (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.<\/p>\n<h2>How to recognise the code<\/h2>\n<ol>\n<li><strong>Check the data sheet of the sensor or device<\/strong> \u2013 it states 'M12, A-coded', 'D-coded' etc.<\/li>\n<li><strong>Cable code<\/strong> manufacturers often use letters or numbers for the code and contact count \u2013 decode it using the manufacturer's catalogue.<\/li>\n<li><strong>Inspect the connector<\/strong> 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 \u2013 8 contacts separated by a cross-shaped divider.<\/li>\n<li><strong>Not sure?<\/strong> Photograph the connector from the front \u2013 it is easiest to identify from a picture.<\/li>\n<\/ol>\n<h2>Sensor cable wire colours (A code)<\/h2>\n<p>In standard sensor cables, the contacts and colours are usually as follows (e.g. in Beckhoff documentation):<\/p>\n<table>\n<thead>\n<tr>\n<th>Contact<\/th>\n<th>Wire colour<\/th>\n<th>Function (PNP \/ NPN sensor)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>brown (BN)<\/td>\n<td>+ supply (e.g. +24 V DC)<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>white (WH)<\/td>\n<td>second output (e.g. NC) or diagnostics<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>blue (BU)<\/td>\n<td>0 V<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>black (BK)<\/td>\n<td>output (signal; on an IO-Link sensor \u2013 C\/Q)<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>grey (GY)<\/td>\n<td>not used or function specified by the manufacturer<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A 3-wire cable usually has only brown, blue and black wires (contacts 1, 3, 4) \u2013 sufficient for a simple sensor with one output. If the sensor has two outputs (NO + NC), a 4-wire cable is required. <strong>Important:<\/strong> not all devices follow this scheme \u2013 always check the sensor and module data sheets before connecting. More about PNP and NPN \u2013 <a href=\"https:\/\/inteq.lt\/en\/jutiklio-pakeitimas-pnp-npn-m12\/\">how to replace a discontinued sensor<\/a>, about checking \u2013 <a href=\"https:\/\/inteq.lt\/en\/induktyvinio-jutiklio-patikra-multimetru\/\">how to test a sensor with a multimeter<\/a>.<\/p>\n<h2>How to choose a cable for a sensor<\/h2>\n<ul>\n<li><strong>Code and number of contacts<\/strong> \u2013 as in the sensor connector.<\/li>\n<li><strong>Socket or plug<\/strong> \u2013 the sensor usually has a plug (pin contacts), so the cable needs a socket (female).<\/li>\n<li><strong>Straight or angled connector<\/strong> \u2013 an angled one is useful when space is limited.<\/li>\n<li><strong>Sheath:<\/strong> PVC \u2013 for general use, PUR \u2013 when the cable moves (chains, robots) or is exposed to oil.<\/li>\n<li><strong>Length<\/strong> \u2013 2, 5 or 10 m; better slightly longer than too short.<\/li>\n<\/ul>\n<p>Examples: <a href=\"https:\/\/inteq.lt\/en\/product\/kabelis-su-jungtimi-m12-lizdas-tiesi-4-gyslos-5-m-pvc-turck-rkc4-4t-5-tel\/\">Turck RKC4.4T-5\/TEL<\/a> (straight, 4 wires, 5 m, PVC), <a href=\"https:\/\/inteq.lt\/en\/product\/kabelis-su-jungtimi-m12-lizdas-kampine-4-gyslos-5-m-pur-turck-wkc4-4t-5-txl\/\">Turck WKC4.4T-5\/TXL<\/a> (angled, 4 wires, PUR), <a href=\"https:\/\/inteq.lt\/en\/product\/kabelis-su-jungtimi-m12-lizdas-tiesi-3-gyslos-2-m-pvc-turck-rkc4t-2-tel\/\">Turck RKC4T-2\/TEL<\/a> (3 wires, 2 m), <a href=\"https:\/\/inteq.lt\/en\/product\/carlo-gavazzi-cone14nf-a5p\/\">Carlo Gavazzi CONE14NF-A5P<\/a>. If you prefer to assemble the cable yourself \u2013 field-wireable connectors with screw terminals, e.g. <a href=\"https:\/\/inteq.lt\/en\/product\/binder-99-0429-14-04\/\">binder 99 0429 14 04<\/a> (plug, 4 contacts) or <a href=\"https:\/\/inteq.lt\/en\/product\/binder-99-0436-19-05\/\">binder 99 0436 19 05<\/a> (5 contacts).<\/p>\n<p>When feeding the cable into a cabinet, a suitable cable gland is needed for sealing \u2013 see <a href=\"https:\/\/inteq.lt\/en\/kabelio-ivore-riebokslis-m-pg-parinkimas\/\">how to choose a cable gland<\/a>, o IP67 ar IP69K reik\u0161m\u0117s paai\u0161kintos <a href=\"https:\/\/inteq.lt\/en\/ip-apsaugos-klases-ip20-ip54-ip65-ip67-ip69k\/\">straipsnyje apie IP klases<\/a>. Jungtis b\u016bna sandari tik tada, kai ver\u017el\u0117 priver\u017eta iki galo.<\/p>\n<h2>How to find them on inteq.lt<\/h2>\n<p>M12 jungtis ir kabelius rasite kategorijoje <a href=\"https:\/\/inteq.lt\/en\/product-category\/pramones-automatika\/jungtys-ir-gnybtai\/\">Connectors and terminals<\/a>, jutiklius su M12 jungtimi \u2013 <a href=\"https:\/\/inteq.lt\/en\/product-category\/pramones-automatika\/jutikliai\/\">Sensors<\/a>. Turite sen\u0105 kabel\u012f ar jutikl\u012f? \u012eveskite jo kod\u0105 \u012f <a href=\"https:\/\/inteq.lt\/en\/paieska-pagal-koda\/\">search by code<\/a> arba \u012fkelkite \ud83d\udcf7 jungties nuotrauk\u0105 \u2013 parinksime tinkam\u0105 kabel\u012f ar analog\u0105. Reikia D ar X kodo jung\u010di\u0173, kuri\u0173 n\u0117ra kataloge \u2013 para\u0161ykite per <a href=\"https:\/\/inteq.lt\/en\/kontaktai\/\">u\u017eklausos form\u0105<\/a>, surasime i\u0161 daugiau nei 500,000 preki\u0173.<\/p>","protected":false},"excerpt":{"rendered":"<p>What the M12 connector codes A, B, D, X and power codes S, T, K, L mean: where they are used, how many contacts they have, what voltage they carry, and what the sensor cable wire colours are.<\/p>","protected":false},"author":1,"featured_media":9169,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2493],"tags":[],"class_list":["post-9168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pramones-automatika"],"_links":{"self":[{"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/posts\/9168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/comments?post=9168"}],"version-history":[{"count":0,"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/posts\/9168\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/media\/9169"}],"wp:attachment":[{"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/media?parent=9168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/categories?post=9168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inteq.lt\/en\/wp-json\/wp\/v2\/tags?post=9168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}