029062-1-T Creating Surfaces with Mastercam Mill & the Techno Computer Controlled Milling Machine Alexander Slingeland December, 1992 29062-1-T = RL-2403

Creating Surfaces Mastercam with Mill & the Techno Computer Controlled Milling Machine 'Directed Study' by: Alexander Slingeland December 15, 1992

Contents 1.0 Using Mastercam 1.1 Converting data points to a Mastercam geometry file 1.1.1 ASCII file format 1.1.2 Converting an ASCII file to Mastercam geometry 1.1.3 Saving and reading geometry files 1.2 Creating a tool path from a geometry file 1.2.1 Chaining 1.2.2 Creating the surface and tool path 1.2.2.1 Setting surface and tool path parameters 1.2.2.2 Recalculating a bad surface 1.2.2.3 Rewriting a bad tool path 1.2.3 Tool path files 1.3 Other operations 1.3.1 Gouge check 1.3.2 Filter 1.3.3 Roughing 1.3.4 Merging tool paths 1.3.5 Backplot 1.3.6 Tool library 1.4 Miscellaneous 1.4.1 Trouble shooting 1.4.2 Hard disk problems 2.0 Using the Techno Milling Table 2.1 Using the Techno postprocessor 2.1.1 Notes on the postprocessor 2.1.2 Post processor milling parameters 2.1.3 Translation warning 2.2 Limit switches 2.3 Endmills 2.4 Surface materials

1.0 Using Mastercam

1.1 Converting data points to a Mastercam geometry file Before a tool path can be written, data points which describe the surface to be milled must be read by Mastercam, and converted to a format for which a three dimensional tool path can be written. This is easiest done by properly arranging the data in an ASCII file, converting the points into a set of splines (continuos lines which pass through a set of points), and then saving it in the Mastercam geometry format. 1.1.1 ASCII File Format Assuming that the surface is described by a grid of points, an easy way to make it understandable to Mastercam is to convert it to a series of splines. This can be simply done with an ASCII file containing points written in the following way: Each point should be on a new line, with the x y and z coordinates separated by a space. Since the points are going to be converted to lines in the x or y direction, group the points by each row or column (in increasing or decreasing order in that direction), separated by a blank line: xl yl z xl y2 z xl yn z x2 yl z x2 y2 z x2 yn z x3 yl z When the surface is milled, it is easiest to zero the bit on the top of the material, so the z coordinate should be specified such that 0 is the maximum height (all other points are negative.)

1.1.2 Converting an ASCII File to Mastercam' First, if a column of points is longer than 20)() (the default maximum), the parameter maximum points per spline might need to be changed (select change parameters from the program main menu.) The maximum value (if enough memory is available) of points allowed per spline is 32,767. To read the ASCII file in: Select file -> convert -> ASCII from the mill main menu. Select read and enter the ASCII file name. When prompted whether to delete the current part, respond yes if starting a new surface, or no if adding onto an existing surface. Select convert to splines, and the surface should begin to be drawn. When the surface is drawn the default view is top. This can be changed to side, front, isometric, or a user defined view by selecting (Gview from the lower left corner of the screen, and then choosing the desired view from the menu. The surface can be fit to the screen by pressing alt-Fl. 1.1.3 Saving and Reading Surface Geometry Files Before the surface is first saved, one may want to make sure that the construction origin is set properly (sometimes it is not, which results in the tool starting at some place other than the origin) by: selecting Cview from the lower left of the screen then typing alt-o. 1 For more information on importing geometry files, see pages 15-7 to 15-14 in the Mastercam Reference Manual, Vol.1.

The desired origin can then be entered (0,0,0). The surface geometry can then be saved by selecting file, then save from the main menu, and then entering the desired filename (the suffix.GE3 is automatically added unless otherwise specified.) The surface file is similarly read by selecting get (then enter filename) or mouse get ( enter the extension,.GE3 for geometry files, and pick select the file from a list of files with the mouse).

