G-code and M-code
G代码与M代码
In plain words
The machine follows a list of short instructions, one per line: “go here fast”, “cut in a straight line to there”, “change tool”. That list is G-code. It is exactly what the machine is told to do, line by line.
What it is
The program a CNC machine runs (ISO 6983 family). G00 rapid move, G01 straight cut, G02/G03 arcs, G54 work offset, G43 tool length compensation; M03 spindle on, M06 tool change, M08 coolant on, M30 end. Dialects differ between controllers.
Why it matters for products
G-code is the exact record of what a machine was told to do, so it can be parsed for cycle-time estimates, verification and optimization; the real time also depends on feed overrides and stops at the machine.
Learn first
Opens the way to
- 42. Post-processor
- 43. Simulation and verification
- 58. Machine monitoring and data collection
- 71. CNC controller
- 72. Canned cycles and macro programming
- 73. Tool length and radius compensation
- 77. Feed-rate optimization
- 93. DNC and program management
- 101. Machine dynamics: acceleration, jerk and look-ahead
- 111. Prove-out: dry run and first-part run