WMBatch/WMLib can be controlled via an ASCII command file. The command file contains directives recognized by the application to perform parsing, conversion, manipulation and writing of various wafer map formats. This document describes the available keywords supported and the syntax for controlling WMBatch/WMLib.
WMBatch can execute a batch command file using the command line argument
wmbatch64.exe -command_file:<filename>
Comments
Comments can be made to annotate commands in the command file. Comments are recognized by placing a # character as the first non-whitespace character on a line.
Use of Quotation Marks
Command parameters should be enclosed inside double quotes when they contain whitespace, such as long file names, bin descriptions, etc. For example, a directory path with spaces.
"C:\Users\Steve DiB\Map Files\Jan 30, 2021"
This might also be needed for Bin Code descriptions such as "No Test"
Defining Input Directory
Defines a common input directory so that all subsequent input file names are to be opened from the defined input directory. Only unqualified input file names will be opened from the input directory. Fully qualified path names for input files will override this command.
input_dir "E:\users\stevedb\My Maps\EMCC"
Defining Output Directory
Defines a common output directory so that all subsequent output file names are to be saved in the defined output directory. Only unqualified output file names will be saved to the output directory. Fully qualified path names for output files will override this command.
output_dir "E:\users\stevedb\My Maps\Die Attach 1"
Open a Wafer Map with Format
This directive tells the program to open a particular wafer map file; it is necessary to also identify the wafer map's format.
open "<input_file>" format <format>The format string must match one that WMBatch supports and which is also licensed for import. You can see what formats are possible by using on the command line the directive -formats. You can see what formats are licensed for use by using the command line argument -licenses.
open "c:\user\Steve DB\Map Files\Sep 29, 2020\A5004210.txt" format E5-1296
If the input directory was defined in an earlier command, then one could use just the file name i.e.
input_dir "c:\user\Steve DB\Map Files\"
open A5004210.txt format E5-1296
Select Wafer
A number of map formats can contain multiple wafer maps internal to the file. In that case, the user may wish to select only a specific wafer to convert. The directive to do this is:
wafer select [<wafer_number>|all]
wafer select 01
All susbsequent directives will apply to the specified wafer. e.g.
If you don't use this command then the default is to apply directives to all the maps in the map file.
Convert Formats
This command tells the program to convert the output database of WMLib to the specified format. Note that the WMLib input database is read only. Both databases are maintained to support certain conversion features, such as bin mapping.
convert format <format>
Example
Say you want to produce an E5-1296 output map file. Use the command:
convert format E5-1296
Defining Bin Code Format
Many map formats support several different bin code formats. In general WMBatch support the following bin code types:
ASCII - ASCII characters including special characters.
DECIMAL - 3 digit decimals ranging from 000 to 255.
HEXADECIMAL - two digit HEXADECIMAL characters: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F; so two digits combined range from 00 to FF
So in order to control both the output format and the bin code format one can use the syntax:
convert format SINF DECIMAL-3
or
convert format SINF HEXADECIMAL-2
Please note that not every map format supports all of the possible bin formats. For example SINF supports HEXADECIMAL and DECIMAL but does not support ASCII. So requesting an output of SINF ASCII-1
would result in an error. The same applies to binary formats. There is no need to specify a bin type when writing to a binary format such as UF3000, or SECS-EG
Save Wafer Map
This command saves the output database to the specified file using its current wafer map format.
save "<output_file>"
Examples
a) if you wish to re-used the original file name but with a different suffix you can do this:
save <FILE>.txt
b) if you wish specify the complete name yourself:
save "map_0002.txt"
c) if you wish to override the output directory (as defined using the output_dir directive) you can use a full path:
save "E:\Xcalibre\output map files\<FILE>.txt"
Reload Wafer Map
Reloads all the wafer maps from the input database into the output database. This is useful when there is a need to run several commands which would change the output database contents, but where each command needs to start from the same database state.
wafer reload
So far we have listed commands that are used to open a map file, define it's format, set the format and name of the output map file and save it. Now we will summarize the commands used to modify a wafer map so that the user has more control over the map that gets created.
Why would you need to control header tags? For example, if your input map file does not include the device stepping distances and your output map file does, then you could use the header tags DEVICE_X
and DEVICE_Y
to insert this information as part of the conversion.
Wafer maps are divided into two sections: a header with parameters and the bin data. The following commands are used to insert or modify header information.
Set Header Tag
The first parameter is a header tag. The second is the value. These must be quoted if there are any spaces in the string.
"<header_tag>" "<value>"
There are two types of header tags: a) those that the program recognizes and those that are not recognized. You can see which header tags are recognized by going to the header tag table.
Any recognized keyword pair is interpreted as setting the value of a header tag. For example, this command can be used to set a common header tag, such as Wafer ID:
WAFER_ID 32908-03
This command can also be used to set custom header tags and add arbitrary user defined information to the output wafer map header:
MAP_AUTHOR "Artwork Conversion, Software, Inc."
Note that the format of the output wafer map must be able to support this type of data. Binary map files don't allow arbitray injection of new header information as every byte is accounted for.
A critical part of converting wafer maps is converting bin codes encountered in the input map to the desired bin codes in the output map. While the program could do some sort of automatic bin mapping, it rarely can predict what the end user needs. Therefore we don't recommend that bin mapping be left to the program.
Bin Format
For wafer maps that support multiple bin formats one should use the Bin Format
command prior to bin mapping. The command defines the output bin format from three different types:
hex - hexadecimal values from 00-FF: use bin format hex
dec - decimal values from 000-255: bin format dec
ascii - ASCII charactersL use bin format ascii
note that each map type that uses ASCII also limits what special characters are legal.
Bin Map
bin map <bin_in> <bin_out>
One can have as many lines as necessary to define the possible mappings.
While one can map different input bin codes to the same output bin codes, one should not map the same input bin code to more than one output bin code.
Example
Let's say you are going from SINF (HEXADECIMAL) and want to map bin code FE to a SEMI E142 file using ASCII where you want to use the character E (for edge die). Then you would issue the commands:
bin format ascii
bin map FE E
The user may have a need to modify the bin data array during the conversion. Currently WMBatch supports the following modifications:
Add Null Rows/Columns
Some map arrays may need to be padded with additional rows/columns (empty) in order to match a pre-specified row and column count. This can be done using the following command:
wafer add <n> [rows|cols] [top|bottom|left|right]
Rows or columns of null bins can be added to any side of the wafer map. For example, to add two rows of null bins to the bottom of the map array:
wafer add 2 rows bottom
Delete Empty Rows/Columns
It may be necessary to remove any empty (i.e. null bin code) rows and columns if they are present in the input map file but you don't want them in the output map file. In this case use the command:
wafer delete rows
to delete all empty rows or
wafer delete cols
to delete any empty columns.
Some wafer processing machines expect the wafer itself and its data to be presented in a particular orientation e.g. with flat/notch down. However the input map data may have the notch/flat on top. In this case, it is necessary to rotate the wafer (and the map array) by 180 degrees. This is applied only to the output database image in the program's memory.
wafer rotate <angle>
Of course, rotating the wafer may also affect:
Example
You wish to convert a wafer where the orientation has the flat on top (180) to the same map file but with the flat on the bottom (0). Before using the convert command issue this command.
wafer rotate 180
Note: rotations are in the CCW direction and may only be multiples of 90 degrees.
Most users of WMBatch will want to be able to set up batch coversions of multiple input wafers. For example, if a lot (say 25 wafers in the lot) arrives and the map files need to be converted for a pick and place machine, one will want 25 new map files. Ideally one could tell WMBatch the basic rules and then let it make all 25 conversions. However one may need to increment header data such as wafer number or increment the output file name. This can all be done using the repeat loop. The syntax is:
repeat start <n1> to <n2>
# block of commands, optionally using <#> substitution
repeat end
Blocks of commands can be repeated using the repeat block. This is useful for generating multiple output wafer map files from a single input, changing some parameters, and/or the output file name. The loop is controlled by the two user specified parameters n1 and n2, which are integers with n1 < n2.
All the commands between the repeat start and repeat end lines will be executed once for all the values from n1 to n2. Any command inside the repeat loop can use the <#> substitution to use the current value of the loop. The number of # characters specifies how many digits will be used. For example, for a value of 1, <#> = 1, <###> = 001, etc. Padding using zeros will be used as needed.
Here is an example of a repeat block which would set the wafer ID to 8888-01, 8888-02, …etc. and save to an output file called WAFER-001.txt, WAFER-002.txt, … etc. for five wafer map files.
repeat start 1 to 5
WAFER_ID 8008-<##>
save “WAFER-<###>.txt”
repeat end
This repeat block would be equivalent to these commands:
WAFER_ID 8008-01
save “WAFER-001.txt”
WAFER_ID 8008-02
save “WAFER-002.txt”
WAFER_ID 8008-03
save “WAFER-003.txt”
WAFER_ID 8008-04
save “WAFER-004.txt”
WAFER_ID 8008-05
save “WAFER-005.txt”
Repeat Loops Using Directories
An even more useful implementation of the repeat loop is one that looks into a directory and processes all of the files it finds in the specified directory. A command file using this kind of repeat loop doesn't need to be edited to account for different number of input map files or different naming schemes.
repeat for files in <full path to directory containing map files>
<directive>
<directive>
<directive>
repeat end
Because this type of repeat loop is so useful there is a separate page, Repeat Directory Loops, covering examples of how to use it.