1.2.0 Creating a Tool Path from a Geometry File Setting the tool path involves several steps; chaining the surface, entering the NC parameters, creating the offset surface, and then writing the tool path (NCI file.) Once this has been done, other functions can be selected such as gouge check, filter, and rough. For a surface created as previously described the best tool path type is for a 3D lofted surface, which computes a surface from the splines used to define it. This surface is required for gouge checking and roughing procedures. To get a lofted surface: select tool path from the main menu, then 3d and loft. If the surface is smaller than 200 lines (changeable in change parameters from master menu) branch points will automatically be searched for, otherwise one is asked whether branch points should be searched for. As this can take some time, and the surface shouldn't have any branch points, no can be entered with no expected problems. One will then be prompted to chain a contour. 1.2.1 Chaining2 When the surface is chained, one is defining the area to be milled. If the surface is not chained properly, the contours are connected incorrectly, and an incorrect surface is calculated. This step must be completed for every type of initial tool path. One disadvantage of the lofted surface is that it can be defined by a maximum of 100 contours, so if the desired surface is larger, it will have to be processed in pieces. 2 For more information on chaining see pages 16-7 to 16-17 in the Mastercam Reference Manual, Vol. 1.

To chain the surface: select window from the chaining methods menu, and mark two corners around the area to be chained. search one-way, and chain in a clockwise direction. When prompted to enter a search point, one can enter the origin 0,0,0, or if that does not result in the first line of the surface being chained first, sketch (with the mouse) a point such that the first line is by far the closest. After a short time, a diamond should appear and the surface should begin to be chained (the diamond will trace yellow over the surface.) This can be a very lengthy process; for example, to chain a 77x77 pt. surface takes about 6 min., but to chain a 100x1330 pt. surface takes 3.5 hrs. When the program has finished chaining the surface, 'define contour #' should be printed at the bottom of the screen. If the number # is greater than the limit of 100 (for a lofted surface), use backup to remove a line. If it is less, than 100 and more lines are desired to define the surface use window to add some more lines. When finished chaining, select done from the menu. If the program automatically skips to the NC parameters screen, the surface chained has filled memory, and a complete tool path will most likely not be drawn. 1.2.2 Creating a Surface and Tool Path 1.2.2.1 Setting Surface and Tool Path Parameters The parameters for the surface to be created are entered on two screens after chaining.3 This is where amongst other things the 3 For a complete description of all parameters see pages 27-1 to 27-3 and pages 16-1 to 16-6 in the Mastercam Reference Manual, Vol.1.

spacing, tool and cutter compensation are selected.4 Once the parameters are entered, the program will proceed to calculate the surface, calculate an offset surface (which takes into account cutter compensation), and write the tool path. If the program stops after calculating the surface and indicates that there were undercuts, most likely the cutter compensation was incorrectly set. Continue to write the tool path, and then rewrite it as described below.5 When asked whether to accept a tool path, select yes, even if some of the parameters were incorrectly entered, as selecting no will scrap everything done so far for the tool path. Select end program to close the tool path file. If more tool paths are written without closing the previous tool path file, the new tool paths will just be appended. When asked whether to run the post processor, select no, as the NCI file must be separately processed by a Techno processor. 1.2.2.2 Recalculating a Bad Surface As long as the surface was properly chained and saved, the surface can be relatively quickly recalculated. Proceed to set the tool path as before, except enter a different filename for the tool path, and when prompted for a chaining method, select file. One then enters the filename of the surface (the name of the file for the first tool path with the chaining complete; the correct extension is automatically added) and enters the contour to begin with (1), and the number of contours to read (maximum 99). The surface will then be rapidly chained, and one can continue by setting the parameter values as before. If a tool path is only written for a section of the chained surface, there is not enough memory for the entire tool path. More memory 4 See page 16-20 in the Mastercam Reference Manual, Vol. 1 for an explanation of cutter compensation. 5 Note: Undercuts are not the same as gouges, and will not be removed by gouge checking. For more information on undercuts see page 16-22 in the Mastercam Reference Manual, Vol. 1.

can be allocated to the tool path by selecting change parameters from the master menu, and changing system allocations. 1.2.2.3 Rewriting a Bad Tool Path If the surface was written correctly, but the tool path has errors, just the tool path can be rewritten from the surface. To do this: select nc utils from the main mill menu select recompensate enter the filename of the surface for which to rewrite a tool path re-enter the tool path parameters 1.2.3 Tool path Files When a tool path is written, five files are created. While the.NCI file is all that is really needed to mill the surface, the other files should be kept, so that in order to make a change to the surface, not all files need to be recreated. Once the tool path has been written, the files can be compressed and archived into one file so as to avoid accidentally erasing one part and to save disk space. Below is a list of the files created, and how well they compress (* indicates the tool path name): *.NCI -the tool path -compresses well *.NCS -chaining information -does not compress *.CDB -the surface -compresses very little *p.CDB -the offset surface -compresses very little *.IND -? -very small The *.NCS file is relatively large, and is the same for any tool paths of the same surface, so only one copy per surface (or section) need be kept. The geometry files (*.GE3) from which the tool path was written do not compress at all.

