Automating the "back end" - Page 1
Forum section: electronics / general

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: June 24, 2015, 01:58:23 am
content: I call "back end" everything you need to do once the PCB DRCs and unconnected nets are 0.I have created a set of Windows batch files that automate everything I need in Cadence.However I find that at 300 lines in 6 files it's getting unwieldy due to the nature of batch files. I saw that Cadence is pushing Tcl/Tk but I looked at one sample file and was repulsed by the verbose and tedious code for the simplest things.I simply need to get some input from a user, run a few executables, check error levels, launch a few programs like a gerber viewer, zip and copy files and email the engineers. Maybe something with a better GUI than a command line spewing mountains of text.I'm thinking Powershell. What do you use? In what direction should I go?

author: timofonic
author_rank: Frequent Contributor
timestamp: June 24, 2015, 08:07:34 am
content: Quote from: Alex Eisenhut on June 24, 2015, 01:58:23 amHello.I'm a newbie and never used a Cadence product and probably never will (extremely expensive is one of the main reasons), but I was curious about what is a "back end".Just for curiosity, can you please elaborate about that concept? I'm still learning electronics basic fundamentals and still too bad at EDA, but I'm insanely curious about the concepts.I don't want to hijack your forum thread, just do a concise reply if you want to reply me or use a PM.Regards.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: June 24, 2015, 12:57:51 pm
content: Quote from: Circuiteromalaguito on June 24, 2015, 08:07:34 amIt's all the boringtediousrepetitivestuff you do when your layout is finished but you need to create all the output files. I just save my board file, launch the script and in 15 seconds it's all done.Very simply, Allegro has a dozen small executables that do various input and output tasks. Even besides the scripts, if an RF engineer sends me a feature to import, I use DXF2A to create a part symbol automatically. As long as I get a DXF in the same format, it works very well and MUCH faster than messing around with the GUI.My scripts generate all the output gerbers and drill files, there can be several drill files depending on the board; blind and buried vias, laser drills, back drills.Then it outputs the assembly drawing, the fab drawing, the mechanical drawing in gerber, dxf and PDF formats. Gotta keep everyone happy.Placement files, netlists, ODB++, all the possible junk you could want, then if someone asks for it, it's already all there, no need to panic a Friday afternoon "how do I create a IPC netlist again?" If they don't need it, they ignore it."3D" data in Solidworks compatible format.Zip up all the files into archives, one for fabricating the board, one for assembling, others for internal company database.Launch a gerber viewer, I use Pentalogix Viewmate. You can launch it with a zip file as an argument and it will attempt to import the files in the zip. I *always* check my stuff in another viewer; it stuns the brain into paying more attention when it's a different program. I'm at a level where PCB design happens in my brain stem, I don't even pay attention anymore.Then it launches a solidworks viewer with the 3D files.Finally it sends an email to whoever wants to know.Still insanely curious? See how boring this is?Batch files are really very simplistic but tricky. For example, my script asks who to send the email to or if you want to start the viewers, etc and just using CHOICE instead of SET /P leads to a different way of checking for a variable's content.But what do you do if you want to send an email to more than one person? Run the script twice? Ugh.I'd like a simple GUI with some select buttons and big happy START button, maybe some hilarious animations of a analog meter to show the progress.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: June 27, 2015, 07:55:01 pm
content: So everyone is satisfied with how their EDA suite handles output or is happy with doing it manually?

author: nctnico
author_rank: Super Contributor
timestamp: June 27, 2015, 09:13:44 pm
content: I just create the gerbers, pick & place file and a BOM. All 3 are one click actions. Zipping them is just a matter of selecting the files and click 'compress'. Automating that isn't improving things much especially since projects can a have different layers or even a mechanical drawing.

author: free_electron
author_rank: Super Contributor
timestamp: June 27, 2015, 10:10:51 pm
content: Quote from: Alex Eisenhut on June 27, 2015, 07:55:01 pmyep. piece of cake. i juse an outjob file i made years ago. it creates odb , gebrer ncdrill pdf files dxf file step files , the whole blabla. it even drops it in the right folders with the right names.easy to do in altium

