Common meanings of address characters
address | Function | meaning |
A | coordination word | Rotation around the X axis |
B | coordination word | Rotate around Y axis |
C | coordination word | Rotate around Z axis |
D | Pay number | Tool radius compensation control |
E | —— | Second power function |
F | Feed speed | Feed speed control |
G | Preparation function | Command action mode |
H | Pay number | Pay number order |
I | coordination word | X axis coordinate of arc center |
J. | coordination word | Y axis coordinate of arc center |
K | coordination word | Z axis coordinate of arc center |
L | Repeat times | The number of loops of fixed loops and subroutines |
Mr. | Accessibility | Machine tool on/off control |
address | Function | meaning |
N | Sequence number | Program Segment Sequence Number Command |
Oh | Program number | Designation of program number and subprogram number |
P. | —— | Pause time or sequence number from which a program function begins to be used |
Q | —— | Predefined end of cycle segment number or fixed distance in the predefined cycle |
A. | coordination word | Specifying a fixed distance or arc radius in a fixed cycle |
S | Pin function | Spindle rotation control |
T | Tool function | Tool number command |
u | coordination word | Incremental coordinate value of additional axis parallel to |
V | coordination word | Incremental coordinate value of additional axis parallel to Y |
W | coordination word | Incremental coordinate value of additional axis parallel to Z |
X | coordination word | Absolute coordinate on the X axis or pause time |
Yes | coordination word | Absolute coordinate of the Y axis |
Z | coordination word | Absolute Z axis coordinate |
Detailed explanation of FANUC CNC machining center programming instruction code
Auxiliary function M command
instruction | realization able | Instruction execution type |
M00 | The program stops |
Post-order |
M01 | The program chooses to stop | |
M02 | End of program | |
M03 | Spindle rotation forward | pre-directive |
M04 | Reverse pin | |
M05 | The spindle stops | Post-order |
M06 | Automatic tool exchange | pre-directive |
M08 | Cutting fluid on (or M07) | |
M09 | Cut off the liquid | Post-order |
M19 | Pin orientation | separate program section |
M29 | Rigid tapping | |
M30 | The program ends and returns | Post-order |
M63 | Chip removal begins |
separate program section |
M64 | Chip removal stops | |
M80 | Tool magazine feed | |
M81 | Tool Magazine Retreats | |
M82 | Published tool | |
M83 | Tool clamping | |
M85 | Tool magazine rotation | |
M98 | call a subroutine | Post-order |
M99 | Call subroutine to finish and return |
Note: There can only be one M instruction in a program segment. If two or more M instructions appear in a program, only the last M instruction is valid and the others are invalid!
Other instructions
1) F—Feed speed control
F and subsequent numbers indicate that when the command is G94, the unit is mm/min, and when the command is G95, the unit is mm/r.
2) S—Spindle speed control
S and following numbers indicate this, and the unit is r/min.
3) T—Tool control
T and the next three digits represent the tool number.
4) H and D: tool length compensation value and tool radius compensation value
H and D and the three digits following them indicate that the three digits are the memory address (number) where the tool compensation amount is stored.
Detailed explanation of G command code
1. Machine tool function settings
1. G53: select the machine tool coordinate system
Format: G53 XYZ (XYZ is the coordinate value of the machine tool)
Note: When the G53 command is specified, the radius compensation, tool length compensation, and tool offset value of the tool are cleared. Typically, the Z axis is specified when changing tools.
2. G54~G59: select the workpiece coordinate system
Note: After powering on and returning to the reference point, the system automatically selects G54.
3. G54.1 P1~P48—Select additional part coordinate system
4. G52—local coordinate system
Format: G52X Y Z;
Meaning of format: For ease of programming, the secondary coordinate system of the workpiece coordinate system is defined. The XYZ value in G52 is the position coordinate in the workpiece coordinate system G54~G59.
Override local coordinate system – G52 Set specified tool length compensation, tool radius compensation and other tool offset values.
5. G90-absolute programming
Absolute programming moves the tool a certain position away from the origin of the workpiece coordinate system.
6. G91—incremental programming
The distance traveled by the tool in incremental programming is calculated based on the previous point and corresponds to the increment of the previous point.
7. G21—mm inlet G20—inch inlet
8. G16—Enable polar coordinate command G15—Cancel polar coordinate command
2. Interpolation Function Instructions
1. G00—quick positioning command
Format: G00 XY Z;
Format meaning: The G00 command causes the tool to move from the current tool point to another point at the fastest speed in point control mode. The path does not necessarily consist of two points and a line, it can be a polyline.
Notes: (1) When the tool moves up and down: G00 XYZ; first set the XY plane, then the Z axis goes down. (2) When the tool moves from bottom to top: G00 Z; the X Y axis rises first, then defines the XY plane;
2. G01—Linear interpolation command
Format: G01 XYZF;
Meaning of the format: The G01 command causes the tool to move from the current point to the point specified according to the F command.
3. G02—clockwise interpolation, G03—counterclockwise interpolation
Format: G17 {G02 /G03}XY (R /IJ)F;
G18{G02 /G03}XZ(R /IK)F;
G19 {G02 /G03}YZ (R /JK )F;
Meaning of format:
Order content | instruction | meaning | |
Aircraft designation | G17 | Specify XY plane | |
G18 | Specify XZ plane | ||
G19 | Specify YZ plane | ||
direction of rotation | G02 | Turn clockwise | |
G03 | Counterclockwise | ||
final position | G90 fashion | 2 values in XYZ | The final position of the part coordinate system |
G91 fashion | 2 values in XYZ | The coordinate increment of the end point relative to the start point | |
Arc center coordinates | 2 value in IJK | The coordinate increment of the center of the circle relative to the starting point, regardless of G90 | |
arc radius | A. | Arc radius. Take a positive value when 0°<central angle 180°<, take a negative value when 180°≤central angle<360° | |
Feed speed | F | The speed of movement along the arc | |
Note:
1. It can be omitted when IJK is zero; in the same program, if IJK and R appear at the same time, R is valid.
2. When processing with R, the entire circle cannot be processed. The entire circle can only be programmed using the coordinates of the circle center IJ k.
3. Program pause command
1. G04—pause command
Format: G04 X or G04 P;
Meaning of the format: X followed by the extension time, the unit is s, followed by a decimal point. The number after P is an integer and the unit is ms.
4. Subroutine call instructions
1、M98 P × × ×;
Format meaning: P × × × refers to the subroutine number of the calling program. The 0 before the program cannot be omitted. It refers to the number of repeated calls.
2. The writing of the subroutine is basically the same as that of general programs, except that the end symbol of the program is M99, which indicates that the subroutine ends and returns M99 does not need to be an independent program segment and can be placed at the end of the last one. program segment.
5. Tool compensation instructions
1. G43, G44, G49—Tool Length Compensation Instructions
Format: G43 ZH; indicates the forward compensation of the tool length. The Z arrival distance on the Z axis is the specified value plus the H compensation value.
G44 ZH; represents the negative compensation of the tool length. The Z arrival distance on the Z axis is the specified value minus the H compensation value.
G49 Z or H00 means cancel tool length compensation.
Note: G43 G44 commands have nothing to do with G90 G91. The offset value corresponding to the H command can be negative or positive. When H is 0, tool length compensation is canceled. The value range of H value is 00 to 200.
Since the compensation value is between -999.999 and 999.999 mm or -99.9999 and 99.9999 inches and the sign of the compensation value changes, all work can be done using G43.
2. G41, G42, G40—Tool radius compensation instructions
Size: {G17 G18 G19}[G41 G42](G00 G01) (XY, XZYZ) DF ;
G40 G00 (G01)XYF ; or D00
Meaning of format: G17 G18 G19 is the selected plane.
Left tool radius compensation G41, right tool radius compensation G42 and tool radius compensation G40 are canceled.
Note:
1. When entering the tool radius compensation state from the no-cutter compensation state, or when canceling the tool radius compensation, the tool must move a certain distance, otherwise the tool will be directly compensated by a tool radius along the normal direction of movement, and the tool will have no rotation space and tool collision will occur. will produce.
2. When D is 0, tool radius compensation is canceled. The value range of D value is 0 to 200.
Because the compensation value varies from -999.999 to 999.999 mm or -99.9999 to 99.9999 inches.
3. The left and right compensation of the tool radius is judged according to the tool feed direction and the contour of the tool center. Especially when running G18 G19, pay attention to the left and right offset values of G41 and G42.
4. When executing G41, G42 and G40, movement instructions can only use G00 G01, but not G02 G03.
5. In order to ensure the integrity and smoothness of the contour, generally use: G41 G42 command for tool radius compensation → pass through the transition section (ring or straight line) → contour cutting → pass through the transition section (ring or straight line) → use G40 Cancel tool radius compensation.
6. When programming, if the program for introducing and canceling tool radius compensation is in the main program of the block (this must be done when processing the boss), then when the sub -program (machining contour program) is called more than once, it will be cut during the second cut. Overcutting may occur.
6. Canned Cycle Instructions
List of fixed-cycle instruction functions
G command | Drilling direction-Z | Lower action | Return +Z direction | to use |
G73 | intermittent feeding | move fast | High speed reciprocating chip drilling cycle for deep holes | |
G74 | cutting feed | Spindle: stop → forward rotation | cutting feed | Left reverse tapping cycle |
G76 | cutting feed | Spindle orientation stop → tool change | move fast | Fine boring cycle |
G80 | Cancel canned cycle | |||
G81 | cutting feed | move fast | Spot drilling, drilling cycle | |
G82 | cutting feed | Flow interrupted for several seconds | move fast | Drilling and step drilling cycle |
G83 | intermittent feeding | move fast | Reciprocating chip drilling cycle for deep holes | |
G84 | cutting feed | Spindle: stop → forward rotation | cutting feed | Forward rotation tapping cycle with right-hand thread |
G85 | cutting feed | cutting feed | Fine boring cycle | |
G86 | cutting feed | The spindle stops | move fast | Boring cycle |
G87 | cutting feed | Spindle rotation forward | move fast | Boring cycle |
G88 | cutting feed | Feed stops for a few seconds → spindle stops | Manual movement | Boring cycle |
G89 | cutting feed | Flow interrupted for several seconds | cutting feed | Precision step drilling cycle |
Canned-cycle instructions generally consist of six basic actions:
1. Action 1—Positioning the X and Y axes (starting point)
2. Action 2: quickly reach the plane of point R (position ready to cut)
3. Action 3: treatment of holes. Perform hole machining in cutting feed mode.
4. Action 4 – action at the bottom of the hole. Such as pause, spindle stop, tool change, etc.
5. Action 5—Return to plan R.
6. Action 6—Quickly return to initial state
Daguang focuses on providing solutions such as precision CNC machining services (3-axis, 4-axis, 5-axis machining), CNC milling, 3D printing and rapid prototyping services.


















