Revision as of 00:31, 26 October 2005 edit64.122.12.82 (talk)No edit summary← Previous edit | Revision as of 13:17, 6 November 2005 edit undoGargoyle888 (talk | contribs)280 editsm Minor clarificationNext edit → | ||
Line 12: | Line 12: | ||
:Y position | :Y position | ||
:Z position | :Z position | ||
:M code (another "action" register) | :M code (another "action" register or Machine code(*)) | ||
:F feed rate | :F feed rate | ||
:S ] | :S ] | ||
Line 20: | Line 20: | ||
:I Arc data X axis | :I Arc data X axis | ||
:J Arc data Y axis. | :J Arc data Y axis. | ||
:K Arc data Z axis. | |||
(*) M Codes control the overall machine, causing it to stop, start, turn on colant, etc. Whereas other codes pertain to the path traversed by cutting tools. | |||
Different machine tools, however, may use the same code to perform different functions: even machines that use the same CNC control. Some may have said that "]" G-code is standard, but that is a myth. | Different machine tools, however, may use the same code to perform different functions: even machines that use the same CNC control. Some may have said that "]" G-code is standard, but that is a myth. |
Revision as of 13:17, 6 November 2005
G-code is a common name for the programming language that is used for NC and CNC machine tools. It is defined in EIA RS-274-D.
G-code is also the name of any word in a CNC program that begins with the letter G, and generally is a code telling the machine tool what type of action to perform, such as:
- rapid move
- controlled feed move in straight line or arc
- series of controlled feed moves that would result in a hole being drilled or bored
- change a pallet
- Set tool information such as offset.
There are other codes; the type codes can be thought of like registers in a computer
- X position
- Y position
- Z position
- M code (another "action" register or Machine code(*))
- F feed rate
- S spindle speed
- N line number
- R Radius
- T Tool selection
- I Arc data X axis
- J Arc data Y axis.
- K Arc data Z axis.
(*) M Codes control the overall machine, causing it to stop, start, turn on colant, etc. Whereas other codes pertain to the path traversed by cutting tools.
Different machine tools, however, may use the same code to perform different functions: even machines that use the same CNC control. Some may have said that "Fanuc" G-code is standard, but that is a myth.
G00 | Fast positioning |
G01 | Linear interpolation |
G02 | CW circular interpolation |
G03 | CCW circular interpolation |
G17 | X-Y plan selection |
G18 | X-Z plan selection |
G19 | Y-Z plan selection |
G20 | Programming in inches |
G21 | Programming in mm |
G33 | Constant pitch threading |
G34 | Variable pitch threading |
G40/G41/G42 | Tool radius compensation |
G90 | Absolute programming |
G91 | Incremental programming |
G94/G95 | Feed |
G96/G97 | Constant cutting speed/Constant rotation speed |
A standardized version of G-code known as BCL is used; but on very few machines.
G-code is understood by Gerber photoplotters, machine tool controls, and some machinists.
G-code files are output by CAM software such as Smartcam, Gibbscam, Featurecam, Edgecam, Mastercam, etc. G-code is also output by specialized CAD systems used to design printed circuit boards. Such software must be customized for each type of machine tool that it will be used to program.
Some CNC machines use "Conversational" programming, which is a wizard-like programming mode that either hides G-code or completely bypasses the use of G-code.
See also
External links
Template:Metalworking - CNC, CAD, and CAM