1.3 Other Operations Once a surface file and tool path have been written, several more operations can be performed. Gouge check checks whether the tool path gouges the surface; Filter allows one to reduce the number of points in the surface, specifying a maximum allowable error (this can greatly speed up milling time); Rough creates roughing tool paths which quickly remove bulk material in the surface; and backplot allows one to simulate a tool path, with an estimation of milling time. 1.3.1 Gouge Check6 Get to gouge check from the main menu by selecting tool path then 3d then gouge check. One is then prompted for a filename. The filename of the surface to be checked may be entered (afterwards select overwrite, otherwise -the checked surface is just added onto the unchecked surface), however should something go wrong with the gouge checking, the original tool path will be lost. Once a filename for the checked tool path is entered, one must enter the name of the surface to be checked (this is the name of the file which contains the original tool path.) Mastercam will then rewrite the NCI file, and when finished will display the number of gouges detected and removed. 6 For an explanation of parameters see page 34-1 in the Mastercam Reference Manual, Vol.1.

1.3.2 Filter7 To filter a tool path, select NC utils then filter from the main menu. Enter the NCI file to filter, the maximum error, and the number of points to look ahead (default 100). The program then removes points that are within the specified maximum error from the splines used to define the surface. 1.3.3 Roughing8 Roughing allows one to rough an existing surface file by making several constant level cuts. Select toolpaths, 3d, and rough; then enter a filename for the roughing tool path, and the name of the surface to rough. For the rough parameters, enter: 0 for the Entry/exit arc radius, select pocket at each level for the roughing option, cavity for the type of surface, top-to-bottom for the ordering of cuts, and CW for the cutting direction. A clearance of 0.1" on top of surface, with a distance of 0.1" between constant-z levels seems to work well. On the NC Parameters 7 For complete information see page 39-1 in the Mastercam Reference Manual, Vol.1. 8 See pages 35-1 to 35-4 in the Mastercam Reference Manual, Vol.1 for a description of roughing parameters.

screen, select the tool to be used for roughing (usually a flat end works best), and leave some stock for the finishing tool path. Once the parameters have been entered, the program should begin to locate peaks and valleys, and then begin to connect them. The tool paths for each level will then be individually calculated and displayed. If a warning appears that there was an error finding intersections on a particular level, try changing the distance between constant-z levels or the clearance on top, unless enough roughing passes have been written (ex. 8 out of 9). Once all levels have been written, the surface should be re drawn, all the tool paths displayed, and one is then asked whether to accept this tool path segment. Often for very large or rough surfaces, the roughing option crashes. This is due to the large number of peaks and valleys. Another way to rough a surface is to write another tool path for the surface, but spaced farther apart and with a much larger bit than the finishing bit. This tool path should then be filtered to a rather large tolerance ( 0.1"). Then when the surface is to be milled, the roughing pass should be started at a height above the surface material so that at the deepest point on the surface the milling bit does not go below the fluting (the cutting edges on the bit). The starting point can then be lowered until the desired depth is achieved (accounting for stock to be left for the finishing pass). Usually at least two roughing passes are required. 1.3.4 Merging Tool Paths Since using the lofted surface option often requires that a surface be processed in pieces, it can be practical to paste together the separate pieces so that only one program has to be run when the surface is milled. Several tool paths can be written to one NCI file by not selecting end program after setting a tool path, but just continuing to the next tool path, or several separate tool path files can be written into one (recommended method).

The easiest way to combine tool paths is to select NC utils from the main menu, then edit NCI.9 When asked for the filename, enter and create a name for the file that will contain the merged tool paths. To begin writing tool paths to this file select merge from the edit NCI menu. Enter the filename of the first tool path, and the number of sections to read. When done reading in the tool path (it should be drawn on the screen) select yes when asked whether to keep the tool path (if this is the wanted tool path) and either enter the next number of sections to be read, or hit esc and select merge again to similarly add the next desired tool path from another file. When all tool paths have been written, select end prog from the edit NCI menu, and select yes when asked whether to save changes. 1.3.5 Backploti ( This allows one to check a tool path by simulating the milling of the surface. To do this: select NC utils from the main menu, then backplot select plot and enter the name of the NCI file to be displayed. If set to step, the tool path will be stepped through with each click of the first mouse button (run can be simulated by holding down the first and third buttons), and the coordinate of the milling bit will be displayed. When finished plotting the path, an estimate is made as to the required milling time which is accurate if the correct milling speed parameters were set in the tool path parameters screen. 9 See pages 38-1 to 38-7 in the Mastercarn Reference Manual, Vol. 1 for a description of all Edit NCI commands. 10 For a description of the options see pages 37-1 to 37-2 in the Mastercam Reference Manual, Vol.1.

1.3.6 Tool Library' 1 To view and/or edit the tool list select NC utils from the main menu, then def tools. To see a complete list of all the tools select list tools. The tool library contains the diameters and shapes of tools, so that they can be easily referenced by number on the tool path parameters screen. The default tool library file (tools.tl) has been numbered in the following format (tool numbers in bold are in use, and have been entered): Carbide Bits Diameter 1/4 " 1/8 " 1/16 " Flat End 2 Flute 4 Flute 1 3 9 11 17 19 Ball End 2 Flute 4 Flute 5 7 13 1 5 21 23 High Speed Steel bits (2 Flute) Flat 2 Ball 4 3/16 t note: this is just a numbering system used to avoid conflicts and confusion, any number can be assigned to a tool. 11 See pages 41-1 to 41-4 in the Mastercam Reference Manual, Vol.1 for how to edit the tool library.

Overview of Procedure for Creating a Surface Tool Path read + convert ascii data file chain surface set tool path parameters C 4x — vIr 15 1 -~ a- writes surface 0 a) 0.E o0 ---. writes offset E -E surface O 1 a1) 0 C(5 (I) a),) a) ca E 0 0 a) no yes FINISHED

