Running ASM 501/502/500 in Batch Mode

This web page illustrates how to use batch files to convert DXF to Gerber in De-embedding and standard polygon fill mode. The example below will show how to convert some of the layers in De-embedding mode and some in standard outline mode.

There are a few files that you will need to create. They include:
RSP file - This file includes the DXF to Gerber converter engine command line.
LST file - This file includes a list of DXF layers to be converted.
APT file - Aperture file.
BAT file - The actual batch file that executes the converter, and also converts the data to RS274X format.

Here is what in each one of the files:

1. Aperture file: GERBER.APT

APTUNITS mm
FORMAT 4.4
SUPPRESS LEADING
SUPPRESS CR
CIRCULAR off
GBR_END M02
LINK on
TEXT 7
LINE d10
MSCALE 1.0
ARCRES 9
REMOVE_HATCH on
FLOATZERO on
FONT C:\Program Files\AutoCAD 2008\Fonts\txt.shx
FONTDIR C:\Program Files\AutoCAD 2008\Fonts
CIRANG 360
ABSOLUTE on
REMOVE_DIM off
PEND 0
FLASH on
FTEXT 50
DEEMB 1
ARCSAG 0.0
MACFILE C:\junk\translations\iradium\gbrvu_work$0\rs274mac.0
TUNIT inch
D10 0.0250000 d Round 0.0250000 0.0250000
D11 0.0500000 d Round 0.0500000 0.0500000
D12 0.1000000 d Round 0.1000000 0.1000000
D13 0.2000000 d Round 0.2000000 0.2000000
D14 0.4000000 d Round 0.4000000 0.4000000
.
.
.
D33 0.0000000 d Poex 0.0000000 0.0000000
D34 0.0000000 d Poex 0.0000000 0.0000000

This aperture file should be used for the layers that need to be de-embed. The key settings parameter is DEEMB which sets the De-embedding feature to Without cutline. To turn off this feature, you would set this value to 0.

2. Resource file : Fill.RSP

"C:\junk\batch\9.40X6.45-M4M9U30.dxf" MM 0.002 "@C:\junk\batch\fill.LST" -explode -deemb -gbr 1.0 -z -nlnk -t1 -on33,33 
-c:0 "-cfg:C:\junk\batch\gerberd.apt"

The command line includes the DXF file name, the list file name with the layers to convert, the Outline on33,33 (polygon fill aperture), and the aperture file name.

3. List file : Fill.LST

"METAL_1" "C:\junk\batch\METAL_1.GBR"
"METAL_2" "C:\junk\batch\METAL_2.GBR"
"METAL_3" "C:\junk\batch\METAL_3.GBR"
"METAL_4" "C:\junk\batch\METAL_4.GBR"
"NPTH" "C:\junk\batch\NPTH.GBR"
"BOTTOM_SOLDERMASK" "C:\junk\batch\BOTTOM_SOLDERMASK.GBR"
"TOP_SOLDERMASK" "C:\junk\batch\TOP_SOLDERMASK.GBR"

In quotes you list the layer name in the DXF file and the output gerber file name for that layer.


Once these files are ready, you can create your batch file which may look like this:

"c:\WCAD\ASM500\DXF2GBR.EXE" "@C:\junk\batch\outline.rsp" 0
"c:\WCAD\ASM500\DXF2GBR.EXE" "@C:\junk\batch\fill.rsp" 0
"c:\WCAD\ASM500\DXF2GBR.EXE" "@C:\junk\batch\drill.rsp" 0
"C:\WCAD\ASM500\274hdr.exe" via_34.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" metal_1.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" metal_2.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" metal_3.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" metal_4.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" npth.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" top_soldermask.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" via_12.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" PACKAGE_OUTLINES.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" STRIP_OUTLINE.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000
"C:\WCAD\ASM500\274hdr.exe" bottom_soldermask.gbr "-cfg:C:\junk\batch\gerber.apt" -s:1.000

Each one of the first 3 lines on the batch file runs several layers, each one in different mode.
The first line runs the layers that only need to be outlined.
The second lines runs the layers that need to be de-embedded.
And the third lines runs the two via layers.
The 274hdr.exe reformats the output gerber files from RS274D to RS274X format.

At this point the Gerber files are ready and you can view them with our Gerber viewer.

Below is a link to a zip file which contains all the files you need for this example. Remember to run it in a directory called c:\junk\batch and we assume the software is in c:\wcad\asm500.

500_batch.zip

You can change the path in the files and put all the data in a directory of your choice..



ARTWORK CONVERSION SOFTWARE, INC.       Company Profile
417 Ingalls St., Santa Cruz, CA 95060    Tel (831) 426-6163     Fax 426-2824    email: info@artwork.com