Line No. |
Command |
Description |
Schematic |
N000 |
G90 |
Set ABSOLUTE mode (all moves will be made relative to the defined origin (X0, Y0, Z0) of the CNC system |
Header information that configures the controller to use INCHES as the standard unit and INCHES PER MINUTE as the feed unit. This code can be used in a metric environment as long as the arguments for X, Y and Z are converted to the appropriate metric values. |
N001 |
G00 |
Set RAPID TRAVERSE mode (used for rapid moves when the bit is retracted from the material being cut) |
N002 |
G20 |
Set system units as INCHES |
N003 |
G94 |
Set system feedrates as UNITS PER Minute (with the preceding G20 command, the feedrates are set to INCHES PER MINUTE) |
N004 |
Z1.000 |
Move the spindle to a point 1.000 inches above Z0 (in this case, Z0 is the heigth of the spindle when the tip of the cutter is just barely touching the surface of the material being tested) |
N005 |
X0.000Y0.000 |
Move the spindle to the defined origin point of the XY axes (X0, Y0) |
N006 |
M3 |
Turn on spindle rotating clockwise. (If your system has program control of the spindle speed, you would use M5 SXXXXX, where XXXXX is the spindle RPM that will be used in this test) |
N007 |
( START ZIG-ZAG ) |
Comment line. Any text that is between parentheses is ignored, even if it is in the same line as a command. |
|
N008 |
G01 |
Set MACHINING mode (all of the following move commands will be executed at the defined feedrate while plunged into the material. This mode will stay in effect until cancelled by G00) |
N009 |
F5 |
Set feedrate to 5 (with G20 G94 this becomes 5 inches / min.) |
N010 |
Z-0.003 |
Plunge spindle to a point 0.003 in. below the surface of the material (referred to as the "plunge depth" for the next command) |
N011 |
G91 |
Set INCREMENTAL mode (all moves will be made relative to the current position of the spindle. Like the clues in a treasure map. Take 2 steps straight head, turn 90° to your left, take 10 more steps....) |
N012 |
F10 |
Set the FEEDRATE to 10 (10 inches/min.) |
N013 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N014 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N015 |
F15 |
Set the FEEDRATE to 15 (15 inches/min.) |
N016 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N017 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N018 |
F20 |
Set the FEEDRATE to 20 (20 inches/min.) |
N019 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N020 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N021 |
F25 |
Set the FEEDRATE to 25 (25 inches/min.) |
N022 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N023 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N024 |
F30 |
Set the FEEDRATE to 30 (30 inches/min.) |
N025 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N026 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N027 |
F35 |
Set the FEEDRATE to 35 (35 inches/min.) |
N028 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N029 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N030 |
F40 |
Set the FEEDRATE to 40 (40 inches/min.) |
N031 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N032 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N033 |
F45 |
Set the FEEDRATE to 45 (45 inches/min.) |
N034 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N035 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N036 |
F50 |
Set the FEEDRATE to 50 (50 inches/min.) |
N037 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N038 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N039 |
F55 |
Set the FEEDRATE to 55 (55 inches/min.) |
N040 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N041 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N042 |
F60 |
Set the FEEDRATE to 60 (60 inches/min.) |
N043 |
X1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the right and 0.125 in.up the Y axis |
N044 |
X-1.000Y0.125 |
Cut from the current spindle location to a point that is 1.000 in. to the left and 0.125 in.up the Y axis (the spindle is now back on the left side of the pattern but 0.250 in. up the Y axis from where the cut started) |
N045 |
G90 |
Set ABSOLUTE mode |
Footer information that tidies up the system, returning the spindle to the home position (local origin), turns off the spindle, and tells the controller that the end of the program file hase been reached. As with the header, this part of the code might need to be modified slightly if the controller software requires a different shut down procedure. |
N046 |
G00 |
Set RAPID TRAVERSE mode |
N047 |
Z1.000 |
Lift spindle to point 1.000 in. above the surface of the material |
N048 |
X0.000Y0.000 |
Return to the defined system origin (X0, Y0, Z0) |
N049 |
M05 |
Turn off the spindle |
N050 |
M02 |
End of Program |