Contents - Index - Previous - Next


CAD Software as an Aid to NC Code Preparation


The ideal way to create NC code for a CNC machine tool is to use CADCAM software such as AlphaCAM, MasterCAM or EdgeCAM. The code is quickly produced, accurate and alterations are easily made. But, such software is costly. WELturn will accept manually produced NC code. To create it you need to know and understand the relevant G codes and the format in which the code must be set out: there is a lot of information in topics in this Help file.

Traditionally, NC code was prepared manually with the help of a drawing of the part, pencil, paper and a calculator. However, this is a laborious process and the trigonometry can be complex.

CAD software, such as AutoSketch or QuickCAD, can be used to draw the part, plan the machining and report the co-ordinates of corners and other key points. NC code for a lathe requires X and Z co-ordinates. CAD software tends to work with X and Y co-ordinates: care must be taken to not get the numbers muddled when setting out the NC code:
  • X in CAD is CNC lathe Z;
  • Y in CAD is CNC lathe X.  
    ·
    Another thing to remember is that WELturn requires X co-ordinate values to be diameters, not radii. Therefore CAD software Y co-ordinates need to be doubled when written into WELturn code.

    Regardless of where the lathe
    's tool post really is, front or rear, draw all part geometry as a half profile above a centreline. This will avoid confusion about whether arcs are clockwise, G2 (remember two syllables!), or counter clockwise, G3 (remember three syllables!). View all arcs from above, ie looking down on the drawing. If you want the tool to go clockwise round an arc, then the command is G2. The NC code will be correct for all machines regardless of the actual tool post position.

    From the lathe co-ordinate point of view, the centreline of the drawing is horizontal at X = 0. By drawing the half profile of the part geometry above the centreline, all X values will be positive. All Z values on the part will be negative.

    Draw the part half profile starting from X = 0, Z = 0 and work left, moving increasingly Z negative.

    Finish by drawing round the part half profile and still above the centreline, a half profile of the billet starting from X = 0, Z = 1.

    Move the part and the billet half profiles together so that the billet now starts at X = 0, Z = 0.

    To compile the NC code, locate and note the critical co-ordinates of the part. Be sure that the CNC X values (CAD Y values) are converted to diameters.

                        

    Example
    Fig 1 illustrates how CAD software can help with planning machining and the preparation of NC code. It can report, for example, the co-ordinates of such points as P1, the end points of the various canned cycles. It can report the co-ordinates of the corners of the part profile which are needed for the finishing cut.

                        

    Fig 2 illustrates how CAD software can help with planning the machining of a curved or tapered profile.

    Material in the topic AlphaCAM and the Tailstock Centre applies equally when using other CAD software. The .dxf versions of the tailstock files, and the .dxf versions of the lathe tool profiles, can be imported into other CAD software and placed or moved around in a drawing so that clearances can be checked.

    DXF drawings can sometimes be the wrong size when imported into some programs. Hence these tailstock and lathe tool .dxf files have two dimensioned orthogonal lines which can be checked for length. If the lengths are not correct, scale the imported drawing by an appropriate factor. Check the scaling in both directions: do n
    ot assume that an error one way is the same as an error the other way.

    AlphaCAM
    An Example of Manually Created NC Code
    Arcs: The Rules for Coding Them
    Canned Cycles
    CNC File Specification
    Manually Prepared Code
    Tool Tip Radius Compensation