# CNC Machine Codes List and PDF References

How to read a CNC machine codes list, what G-codes and M-codes do, where to find a PDF reference, and how to check codes against your control.

A CNC machine codes list is a reference that pairs each code number with the action it commands, such as G01 for a feed move or M03 for spindle start. G-code covers motion and machine behavior, while M-code covers switching functions like coolant and tool changes. A PDF copy is handy at the machine, but the code set your control actually runs is the one to trust. 

- G-codes and M-codes split the work: one group moves and positions, the other switches machine functions.
- A code number can mean something different on another control, so check the manual for your model.
- A PDF reference belongs at the machine as a quick lookup, not as a replacement for the control manual.
- Read a program example line by line to see how codes, axis words and feed rates combine.
- Keep your own code list updated with the codes you use and the notes your machine needs.
 

## What a CNC code list contains 

A CNC machine codes list is a chart of code addresses and the functions they call on a control. Each entry pairs a letter and number, such as G00, with a short description of the action. The list may also show the parameters a code accepts, like axis positions or feed values. 

Most lists are organized by address letter: G for preparatory codes, M for miscellaneous codes, and the axis letters X, Y and Z for coordinates. Feed, speed and tool addresses such as F, S and T often sit in a second table. A good reference chart groups codes by what they do so you can find a motion code and a switching code quickly. 

A list from a control builder describes that builder's codes and its options. A generic list gathered from the internet mixes codes from several builders. Use a generic list to learn the shape of the language, then confirm every code in the documentation that came with the machine. 
| Address | Purpose | Example | 
| G | Motion and machine mode | G01 linear feed | 
| M | Switching function | M08 coolant on | 
| X, Y, Z | Axis target position | X50.0 Y25.0 | 
| F | Feed rate | F250 | 
| S | Spindle speed | S1200 | 
| T | Tool selection | T03 |  

## G-codes and M-codes: the two main groups 

G-code is the preparatory group that tells the machine how to move and in which mode to work. A G-code can set a motion type, choose a work offset, or turn on cutter compensation. These codes stay active until another code in the same group replaces them. 

M-code is the miscellaneous group that switches machine functions on and off. Spindle rotation, coolant flow, program stop and tool change all belong here. An M-code acts at the moment the control reads the block, so its position in the program matters. 

Splitting codes into these two groups helps you read an unfamiliar program. Look at the G words to follow the path and the M words to follow the machine state. The related_terms program example and reference chart describe the same two groups from a different angle. 

## Reading a short program example 

A program example shows how codes combine into blocks the control executes in order. Each block holds the addresses needed for that step, and the control reads them together. The example below is a simple facing pass, not a runnable program for every machine. 

Start with the setup blocks: a program number, units selection, work offset and tool call. Then a spindle start and a rapid move bring the tool near the work. Feed moves cut material, and a retract clears the tool before the program ends. 

Compare each block in an example against your own code list. The same number may trigger a different action on another control, so verify before you run anything. A program written for one machine is a study aid, not a file to load and press start. 

- O1001 program number
- G21 metric units selection
- G54 work offset call
- T02 M06 tool change
- S1500 M03 spindle on forward
- G00 X0 Y0 rapid to start
- G01 Z-0.5 F120 feed into cut
- M30 end of program
 

## Where a PDF reference helps on the floor 

A CNC machine codes PDF gives you a lookup you can open on a phone or print for the bench. Printouts survive where a screen is awkward, and a page taped inside a toolbox is quick to reach. Search inside a PDF is faster than paging through a thick manual. 

Choose a PDF that names the control family it covers and shows the code version. A file with no source or version is hard to trust when a code behaves oddly. Keep the official manual PDF as the authority and a short personal chart as the fast lookup. 

Store the PDF where the whole shop can reach it and note the revision on the cover. When a code question comes up at the machine, check the PDF first and the manual second when the two disagree. A shared file avoids each operator keeping a different version. 

- Control builder manual, full reference
- Build a one page chart of codes you use
- Mark the control model and software version
- Note any code your machine disables
- Review the chart when a program misbehaves
 

## Checking a code before you run it 

A code number can mean one action on a control and a different action on another. Builders assign optional codes within the same range, and a machine option can change what a number does. Confirm each code in the manual for your model before it appears in a running program. 

Run a new program in single block with the rapid override low and the tool clear of the work. Watch the position display against the code list as each block executes. Stop at the first block that does not match the expected action and check the code before continuing. 

Some codes control spindle, tool change or axis limits on a machine that can injure a person or damage the work. Treat an unfamiliar code as a stop point and involve a trained specialist when the manual is unclear. A reference chart tells you what a code should do, not that it is safe on your machine. 

## Building your own shop code chart 

A shop code chart that matches your machines saves more time than a long generic list. Start with the codes your programs actually contain and add the ones you plan to use. Leave out codes your control does not support so nobody looks them up by mistake. 

Write each entry as the code, its action, and a short note about what it needs. Notes might cover an active modal group or an argument the code requires. Add the control model at the top so the chart cannot be mistaken for another machine's list. 

Update the chart when a program reveals a code that behaves unexpectedly. A dated revision line tells operators which copy is current. Keep one master file and print from it so every machine sees the same reference. 

## Codes that differ between controls 

Modal codes stay active after their block, and a later code in the same group cancels them. Motion mode, plane selection and units all work this way. Reading a program means tracking which modes are active, not just reading the current line. 

Canned cycles are a frequent source of confusion because builders implement them with different parameters. A drilling cycle may accept depth, retract and peck values in an order that varies. Check the cycle block against the manual before trusting the output. 

Work offsets, cutter compensation and probe routines also vary in how they are called and canceled. Note the differences for each machine in your shop chart. A code list is a map of the language, and the control manual is the dictionary for your model. 

## Questions about CNC machine codes 

### What is an example of a CNC machine code? 

G01 is a motion code that moves the tool in a straight line at a set feed rate. M03 starts the spindle in the forward direction. Both appear in a block with axis words and a feed value, as in G01 X50.0 Y25.0 F250. 

### Where can I get a CNC machine codes list as a PDF? 

The control builder supplies the authoritative codes PDF with the machine documentation. Ask the machine supplier for the manual matching your control model and software version. A shop-made chart of the codes you use works well alongside it for quick lookup. 

### Do G-code and M-code mean the same on every machine? 

No, a code number can call a different action on another control, and optional codes vary between builders. G-code handles motion and modes, while M-code handles switching functions. Confirm each code in the manual for your model before you run it. 

### How do I read a CNC program example safely? 

Read the example block by block against your own code list and note which modes are active. Run any adapted program in single block with the tool clear of the work. Treat a published example as a study aid and verify it on your machine before cutting. 

### What should a shop code reference chart include? 

A useful chart names the control model, lists each code with its action, and notes any argument the code requires. Add a revision date so operators know which copy is current. Leave out codes your control does not support.
