Professional Documents
Culture Documents
Commands CNC
Commands CNC
The G0 command moves the machine at maximum travel speed to whatever coordinates
follow G0 (Figure A). The machine will move in a coordinated fashion, and both axes
complete their travel at the same time. G0 is not used for cutting. Instead, it’s used to move
the machine quickly to begin a job or move to another operation within the same job.
Here’s an example of a rapid (G0) command:
G0 X7 Y18
A G1 command (Figure B) is similar but tells the machine to move at a specified rate called
the feed rate (F):
G1 X7 Y18 F500
G2 (Clockwise Motion)
Setting the mode to G2 and specifying the offset from center (Figures C and D) creates
clockwise motion between the starting point and the specified ending points.
G21 G90 G17
G0 X0 Y12
G2 X12 Y0 I0 J-12
The G2 starting point is where the machine is located prior to issuing the G2 command. It’s
easiest if you move your machine to the starting point before trying to issue
the G2 command.
G3 (Counterclockwise Motion)
Just like G2, the G3 command creates an arc between two points. Whereas G2 specifies
clockwise motion, G3 specifies counterclockwise motion between the points (Figure E). A
valid set of commands to produce G3 motion is shown here:
G21 G90 G17
G0 X-5 Y25
G3 X-25 Y5 I0 J-20
G-Code Rules
Just like a math equation, G-code has its own rules about the order of operations. Here
are the most common, in order of precedence (that is, comments will be interpreted first
and the change tool will be interpreted last):
• Comments
• Feed rate
• Spindle speed
• Select tool
• Change tool
When you issue a G command, you are putting the machine into that mode. If you issue
a G1 command, such as G1 X5 Y13, then the machine moves to X5 Y13.
If you issue another set of coordinates, you do not need to issue another G1 command.
Why? Because the machine is in G1 mode until you change it to something else
like G0 or G2 or G3.