Basic Movements with G-Code

October 22, 2020 3:07 pm


In this video tutorial by the G-Code Tutor, Marc Cronin talks about basic movements of a CNC machine using G-code.

Basic movements commands, such as G00 (rapid travel) or G01 (linear interpolation), are typically used to communicate to the machine where to move the cutter along the X-, Y-, or Z-axis, and how quick the movement should be. Unlike incremental movements, which are calculated based on the current position of the tool, basic movements (or absolute movements) are determined based on a Cartesian Coordinate System where the datum position is the center of the system (X0;Y0;Z0).

Here’s a simple example using G00 and G01:

G00 X0.0 Y0.0;
Z-10.0 M08;
G01 Y160.0 F100;

The first line in the example above is telling the machine to position the cutter in the datum position (X0.0 Y0.0) as quickly as possible (G00).

Now with the cutter in position, the second line tells the machine to lower the tool by 10mm along the Z-axis and turn on the coolant (M08). (NOTE: we could repeat the G00 code at the beginning of the line but it’s not necessary since the command is still active from the line above.

Once the cutter is in position we can tell the machine to start cutting on a straight line using the G01 command. In the example the command is telling the machine to cut along the Y-axis for 160mm from the datum position at a 100mm/min feed rate (F100.0).

Last, on the fourth line, the command is telling the machine to take a straight cut along the X-axis for 200mm. As mentioned above, we don’t need to repeat the G01 command of the feed rate, since both commands are already active from the line above.

To learn more about the subject or expand your G-code knowledge visit

Recommended Videos

Leave a Reply