How to Program a CNC Milling Machine

Written by christian mullen
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Program a CNC Milling Machine
CNC milling machines can be programmed in two ways. (CNC Steuerung image by Roland Pavic from

CNC, or computer numerical control, programming can be done in one of two ways. G code is a universal language that is used by all CNC milling machines and involves the use of a simple lettering system. Most CNC milling machine manufacturers also offer the option of using their proprietary conversational language that is often easier to use but more restrictive if you are using a machine that is of a different make. The CNC control will simply translate the conversational commands to G code for the cutting commands entered.

Skill level:

Other People Are Reading


  1. 1

    Input the home line of the G code program. Enter the miscellaneous commands or "M codes," such as "Coolant On" or "Air Blast On" as well as the first position for the spindle. The CNC control will calculate the approach coordinates for the first position to start the machining process. Enter the feed rate, tool number and speed of the spindle for the first tool that will be used.

  2. 2

    Enter the coordinates for the first cut. Each line can have up to four G positions and four M codes. The control will take the cut information and create automatic entry and exit points for the coordinates.

  3. 3

    Enter all of the remaining operations and tool changes. Use individual lines for each cut to make the program easy to read and edit if adjustments are necessary. "N codes" to signify line numbers can be used for quick reference if programs are long.

  4. 4

    Signify the end of the program on the last line. This line can also command the machine to repeat certain operations, send the tool to the home position, turn coolant off or dwell above the piece for a part change.

  1. 1

    Set the home line at the control. Set the machine to save a new program and enter the material type, maximum speed rate for the tool and whether coolant should be on or off. The first line of a conversational program sets the general parameters for the program.

  2. 2

    Enter the first cutting operation. Conversational programming is based on shapes and operations such as cutting with end mills, drilling and boring, among others. The first part of each line usually dictates the operation type, followed by the coordinates and, finally, the tool number and speed/feed rates.

  3. 3

    Enter the rest of the cutting operations, one per line. Remember to double-check your coordinates according to the specifications in the blueprint.

  4. 4

    Enter the end line, which will stop the cutting processes and send the last tool to the home position. You can also set the program to repeat itself from the beginning or from any one of the lines within it. This line will also signify coolant off and you can even change back to the first tool in the last line on some controls.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.