1.4.0 Miscellaneous 1.4.1 Trouble Shooting Mastercam is not without its bugs. All problems encountered so far have either been previously mentioned or fixed. If problems are encountered contact: CNC Software 344 Merrow Road Tolland, CT 06084 (203) 875-5006 * Fax: (203) 872-1565 1.4.2 Hard Disk Problems If Mastercam crashes, it often leaves open invisible temporary files which quickly take up disk space. To check if this is happening, at the DOS prompt type: chkdsk /f If there is a problem, one will be asked whether or not lost chains should be turned into files. Enter no (the files are useless), and the disk space will be freed up.

2.0 Using the Techno Milling Table!!! Hardware Precautions!!! Do not unplug any of the control cables to the stepper motors while power is applied! Doing so can damage the motors Do not over tighten the collet clamping nut on the electronic grinder! Repeatedly doing so will cause the nut to break.

2.1 Using the Techno Post Processor 2.1.1 Notes on the Post Processor Complete instructions for using the Techno Mastercam post processor can be found in the 'MAC100 Techno Post Processor for MasterCAM' manual. A diagram following this section summarizes the steps in milling from a surface from a NCI file. Following are a few helpful points not covered in the Techno manual: * The Techno post processor is not run through Mastercam; exit Mastercam, copy the desired tool path's NCI file to the Techno directory and type techno. * When in the jogging window, if the motors are homed, the position of the bit is not kept track of. When jogging the motors to change the bit between tool paths, do not home the motors, so that the exact location of the origin can be kept track of. * When milling the surface, jog the endmill to where the origin is on the material to be milled, and lower the bit on to its surface (a good method is to insert a piece of paper between the bit and the material, and lower the bit until the paper can just be slipped out from underneath.) * If unsure of the orientation of the origin on the material, it is a good idea to leave the bit several inches above the surface and do a sample run of the program, and see in which direction the bit moves. 2.1.2 Post Processor Milling Parameters If the parameters need to be reset, the screw pitch for the table is 4mm (other parameter values can be read from the MAC100 Techno Post Processor for MasterCAM manual.) The parameters of feedrate and plunge speed can be controlled during milling if 'trial execute' is opted for when translating the NCI file in the Techno post processor.

2.1.3 Translation Warning If while translating the file the warning "unexpected op code encountered 1(014 please consult techno" appears at the bottom of the screen, ignore it as long as multiple construction planes have not been used. The Techno post processor is written for the 286 version of Mastercam which does not have the possibility of multiple construction planes. When then translation is finished, the message "file has executed properly" should appear.

