PortDock

Connector pinout reference

Pin numbers, signals and wire colours of common field connectors, with male/female front views and tables: DB9/DB25 RS-232, RJ45 T568A/B and Ethernet, Modbus RJ45/DB9 (spec), M12 A/D/X-coded, M8, USB-A/B/C and RS-485 terminal names. Sources included.

This page draws everything inside your browser; your choices are not sent to a server. The chosen connector lives only after the # in the address.

Click a pin in the drawing or a row in the table to highlight both.

What it shows

Pick a connector to see a front view and a pin table. D-subs (DB9, DB25) are drawn from the front for male (pins) and female (socket); RJ45 as the plug (contacts facing you) and the jack (front). From the solder side (rear) left and right swap.

Modbus RJ45 and DB9 pins are copied from the tables in «MODBUS over serial line V1.02» §3.5. Sensor wire colours follow the IEC 60947-5-2 convention — the sensor datasheet comes first. For round connectors such as M12 and M8, makers draw the face in different orientations, so a number list is shown instead of pin positions.

Save the drawing as SVG or print it with the table. To draw the whole wiring, use the wiring diagram maker; for start-up steps, the checklist maker.

Use with: Wiring diagram maker · System diagram editor · Commissioning and maintenance checklist

FAQ

Can I just connect a PC DB9 to a device DB9?

PC (DTE) to a DCE such as a modem is a 1:1 straight cable; DTE to DTE (PC to PC) is a null-modem cable with 2 and 3 crossed. Whether a device is DTE or DCE shows in its manual: is pin 2 an input or an output?

T568A or T568B?

Same performance. Only the green and orange pairs swap places, so pick one per site. Different schemes at the two ends make a crossover cable.

On RS-485, is A or B the + line?

The Modbus spec makes D1 (B) the higher line for binary 1 (OFF) and D0 (A) the lower. Some makers label A as + though, so letters alone cannot be trusted. If nothing answers, swap the two wires.

Why is there no M12 pin position drawing?

Makers draw male/female and front/rear in different orientations, so only numbers, signals and colours are listed to avoid drawing wrong positions. Check pin positions in the connector or sensor datasheet drawing.

For the cable behind the connector (Ethernet category, RS-485, RS-232 length), see the cable selection helper.