Chapter 5:

CNC Programming Language

Upon successful completion of this lesson, you will be able to:

Contents

Overview

CNC machines are very accurate and powerful industrial robots developed jointly by Mr. John Parsons, IBM and Massachusetts Institute of Technology Servomechanism Laboratory in the 1950's.

Most CNC machine tools use a language set by the Electronics Industry Association (EIA) in the 1960's. The official name of this language is RS-274D, but everyone refers it "G-code" or "G&M Code" because many of the words of this language begin with the letters G or M.

While many of the words used by different CNC machines are the same, there are differences between makes and models. This is due in part to machines having different configurations and options. For example, a machine with a chip conveyor will have words to turn the conveyor on and off, while a machine without a conveyor does not. So, while RS-274D is a standard, it is not rigid or enforced. Always refer to the machine documentation for the exact words and syntax for your CNC machine.

Most machines have a vocabulary of at least a hundred words, but only about thirty that are used often. These thirty or so words are best memorized because they appear in almost every CNC program and knowing them helps you work more efficiently.

The G-code language was developed when machine controls had very little memory. It was therefore designed to be as compact as possible. While at first this language may seem arcane, the modern machine tool language is the safest and most efficient way yet devised to control machine tool motion. G&M codes, along with coordinates and other parameters, comprise what is called a CNC program.