Overview of Milling Procedure with Techno Postprocessor jog (F2) milling bit to desired origin relative to surface material select translate (F1) from main men' select execute file F7) from main menu no FINISHED

2.2 Limit Switches The x, y, and z axis motors each have a limit switch used only when homing, to tell the controller when that motor has finished homing. The x and y axis's switch is located underneath the stepper motor, inside the motor mount. The switch is activated by a pin on the end of the milling motor carrier, which when homed sticks into the mount. The connections for the limit switch to the DB-9 connector in the motor assembly housing are shown in figure 2.2, (with a different style switch). The color wire is indicated in parenthesis. I... - motor assembly housing -I stepper motor -- homing limit switch Figure 2.1 Location on x and y axis homing limit switches The z axis has the homing limit switch mounted outside of the motor assembly housing, since the z axis has been reverse mounted. The switch is mounted on the side (labeled as going to the motor in Figure 2.3). The connections for the switch to the DB-9 connector in the motor assembly housing are shown in figure 2.2. If the z axis mounting is to be restored (non-reversed), the original homing switch must be reinstalled, or the existing switch must be reoriented to properly switch when the motor is homed. normally closed normally open red (green) pi #9 white (white) p g n (row) pin #5 green (brown) pin 5 common Figure 2.2 - Homing limit switch to DB-9 connector connections

The z axis has an additional limit switch that prevents the machine from milling into the table surface. This switch is connected directly to the controller reset switch on the front of the MAC100 controller. The height of this switch must be adjusted for each different length milling bit being used, so that the switch closes just as the bit touches the table. If the switch is triggered, the controller is reset, and anything in its memory is lost. To continue, the controller must be turned off, and the motor manually backed up until the switch opens again. The controller can be then turned on and the jogging routine can be loaded to reposition the mill. Limit switch connected to controller reset P Limit switch connected to z-axis stepper motor Figure 2.3 - Location of the limit switches on the z axis motor

2.3 Endmills There are a variety of endmills available, depending on the length, diameter, and fluting required. The flutings on the bit are the cutting edges. A two flute design gives better chip throwing capabilities, while four flutes give a smoother finish. Because of the limited number of collets available for the grinder motor used, the bits must be on a3,'/8", 1/4" or 1/8" shank. Bits that are just a little smaller that the collet size can be used with a reducing bushing that has slits in it to allow it to grip the bit. Custom bits can be ordered to suit any specific needs. Regular end bits (like the first custom bit in fig.2.4), can be made with ends down to 1/16". While bits can be made smaller, they break very easily. To get a smaller point on a bit, a burr (such as the second custom bit in fig.2.4) can be used. The shank is tapered down, and the fluting is scratched in by hand. Standard Shape Bits, --- I Custom Bits '$ 6 flat end ball end Figure 2.4 - Examples of endmills Milling tools and supplies are available from: Reid Tool Supply Company 2265 Black Creek Road Muskegon, MI 49444 (800) 253-0421 * Fax: (616) 772 Custom Carbide Tools are available from: Dumbarton Tool Inc. 12685 Arnold Redford, MI 48239 (313) 534-2090 * Fax: (313) 534 3-4485 1-0241

2.4 Surface Materials Depending on its thickness, the surface can be milled in several materials. While plastics of a specified dielectric (can also be lossy) can be ordered, they are very expensive. There are a couple of more common materials that may do: UHMW Polyethylene UHMW Polyethylene comes in a large variety of sizes (up to 8" thick), machines well, and is relatively economic. The electric properties specified by the manufacturer are: 2.3 < ~r < 2.35 for 6() Hz < f < 1 MHz tan5 < 2.0x1()-4 dielectric breakdown @ 900 KV/cm Difficult to find sizes can be obtained from: Ain Plastics Southfield, Michigan (800) 521-1757 Machinable Wax Wax has the advantages of being easy to mill, reusable and inexpensive. However, for thicknesses greater than 2" it must be layered. In order to reuse the wax, it must be melted in an agitated melting tank which can cost upwards of $4,000. The wax will usually be bought back by the vendor. Wood Although unsuitable as a material when making radar measurements, wood is very cheap, making it ideal for milling prototypes to check surface accuracy before milling in a more expensive material.

Hardwoods work best, as they have a fine grain and not many knots. Experience shows that White Maple works best (oak has been tried, but gives frizzy edges). White Oak and other hardwoods are available at: Armstrong Millworks 3()39 Highland Rd. Highland, Michigan (313) 887-1037