G Code Quick Reference
|G Code Screen|
G1 X3.5 Y5.0 Z1.0 A2.0(linear move)
G2 X0.0 Y0.5 I0 J0.25 (CW Arc move)
G3 X0.0 Y0.5 I0 J0.25 (CCW Arc move)
(Set Fixture Offset #n)
G20 Inch units
G21 mm units
G28 Move to Reference Position #1
G30 Move to Reference Position #2
G40 Tool Comp Off
G41 Tool Comp On
Left of Contour)
G42 Tool Comp On (Right of Contour)
G43 Hn (Tool #n length comp On)
G49 (Tool length comp off)
G53 Absolute Coord
G54 Fixture Offset 1
G55 Fixture Offset 2
G56 Fixture Offset 3
G57 Fixture Offset 4
G58 Fixture Offset 5
G59 Fixture Offset 6
G59.1 Fixture Offset 7
G59.2 Fixture Offset 8
G59.3 Fixture Offset 9
G90 Absolute Coordinates
G91 Relative Coordinates
G92 Set Global Offset Coordinates G92 X0Y0 Z0
M2 (Program End)
M3 Spindle CW
M4 Spindle CCW
M5 Spindle Stop
M6 Tool Change
M7 Mist On
M8 Flood On
M9 Mist/Flood Off
M98 Pxxx Call Subroutine
M99 Return from Subroutine
S (Spindle Speed)
O Subroutine Label
The G Code Screen allows the user to edit G Code Programs and execute them.
GCode is a historical language for defining Linear/Circular/Helical Interpolated Motions often used to program numerically controlled machines (CNC Machines).
See the Quick Reference to the left for commonly used G Code commands.
KMotion's G Code interpreter was derived from the Open Source EMC G Code Interpreter. Click here for the EMC User Manual (Only the G Code portions of the manual, Chapters 10-14 pertain to KMotion G Code)
Specially coded comments embedded within a GCode program may be used to issue KMotion Console Script commands directly to KMotion.
A comment in the form: (CMD,xxxxxx) will issue the command xxxxxx immediately to KMotion as soon as it is encountered by the Interpreter. Any KMotion command that does not generate a response may be used in this manner.
A comment in the form: (BUF,xxxxxx) will place the command xxxxxx into KMotion's coordinated motion buffer. Coordinated motion sequences are download to a motion buffer within KMotion before they are executed. This guarantees smooth uninterrupted motion. The BUF command form allows a command to be inserted within the buffer so they are executed at an exact time within the motion sequence. Only the following KMotion Script commands may be used in this manner.
SetBitBuf, ClearBitBuf, SetStateBitBuf.
Additionally, a comment in the form: (MSG,xxxxxx) will pause GCode Execution and display a pop-up message window displaying the message xxxxxxx.