A ULP (User Language Program) is a feature designed into EAGLE to allow users to generate their own processes to automate tasks that would otherwise be tedious and time consuming. While most users know that this functionality exists, very few want to write their own script. A casual user would have to dump far more time learning the system and designing/testing their code than just completing the task at hand.
Many EAGLE users don't know that there are many ULPs that have been written by the pros at CadSoft waiting to be discovered. These are tried and true ways to get things done quickly without having to bother writing the ULP from scratch. So give the intern an interesting project to take on and start using tools! Note that this article is written based on EAGLE v7.1.
Mountsmd.ulp: Create a Component Placement List (CPL) for pick-and-place programming.
A heavily-used ULP, this takes what would be a very tedious task and automates it reliably. Any contract manufacturer will need to know where each component needs to be mounted and its rotation so they can program their pick-and-place machine. This ULP outputs 2 files: one describing top side SMD parts, and the other describing bottom side SMD parts. Note it doesn’t call out through-hole parts (but Mount.ulp does). You will also want to import the data into a spreadsheet and label each column. It is best to generate this anytime gerbers are generated to be sure it is accurate.
How to Use:
In the layout editor, click the ‘ULP’ button and select Mountsmd.ulp. Enter a path and filename, and a semicolon-separated-values document is created.
Ref Des | x (mm) | y (mm) | Rotation | Value | Package |
C5 | 12.23 | 14.56 | 0 | 10u | C0805 |
D1 | 16.01 | 14.54 | 180 | LED0603 | DIODE0603 |
Q1 | 5.32 | 20.95 | 180 | AO6604 | TSOP-6 |
Q2 | 5.32 | 15.87 | 180 | AO6604 | TSOP-6 |
Q3 | 5.32 | 10.79 | 180 | AO6604 | TSOP-6 |
Q6 | 24.25 | 9.39 | 90 | AO6604 | TSOP-6 |
Q7 | 24.25 | 14.47 | 90 | AO6604 | TSOP-6 |
Q8 | 24.25 | 19.55 | 90 | AO6604 | TSOP-6 |
Q9 | 11.7 | 24.7 | 0 | NTGS3443 | TSOP-6 |
R4 | 7.9 | 6.91 | 0 | 10k | R0603 |
R111 | 10.2 | 21.76 | 0 | 0 | R0603 |
R113 | 18.75 | 14.07 | 90 | 330 | R0603 |
U1 | 17.96 | 18.97 | 180 | MCP1702 | SOT23 |
U2 | 13.9 | 10.5 | 270 | G2X[0/1]1---PW14 | PW14 |
BOM.ULP: Generate a BOM based on component data
EAGLE is capable of maintaining manufacturer and part number for each part so the schematic can be the controlled document for manufacturing information. The BOM.ulp is there to output this data in a format that manufacturing can easily read.
How to Use:
In the schematic editor, click the ‘ULP’ button and select ‘bom.ulp’. Review for accuracy, and then save it in the desired format.
Normalize-text.ulp: Force all of the text on silkscreen layers to be of unified size and thickness.
Even among my component library there is wide variation on silkscreen text size. Reading the text reminds me of Craig Middlebrooks on the TV show ‘Parks and Recreation.’ It takes a lot of clicking to manually change the size, and I always miss one. Instead, this ULP takes care of it in one click. Although make sure you do this before placing the silkscreen text as they will need to be repositioned!
How to Use:
Determine the desired silkscreen text size and thickness. In the layout editor, click the ‘ULP’ button and select ‘normalize-text.ulp’. Enter your desired text size and thickness, and hit OK.
Exp-Lbr.ulp: Build a component library from a design.
As a consultant, I am always careful to keep each client’s design files separate. When a client wants the EAGLE library to be included when I send them documentation it would be inappropriate an unwieldy to give them libraries that may include components designed for other clients. This ULP is great for saving a library to accompany design documentation so another engineer can easily modify a component’s details without having to create it from scratch. I’ve used it before with great success!
How to Use:
This ULP has a nice shortcut found in File>Export>libraries
Statistic-brd.ulp: Details some standard stats about the board.
I’ve added this to my standard PCB review process. It takes about 30 seconds, but going through all of the board stats can have something stick out like a sore thumb. I’ve found myself saying, ‘I don’t remember creating a hole of that size’ or ‘There shouldn’t be a trace that fat in there’ which uncovered an error.
How to Use:
In the layout editor, click the ‘ULP’ button and select Statistic-brd.ulp. Click through the resulting data.
This short list of ULPs has saved me hours of work, but I still don’t trust them any more than I would a downloaded component library. Always be sure to double check anything they do, and never run a ULP after your review process has started. It’s never fun when an automated feature causes more errors than it saves!
Top Comments