SMT Programming: Offline Preparation and Online Debugging
SMT programming looks like data entry, but it is where the assembly process is actually defined. Every decision made here, about which component goes where, how it is oriented and how the machine recognises the board, determines whether the first article passes or the line stops. The work divides cleanly into offline preparation at a desk and online debugging at the machine.
Two Phases: Offline and Online
Offline preparation happens away from the line and involves assembling the data: the bill of materials, the placement coordinates and the component parameters. Done properly, it removes almost all of the guesswork from the machine. Done badly, it moves the mistakes to the line, where every minute of debugging costs throughput.
Online debugging is the commissioning phase. The prepared program is loaded, the board origin and fiducials are established, the placement positions are corrected, and a first article is run and confirmed. The details differ between machine brands and between factories, but the structure is the same everywhere.
Preparing the Bill of Materials
Everything begins with the bill of materials, usually abbreviated BOM, which must arrive in electronic form, usually a spreadsheet. Its purpose at this stage is not purchasing but placement: the machine needs to know which reference designator carries which part, so that the reel loaded at a feeder position is placed in the right location.
That means the BOM has to be clean. Duplicate reference designators, parts listed by description rather than by order code, and components that appear in the schematic but not the assembly drawing all cause confusion later. Reconciling it before programming is faster than reconciling it after a wrong part has been placed on a hundred boards.
Getting Placement Coordinates
Coordinates come from one of three places, depending on what the customer supplies. Where an exported coordinate file already exists, it can be merged directly with the bill of materials. Where only the design database is provided, the coordinates are exported from it in a suitable format. Where nothing but a bill of materials is available, the board has to be scanned and the positions captured manually, which is slower and more error prone.

The third route is worth avoiding where possible. Scanning introduces dimensional error, and manual capture introduces transcription error, so the resulting program should always be verified against the physical board before production rather than trusted on the strength of the file. The same reasoning applies to any coordinate set that was exported with a different origin convention from the machine expects. Footprint geometry and placement rules are discussed in placement order and pad positioning.
Merging and Checking the Data
Once both sources exist, they are merged on the reference designator. The merged file is then checked for missing positions and for duplicated ones, because a designator that appears twice will be placed twice, and a designator that appears nowhere is simply omitted without complaint.
Any discrepancy has to be resolved with the customer before the program is saved. This is the point at which an error is cheap: a query to the engineering department costs a few minutes, while the same error discovered after a production run costs a batch of boards and a scheduling problem. The merged file is then converted into the machine format the equipment actually reads.
Loading the Program and Setting the Origin
Online work starts by importing the program and establishing the board origin, which defines the coordinate system the placement positions refer to. If the origin is set inconsistently with the exported data, every component is offset by the same amount, which is easy to diagnose and easy to prevent.
Fiducial marks are then created or recognised. Fiducials give the machine a reliable datum on each individual board or panel, allowing it to compensate for the small positional variations that occur between units. Without them, placement accuracy depends on the mechanical repeatability of the conveyor and the fixture, which is rarely good enough for fine pitch work.
Fiducials and Step-by-Step Correction
With the origin and fiducials in place, the placement positions are corrected one by one against the physical board. This is the step that catches the accumulated small errors: a coordinate that is a fraction of a millimetre out will still place a large component acceptably but will fail on a fine pitch part.

The component data is then reviewed as well. Orientation is the most common source of error, particularly for polarised parts and for integrated circuits where the pin one marker must align with the footprint. Component height and nozzle selection are checked at the same time, since a wrong nozzle either fails to pick the part or damages it on release. Fiducial requirements are covered under stencil aperture and placement tolerance.
Optimisation, Verification and First Article
Once the data is correct, the program is optimised. The machine reorders placement to minimise head travel and feeder changes, which affects cycle time rather than correctness. Optimisation is saved only after the data has been verified, since re-optimising a correct program is trivial while debugging an optimised one is not.
The final step is the first article. One board is run and inspected against the assembly drawing, confirming that every component is present, correctly oriented and correctly positioned. Only then does volume production begin. Because the first article is the last inexpensive check available, it should be treated as a formal gate rather than a formality; the inspection sequence that supports it is described in SMT inspection methods and the limits of the process in SMT process window capability.
Keeping Programs Under Control
A placement program is production tooling, and it deserves the same discipline as a stencil or a test fixture. The file should carry a name and a revision that match the assembly revision it was built for, and it should be backed up somewhere other than the machine it runs on. Machines are replaced, controllers fail, and a program that exists only on a hard drive in the workshop is a single point of failure for a product.
Change control matters just as much. When an engineering change alters a component, a position or a polarity, the program has to be updated and the change recorded, rather than edited quietly at the machine. An unrecorded edit is difficult to reverse and impossible to audit, and it tends to resurface as an intermittent defect long after everyone has forgotten it happened.
Where several products run on the same line, consistent naming and a controlled folder structure turn program selection from a risk into a routine. The time invested in that structure is small, and it is repaid every time a product is re-run after an interval of months. It also makes the first article meaningful, because the operator can confirm that the program being run is the one the drawing describes.
FAQ
Why is a coordinate file preferred over scanning a board? A coordinate file comes directly from the design database and carries no measurement error. Scanning introduces dimensional and capture errors that then have to be found and corrected on the machine.
What happens if the bill of materials and the coordinates disagree? The merge produces either a missing or a duplicated placement. Both must be resolved with the customer before production, because neither is visible in the finished program as an obvious error.
Why are fiducials needed if the fixture is accurate? Because the fixture positions the panel, not each circuit on it. Fiducials let the machine measure where the individual board actually is, which is what makes fine pitch placement repeatable.



