


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. to the right and 0.125 in.up the Y axisĬut from the current spindle location to a point that is 1.000 in. Take 2 steps straight head, turn 90° to your left, take 10 more steps.)Ĭut from the current spindle location to a point that is 1.000 in. Set INCREMENTAL mode (all moves will be made relative to the current position of the spindle. below the surface of the material (referred to as the "plunge depth" for the next command)


Set feedrate to 5 (with G20 G94 this becomes 5 inches / min.) This mode will stay in effect until cancelled by G00) Set MACHINING mode (all of the following move commands will be executed at the defined feedrate while plunged into the material. Any text that is between parentheses is ignored, even if it is in the same line as a command. (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)Ĭomment line. Move the spindle to the defined origin point of the XY axes (X0, Y0) 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) Set system feedrates as UNITS PER Minute (with the preceding G20 command, the feedrates are set to INCHES PER MINUTE) Set RAPID TRAVERSE mode (used for rapid moves when the bit is retracted from the material being cut) 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. Header information that configures the controller to use INCHES as the standard unit and INCHES PER MINUTE as the feed unit. Set ABSOLUTE mode (all moves will be made relative to the defined origin (X0, Y0, Z0) of the CNC system The codes used in this tutorial are so generic that they should work with virtually any controller that supports NIST RS274 (V3).
#G CODE ZERO AXIS SOFTWARE#
The code areas marked in green are essentially a header and footer that might be slightly different depending on your controller software and the way you define you local origin. That makes it easy to modify by cutting and pasting blocks of text, as long as you remember set the feedrate (FXX) for each step. One of the things that you will notice about the following code is that the main section is very repitive. The only things that change are the feedrates ( F commands). The code shown in the table below is what we use for ANY of our tools with cutting diameters 1/8 in. They are shown in the code for clarity and can make troubleshooting much easier later on. Leading and trailing ZEROS are ignored by the G-code interpreter. Controller software, like Mach3, often show line numbers by default. Line numbers (Command starts with a N) are totally optional, but VERY handy for editing long programs. As you might expect, the positive (+) Z direction is vertically up from the surface. The positive (+) Y direction is towards the BACK of the table. For a complete description, look at the G-code Primer (The NIST RS274/NGC Interpreter).Īt Think & Tinker, we have the system origin (X0, Y0, Z0) defined in the lower left corner of the cutting table, near the corner of the FRONT and LEFT edges.
#G CODE ZERO AXIS FULL#
The full scope of the allowable syntax is beyond the purpose of this short tutorial. Every line is in clear text (like HTML) and the commands logically positioned with the arguments that they operate on. G-code is remarkably easy to understand, once you master a few commands and become familiar with the required syntax.
