Home > Community > Forums > PCB SKILL > Automating Gerber Generation

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Automating Gerber Generation 

Last post Mon, Oct 20 2008 8:57 AM by vramanan. 8 replies.
Started by wERerABbiT 16 Oct 2008 01:09 AM. Topic has 8 replies and 5424 views
Page 1 of 1 (9 items)
Sort Posts:
  • Thu, Oct 16 2008 1:09 AM

    • wERerABbiT
    • Top 500 Contributor
    • Joined on Thu, Oct 16 2008
    • Petaling Jaya, Selangor
    • Posts 22
    • Points 425
    Automating Gerber Generation Reply

    Hi All,

    I would like to write a skill program to automate the gerber generation. May I know:-

    1) Are there any functions (skill or axl) that allows you to manually generate a certain gerber layer rather than using the MANUFACTURING -> ARTWORK dialog window?

    2) Are there any functions that allows you to import a predefined setup for the Artwork Layers? If not, any suggestion on how to do this in a skill program?

    Thanks All

     

     

     

    • Post Points: 35
  • Thu, Oct 16 2008 12:16 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: Automating Gerber Generation Reply

    Here is a function that I would use (if I didn't output ODB++ exclusively these days):

    defun( MY_GerberOutputs (filmNames)
     let((cmd)
      axlSaveDesign()
      sprintf(cmd, "artwork%s %s.brd", buildString(mapcar(lambda((f), strcat(" -f ", f)), filmNames)), axlCurrentDesign())
      axlRunBatchDBProgram("artwork", cmd)
    ))

    Cheers Dave

    Dave Elder, Tait Communications
    • Post Points: 5
  • Thu, Oct 16 2008 12:22 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: Automating Gerber Generation Reply

    For part 2 try using axlfcreate and axlDBCreateFilmRec (16.1)

    Dave Elder, Tait Communications
    • Post Points: 20
  • Thu, Oct 16 2008 4:50 PM

    • wERerABbiT
    • Top 500 Contributor
    • Joined on Thu, Oct 16 2008
    • Petaling Jaya, Selangor
    • Posts 22
    • Points 425
    Re: Automating Gerber Generation Reply

     Thanks Dave!! :D

    • Post Points: 20
  • Sat, Oct 18 2008 9:15 AM

    • vramanan
    • Top 100 Contributor
    • Joined on Fri, Oct 10 2008
    • sunnyvale, CA
    • Posts 66
    • Points 1,110
    Re: Automating Gerber Generation Reply

     Hi

    This command will do the trick if you put it in a script file

    system artwork $module 

     

    Here is another skill automation that will create a batch file to create the cad/valout/valext files

    It will also zip the  outputs in accordance to the part number requirement

    Your board file has to be saved with proper numbering pattern to have it work modify the code to suite your need

     (it will create one part number for assembly package and one for production, it also accounts for internal and external part)

     

    Or I can modify it if you give your part number need

     

    Filed under:
    • Post Points: 35
  • Sun, Oct 19 2008 6:13 PM

    • redwire
    • Top 10 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 875
    • Points 13,480
    Re: Automating Gerber Generation Reply

     Can you zip up your skill routine?  .il files are not recognized by the Cadence site. Imagine that. :)

    • Post Points: 5
  • Sun, Oct 19 2008 6:26 PM

    • wERerABbiT
    • Top 500 Contributor
    • Joined on Thu, Oct 16 2008
    • Petaling Jaya, Selangor
    • Posts 22
    • Points 425
    Re: Automating Gerber Generation Reply

    Thanks Vramanan!! :)

    Unfortunately I can't download the file. Please repost file. 

     

    • Post Points: 20
  • Sun, Oct 19 2008 11:11 PM

    • vramanan
    • Top 100 Contributor
    • Joined on Fri, Oct 10 2008
    • sunnyvale, CA
    • Posts 66
    • Points 1,110
    Re: Automating Gerber Generation Reply

    oops sorry

    Here is the zipped skill file

     

    Filed under:
    • Post Points: 5
  • Mon, Oct 20 2008 8:57 AM

    • vramanan
    • Top 100 Contributor
    • Joined on Fri, Oct 10 2008
    • sunnyvale, CA
    • Posts 66
    • Points 1,110
    Re: Automating Gerber Generation Reply
    These are the pre-requisites

    1.       The board name should be XXX-YYYY-ZZ_RVVV

    a.       The first XXX has 2 requirements one number for assembly rev and another for Fab

                                                                   i.      Ex 200 for PCB and 30X for assembly in this case

    b.      Also if it is 299 then it is internal and 200 if product

    2.       Pkzipc should be installed

    a.       You can install 7zip and modify the code

    3.       First generate all the gerbers/IPC/ODB/placement/NC-TAPE/NC-DRILL/Testprep before using scripts then run the fabout script

    a.       Look at example at the end

    4.       I use lot of batch commands to manipulate  zip file names and moving copying stuff

    a.       Change it to your requirement

    b. when you run the fabout it will create a t.bat examine its code to understand what it does, it is extensively commented

    setwindow pcb

    odb_out

    ipc356 out

    setwindow form.ipc356

    FORM ipc356 run

    FORM ipc356 close

    setwindow pcb

    plctxt out

    setwindow form.plctxt

    FORM plctxt body_center YES

    FORM plctxt filename ven_cntr.plc

    FORM plctxt execute

    FORM plctxt pin_1 YES

    FORM plctxt filename ven_pin1.plc

    FORM plctxt execute

    FORM plctxt cancel

    setwindow pcb

    setwindow pcb

    trapsize 44073

    reports "Component Pin Report" nographic write cpn.rpt

    ncdrill param

    setwindow form.nc_parameters

    FORM nc_parameters decimal_places 5

    FORM nc_parameters suppress_lead_zeroes YES

    FORM nc_parameters suppress_equal YES

    FORM nc_parameters done

    setwindow pcb

    nctape_full

    setwindow form.nc_drill

    FORM nc_drill tape_name nctape.drl

    FORM nc_drill scale 1.000

    FORM nc_drill separate_tapes YES

    FORM nc_drill auto_tool_select YES

    FORM nc_drill repeat_codes NO

    FORM nc_drill repeat_codes YES

    FORM nc_drill execute

    FORM nc_drill close

    setwindow pcb

     

    system artwork $module

    skill load "fabout.il"

    fabout
    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by wERerABbiT at 16 Oct 2008 01:09 AM. Topic has 8 replies.