author: Karel
author_rank: Super Contributor
timestamp: June 28, 2015, 08:32:49 am
content: Quote from: Alex Eisenhut on June 24, 2015, 01:58:23 amWith Eagle, this is a breeze. I'm amazed that this is so troublesome with Cadence...Quote from: Alex Eisenhut on June 24, 2015, 01:58:23 amBash shell is the way to go. Does Cadence provide Linux binaries?

author: Christopher
author_rank: Frequent Contributor
timestamp: June 28, 2015, 11:41:58 am
content: I have one of these scripts. Wrote it to automate the whole schebang just as you have.It was taking me literally an hour to produce everything from Eagle at work. Now I can do it with the press of a button and ensure consistency! No one else has caught on yet, so I can have another tea break or two in the meantimeI have mine all in a python script as I don't need the GUI.. If I did need a GUI i'd go for C#

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: June 28, 2015, 01:58:38 pm
content: Quote from: Karel on June 28, 2015, 08:32:49 amWhat is a breeze? Does Eagle zip up stuff and email people right out of the box?

author: Karel
author_rank: Super Contributor
timestamp: June 28, 2015, 04:42:24 pm
content: Quote from: Christopher on June 28, 2015, 11:41:58 amI guess you aren't familiar with the cam processor in Eagle? That is actually two mouse clicks to generate/export all files.The only exception is 3d-data, that needs another two mouseclicks.

author: Christopher
author_rank: Frequent Contributor
timestamp: June 28, 2015, 07:28:13 pm
content: I also have as part of my script a CAM job which makes gerber data of the assembly layers I have selected and puts everything in a zip file readt to send to the manu. And generate a CSV BOM in the format I like all in one click.

author: Jeroen3
author_rank: Super Contributor
timestamp: June 29, 2015, 09:37:52 am
content: For ultiboard I used an AutoHotkey script. It has the worst output file generator ever made by mankind.Is asks you how and where to save each file, every time. And since it often has render bugs, you'll always end up doing it a more than a few times, before accepting the results in gerbv.

author: nctnico
author_rank: Super Contributor
timestamp: June 29, 2015, 08:47:07 pm
content: Who uses Ultiboard these days

author: LukeW
author_rank: Frequent Contributor
timestamp: July 02, 2015, 07:45:55 pm
content: Using Eagle, I do it withmake, personally.Code:# Project name = directory name.PROJECT_NAME=$${PWD\#\#*/}# eagle must be installed and must be in path.# On Mac OSX we will create a link to the Eagle binary:# sudo ln -s /Applications/EAGLE/EAGLE.app/Contents/MacOS/EAGLE /usr/bin/eagle.SILENT: all gerbers git github cleanall : gerbers git github.PHONY: gerbersgerbers :mkdir -p gerbersmkdir -p tempfor f in `ls *.s#* *.b#* 2> /dev/null`; do mv $$f ./temp/; doneecho "Generating Gerber files..."eagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GTL $(PROJECT_NAME).brd Top Pads Vias Dimension > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GBL $(PROJECT_NAME).brd Bottom Pads Vias > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GTO $(PROJECT_NAME).brd tPlace tNames > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GTP $(PROJECT_NAME).brd tCream > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GBO $(PROJECT_NAME).brd bPlace > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GTS $(PROJECT_NAME).brd tStop > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GBS $(PROJECT_NAME).brd bStop > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GML $(PROJECT_NAME).brd Milling > /dev/nulleagle -X -d GERBER_RS274X -o ./gerbers/$(PROJECT_NAME).GKO $(PROJECT_NAME).brd Dimension > /dev/nulleagle -X -d EXCELLON -o ./gerbers/$(PROJECT_NAME).TXT $(PROJECT_NAME).brd Drills Holes > /dev/nullzip $(PROJECT_NAME)-gerbers ./gerbers/*.*