cuprio

What is a pick-and-place file?

A pick-and-place file, also called a centroid, CPL, position or XY file, lists every part the assembly machine has to place: its reference designator, the X and Y position of its center, its rotation and which side of the board it goes on. Together with the bill of materials, which says what each designator is, it tells the assembler what goes where. It is generated from the PCB layout, never typed by hand.

  • 2 min read
  • 4 sections
  • 3 sources

What columns does a pick-and-place file need?

JLCPCB's assembly service asks for five fields: Designator (C1, R3, U2), Mid X and Mid Y for the part's centroid in millimeters, Layer (Top or Bottom) and Rotation in degrees, where positive values are counterclockwise. It accepts .csv, .xls or .xlsx. Other assemblers use similar fields with different header names, so a file exported from CAD often needs its headers matched to what the assembler's upload page expects.

The designators must match the BOM exactly. If the BOM lists C12 and the placement file calls it C12A, the part either goes unplaced or the order stops for a question.

How do you export a pick-and-place file from KiCad?

Use File, Fabrication Outputs, Component Placement (.pos, .gbr). The dialog offers plain text, CSV or Gerber X3 format, millimeters or inches, and several filters: include only SMD footprints, exclude footprints with through-hole pads, and exclude parts flagged Do Not Populate. Footprints with the 'Exclude from position files' attribute, such as logos or test points, never appear.

Two settings change the coordinates themselves. 'Use drill/place file origin' measures positions from the auxiliary origin you set on the board rather than the page corner, and an option negates X for bottom-side parts. You can also write one file for both sides or one per side. Check what your assembler wants before exporting.

Why are part rotations wrong in the assembler's preview?

Rotation is measured from each footprint's own zero orientation, and libraries do not all draw a given package the same way round. A footprint whose pin 1 starts at a different corner from the assembler's convention arrives rotated 90 or 180 degrees, which for a diode, LED, electrolytic capacitor or IC means a reversed part. The fix is to look at the assembler's placement render before paying, compare every polarized part with the board's silkscreen markings, and correct the rotation in the file or in the assembler's tool.

Common pick-and-place file mistakes

  • Including parts marked Do Not Populate, so they get placed anyway.
  • Mixing up units or origin, which shifts every part off its pads.
  • Bottom-side coordinates mirrored differently from what the assembler expects.
  • Through-hole parts left in a file meant for SMT only, or removed when the assembler also places them.
  • Exporting from an old revision of the layout so positions no longer match the Gerber files.

Sources

  1. JLCPCB: Pick & Place File for PCB Assembly

    CPL fields Designator, Mid X, Mid Y, Layer, Rotation, millimeters, positive counterclockwise, file types

    jlcpcb.com
  2. KiCad 9.0 documentation: PCB Editor, Fabrication outputs

    KiCad placement export formats, units, SMD and DNP filters, drill/place origin, bottom-side X, single or separate files

    docs.kicad.org
  3. JLCPCB: How to generate BOM and Centroid files from KiCad 8

    BOM and CPL fields expected from KiCad exports

    jlcpcb.com
Close view of the two-wheel robot controller, a board designed in Cuprio

Be first in when we open.

Start with 600 welcome credits and get 30% off your first 12 months.