a very interesting site where you can try every Gcode (and Mcode) and graphically see the result is http://www.cncezpro.com/gcodes.cfm .
How to add some line of comments to your code? Or you don't want execute some lines? Simply enclose the line in round brackets as in:
(THIS IS A COMMENT)
G20 set INCH mode.
G21 set MILLIMETER.
- CHOOSE ABSOLUTE/INCREMENTAL
G90 set ABSOLUTE mode: movement are relative to the absolute x=0,y=0,z=0 position.
G91 set INCREMENTAL mode: movement are relative to the current position.
- START/STOP PROGRAM, OR SPINDLE MOTOR CONTROL
Refer to the page M-code .
G92 set the value of the axis without moving the mill head. Used to set, for example, the starting position) The simplest can be: G92X0.0Y0.0Z0.0 (zeroing all axis) .
- CONTINUOS COUNTOURING ON/OFF
G64 disables deceleration at the end of every line of code, disabling also the screen updates at the end of every line of code .
G65 cancel the G64 command .
G4 G40 .
G41 .
G42 .
G43 .
G49 .
G80 .
G81 .
G82 .
G83 .
G0 move the mill head to the new position at maximum speed .
G1 move the mill head to the new position at spped specified by 'F' (feed) .
G2 circular motion clockwise, at 'F' speed . Position register: X,Y,I,J. X and Y are the coordinates for the end point of the arc, I and J are relative X and Y distance from the current tool position to the center of the circle .
G3 circular motion counter-clockwise.
G12 move from the center of a circle, out to the circumference, around a full circle clockwise and back to the center. Require to set a I register with radius of the circle.
G13 like G12 but counter-clockwise .