WMBatch/WMLib can be controlled via an ASCII batch file. The batch file contains commands 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 built-in command line parameter:
Comments can be made to annotate commands in the batch 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
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:/user/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:/user/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 generally necessary to also identify the wafer map's format.open "<input_file>" format <format>
The format string must be one that WMBatch supports and also which is 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
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>
Say you want to produce an E5-1296 output map file. Use the command:
convert format E5-1296
Save Wafer Map
This command saves the output database to the specified file using its current wafer map format.
So far we have listed commands that are used to open a map file, define it's type, set the type and name of the output 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.
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.
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:
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. Most 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.
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_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.
Let's say you are going from SINF 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:
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 CCW and should be only 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
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
This repeat block would be equivalent to these commands: