top of page
Search
protowoerk

What is the best way to generate manufacturer files? - Part I

EAGLE 101

In the first part of the post I will introduce you to automation capabilities of AutoDesk Eagle and show you what kind of tasks can you implement easily. This time we do not dive into the implementation, however you can find the proper ideas/steps to automate your boring task. In Part II we will check the implementation with some reference code.

I started a conversation at AutoDesk Forum to find out what is the best way to generate manufacturer files. Especially I was interested in AutoDesk EAGLE, because the problem that I was facing was in an EAGLE design.




Basically my problem was related to the manual process, that I was using, during the generation of the manufacture files. If we simplify follow the workflow in EAGLE, we can summarize something like that:

  1. Selecting components, building component library, drawing symbols / footprints, 3D models

  2. Implementing schematic design

  3. Implementing Layout design

  4. Design rule check

  5. Generating manufacturer files (gerber, BOM, pick'n'place, 3D step model ...etc)

So after you have the manufacturer files you can order your first prototype and you can start prototyping. Hurray!


Oh, how lovely, the end of a product cycle. Just when you thought you were done, bam! Suddenly, you realize that all your hard work was for nothing because there are design errors, malfunctioning boards, new features that need to be added, and components that need to be changed. And let's not forget about those pesky human errors that creep in when you have to modify the design repeatedly. It's like playing a never-ending game of whack-a-mole. And let's not forget the joy of trying to remember what you did weeks or even months ago when you generate something from the project again. Trust me, you'll love trying to keep track of all the changes, updating all the files, naming them correctly, clicking everything...oh, the memories! All while wasting precious time and money fixing the inevitable mistakes you'll make. Yay!


And there you have it, the basic topic that I, yes I, wanted to improve. Ta-da!



At AutoDesk's forum I got a response how can I solve my issues:

"To minimize the risk of human error and streamline the process, you may consider using a script or automation tool to handle the tasks you listed."


The secret to unlocking the full potential of electronic design automation: scripting. EAGLE, the shining star of the field, offers multiple ways to harness its power through scripting. Three options, to be exact.

  1. You can utilize the user language program scripts (EAGLE ULP),

  2. You can run commands on EAGLE through the built-in command line or bash,

  3. or go all-in with Python for ultimate control. It's like having the master key to the kingdom.

The wise decision to choose the third path, because why settle for anything less than complete control? Yes, I chose the path of ultimate control, granting myself the power to run the show with EAGLE ULP and commands. So to have a complete release of new files, I need the following functionality:

  • create specific folders for output files (01_BOM, 02_SCH, 03_MANUFACTURE, 04_DESIGN, 05_OTHER ...etc)

  • handle multiple variants of the design

  • generate schematics of the variants in PDF file

  • generate BOM and filter / rearrange the data (remove unnecessary attributes, remove parts such as SMD_SHORT_0403, REVISION5, TEST_POINTS, NMT ...etc)

  • generate documents from each layer into standalone PDF files

  • generate gerber and drill data

  • generate pick and place files for the selected variants of the design

  • run ERC and DRC and generate a log file

  • zip the design files

  • rename the files if necessary

  • copy the files to the proper folders

  • add build time stamp and version information

Python. This highly advanced tool provides you with bash-like functions, including the creation and copying of files and folders, as well as zipping capabilities. String manipulation is a walk in the park, debugging is a no-brainer, and with its run-time interpreter, compiling is a thing of the past. Not to mention, its vast library of modules and ease of integration with other languages make Python a powerhouse in the automation world. It's like having a personal automation genius at your fingertips.


The process was the following that I implemented in the python script:

  1. Get time stamp and use it in the name of a new folder

  2. Generate folder structure of the release

  3. Create an empty scr script which was feed later into the command line of EAGLE

  4. Generate commands into the scr script. Such as RUN some.ulp; print file ...etc

  5. Run EAGLE in foreground and execute scr script

  6. Process BOM file. Remove attributes, rearrange components ...etc

  7. Run EAGLE in background and execute commands for gerber generation for each variant

  8. Copy pick and place files from each CAM output

  9. Copy files to proper folder

  10. Zip design files

  11. Remove temporary files

After we implement these functions with standard python function calls, we will have a real powerful tool in our hand. No more manual file generation. No more errors. And the project will be much cleaner.


This is the end of the Part I. In Part II of the of this post, we will dive into the implementation of this script in python. We will explore some of interesting details. Stay tuned to learn more about this automation process.


Do you like the topic? Do you have question?

Just contact us and we can talk about more.

19 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page