# Wiring and cable diagram Cable documentation is fiddly and error-prone by hand, and WireViz was built for exactly this: describe connectors, wires and connections in text, and get a correct harness drawing with a bill of materials. Because it is generated, the diagram and the pinout cannot disagree. --- ## When to reach for one * Harness and loom documentation for hardware products. * Field service documentation where the pinout is the instruction. * Test rigs and lab setups that somebody else will have to rebuild. --- ## How to draw it in Capable | **Route** | **Use when** | | --------- | ---------------------------------------------------------- | | WireViz | Generated harness drawings with pinouts and a parts list. | | draw.io | Simple point-to-point wiring where generation is overkill. | --- ## A worked example A three-wire harness with a real pinout: ![Wiring and cable diagram](https://help.gocapable.com/images/att1418461374.svg) The source, which you can paste into a new diagram and edit: ``` connectors: X1: type: D-Sub subtype: female pinlabels: [DCD, RX, TX, GND] X2: type: Molex KK 254 subtype: female pinlabels: [VCC, RX, TX, GND] cables: W1: gauge: 24 AWG length: 0.3 colors: [WH, BN, GN] connections: - - X1: [2,3,4] - W1: [1,2,3] - X2: [2,3,4] ``` --- ## A few things that catch people out * Wire colours in the diagram must match the wire colours in the box. Generate from one source. * Include gauge and length; they are the two facts a person building it needs. * Pin numbering direction matters. Say whether you are looking at the front or the rear of the connector. --- ## Related [Digital timing diagramWaveforms, clocks and bus transitions.](https://help.gocapable.com/diagrams/digital-timing-diagram.html) [HDL block diagramComponent symbols generated from your HDL.](https://help.gocapable.com/diagrams/hdl-block-diagram.html) [ExamplesWorking diagrams you can copy.](https://help.gocapable.com/diagrams/examples.html) --- _Approximately right is wrong here._