NCI Files
There are two types of NCI files: binary and text. When you create an operation in a Mastercam file, Mastercam automatically creates a binary NCI file. Mastercam works with these NCI files in the background, and you typically do not need to work with them directly unless you are writing a post processor or doing other advanced work.
When you post an operation, you have the option to create and save a text NCI file. This contains the information from the binary NCI file in a text format so you can read it. Use the control definition to tell Mastercam how you want to work with NCI files. Consult your Mastercam reseller if you need more documentation.
This section introduces the format of a text NCI file. NCI data is arranged in pairs of lines. The first line of each pair is an operation code, or NCI G-code that indicates the type of operation, such as a linear move or a stock definition. (Because the NCI codes have to be machine- and control-independent, they do not look like the G-codes that you are used to seeing in NC programs.) The second line provides parameters used by the NCI code. For example, operation code 1020 defines stock block size and material. It has eight parameters, which appear below it on the second line. The format for this particular NCI code looks like this:
G 1 2 3 4 5 6 7 8 where 1 = X component, width (stck_ht) 2 = Y component, height (stck_wdth) 3 = Z component, thickness (stck_thck) 4 = X origin of block (stck_x) 5 = Y origin of block (stck_y) 6 = Z origin of block (stck_z) 7 = Origin corner (stck_crnr) 8 = String with the stock material (stck_matl)
In addition, parameter 7 (Origin corner) can be one of the following integers:
0 = top of block, center 1 = top of block, upper left corner 2 = top of block, upper right corner 3 = top of block, lower right corner 4 = top of block, lower left corner 5 = bottom of block, upper left corner 6 = bottom of block, upper right corner 7 = bottom of block, lower right corner 8 = bottom of block, lower left corner
In an actual file, NCI code 1020 might appear as:
10201. 1. 1. 0. 0. 0.
4 ALUMINUM inch - 6061
This defines a 1x1x1 inch block of stock, made of 6061 aluminum. The stock origin is X0, Y0, Z0; Z0 is the top of the stock model, and X0, Y0 is the lower left corner.
For detailed reference information about NCI codes and formats, contact your local Mastercam Reseller.





