May 18, 2024 Leave a message

Complete and detailed explanation of CNC machine tools (G Complete and detailed explanation of CNC machine tools (G code)code)

 

G00

Fast moving positioning

G00 X__Y__Z__;

G01

Linear interpolation mode

G01 X__Y__Z__;

Corner chamfer mode

G01 X__Y__C__;

G01 X__Y__;

C: The distance from the imaginary corner to the starting point or end point of chamfering cutting

Corner rounding mode

G01 X__Y__;

R: Arc radius of the corner, perform fillet chamfering at the intersection of the first and second programs.

straight angle mode

G17;

G01 A__X__(Y_);

A: The angle between the straight line and the first axis of the plane

X: X coordinate of the end point

GO2

Arc interpolation (clockwise)

G02 X__Y__R__F__;

R: arc radius

GO3

Circular interpolation (counterclockwise)

G03 X__Y__R__F__;

R: arc radius

GO4

pause

G04 X(U)__; or G04 P__;

XU: is followed by the specified pause time, and the subsequent value must have a decimal point, otherwise it is calculated as one thousandth of this value, and the unit is s;

P: Specify the time, no decimal point is allowed (that is, expressed as an integer), the unit is ms.

GO2.1

Involute interpolation (clockwise)

G02.1 X__Y__I__J__F__P;

IJ: Arc center coordinates

P: pitch number, number of revolutions

GO3.1

Involute difference compensation (counterclockwise)

G03.1 X__Y__I__J__F__P;

IJ: Arc center coordinates

P: pitch number, number of revolutions

GO2.3

Exponential function interpolation (forward rotation)

G02.3 X__Y__I__J__R__F__Q__I;

IJ: angle

R: fixed value

F: Initial feed speed

Q: End point feed speed

G03.3

Exponential function interpolation (inversion)

G03.3 X__Y__I__J__R__F__Q__ I;

IJ: angle;

R: fixed value;

F: Initial feed speed

Q: End point feed speed

G05

High-speed and high-precision controlⅠ

G05 P10000 high speed and high precision control opening

G05 P0 high-speed and high-precision control shutdown

G05 P3 high-speed machining on

G05 P0 high-speed machining closed

G05.1

High-speed and high-precision control II

G05.1 Q1 high-speed and high-precision control is on

G05.1 Q0 high-speed and high-precision control shutdown

G05.2 Q2 X0 Y0 Z0 Free-form surface high-precision mode is on

G05.1 Q0 free-form surface high-precision mode is turned off

G07.1

Cylindrical interpolation

G07.1 C__;

C: cylinder radius

G09

correct stop check

G10

Program parameter input/correction input

G90 G10 L2 P__Xp__Yp__Zp__;

G91

P: 0 External workpiece coordinates

1 G54

2 G55

3 G56

4 G57

5 G58

6 G59

When P: is a number other than 0~6, the value of P is regarded as 1. When P is omitted, it is regarded as the currently selected workpiece coordinate correction amount input.

G10 L10 P__R__;

P: correction number

R: Correction amount

G10 L10 P__ R__; long correction shape correction

G10 L11 P__ R__; long correction wear correction

G10 L12 P__ R__ ;Diameter shape correction

G10 L13 P__ R__; Diameter wear correction

G11

Program parameter input cancel

G12

Circular cutting CW

G12 I__D__F__;

I: Radius of circle (incremental value)

D: correction number

① Cut from the center of the circle

②Approximate the contour in an arc way

③Milling arc path

G12.1

Polar coordinate interpolation mode starts

G13

Circular cutting CCW

G13 I__D__F__;

I: Radius of circle (incremental value)

D: correction number

G13.1

Polar coordinate interpolation mode canceled

G15

Polar coordinate command canceled

G15 cancels G16 polar coordinate command

G16

Polar coordinate command is valid

N1005 G16;

N1010 G90 G01 X__Y__;

N2000 G15;

Among them, X__ in the N1010 sentence represents the polar coordinate radius, and Y__ represents the angle.

G17

Plane selection X-Y

Milling M36*0.75 thread

Example: This example assumes that the thread center point is (0, 0); the thread cutter diameter is 33.244.

G00 G90 G80 G40 G49 G54 X0. Y0.;

S4000 M13;

G00 G43 H2 Z50.;

Z10. G01 Z0. F800.;

G41 D__;

G02 Y1.378 J0.689 F600.;

G17;

G02 Z-15. J-1.378 P20. F600.;

G02 Y0. J-0.689;

G00 Z80.;

G40;

M05;

M09;

M30;

First use a milling cutter with the same diameter as the thread cutter to program, obtain the Y, J values, and X, Y coordinate values, and then substitute them into the above program example

G18

Plane selection X-Z

G19

Plane selection Y-Z

G20

British instructions

G21

Metric instructions

G27

Reference origin check

G28

Return to reference origin

G28 X__ Y__ Z__;

G29

Start point reset

G29 X__ Y__ Z__;

G30

Return to the 2nd to 4th reference origin.

G30 P2(P3,P4) X__ Y__ Z__;

G30.1

Reset tool position 1

G30.2

Reset tool position 2

G30.3

Reset tool position 3

G30.4

Reset tool position 4

G30.5

Reset tool position 5

G30.6

Reset tool position 6

G31

jump

G31.1

Jump 1

G31.2

Jump 2

G31.3

Jump 3

G32

Thread cutting (normal lead)

G32 Z__F__Q__;

Z: thread cutting direction axis address and thread length;

F: Lead in the direction of the long axis (the axis with the largest amount of movement)

Q: Thread cutting start displacement angle (0~360°)

G33

Thread cutting (precision lead - inch thread)

G33 Z__E__Q__;

Z: Thread cutting direction axis address and thread length

E: Lead in the direction of the long axis (the axis with the largest amount of movement), the number of teeth contained in 1 inch

Q: Thread cutting start displacement angle (0~360°)

G34

Circular arrangement hole cycle

G34 X__Y__I__J__K__;

XY: Center position of the circumferential hole cycle

I: circle radius, expressed as a positive number

J: The angle of the initial drilling point, counterclockwise is positive

K: Number of drilling holes, range 1~9999, cannot be 0, counterclockwise direction is positive, clockwise direction is negative

G35

Linear Angle Arranged Hole Cycle

G35 X__Y__I__J__K;

XY: coordinates of the starting point, affected by G90/G91

I: Interval, the straight-line distance between two holes

J: Angle, the angle between the array direction and the X-axis, the counterclockwise direction is positive

K: The number of holes (including the starting point), the setting range is 1~9999 

 

G36

Arc arrangement hole cycle

G36 X__Y__I__J__P__K__;

XY: Arc center coordinates

I: arc radius

J: The angle of the initial drilling point, counterclockwise is positive

P: angle interval

K: number of holes

G37

Automatic tool length measurement

G37 Z__R__D__F__;

Z: Measuring axis position and coordinate value of the measured position

R: The distance from the point starting to move at the measurement speed to the measurement position

D: Tool stop range limitation

F: Measurement speed

G37.1

Checkerboard arrangement hole loop

G37.1 X__Y__I__P__J__K__

XY: starting point coordinates

I: X-axis interval

P: The number in the X-axis direction. Specify range 1~9999

J: Y-axis interval

K: The number in the Y-axis direction

G38

Tool radius compensation vector designation

G38 I__J__;

Only used in diameter correction mode

G39

Tool radius correction Corner arc correction

G39 X__ Y__

Only used in diameter correction mode

G40

Tool radius correction Cancel

G41

Tool diameter correction left

G42

Tool diameter correction right

G40.1

Normal Control Cancel

G40.1 X__Y__F__;

G41.1

Normal control left effective

G41.1 X__Y__F__;

G42.1

Normal control right effective

G42.1 X__Y__F__;

G43

Tool length setting (+)

G43 Z__H__;

…;

G49 Z__;

G44

Tool length setting (-)

G44 Z__H__;

…;

G49 Z__;

G49

Tool length setting Cancel

G43.1

1st spindle control valid

G44.1

2nd spindle control valid

G45

Tool position setting (expansion)

G45 X__D__;

Use the correction amount set in the correction amount memory area to calculate the elongation in the moving direction.

G46

Tool position setting (zoom out)

G46 X__D__;

Use the correction amount set in the correction amount memory area to reduce the amount of movement in the direction.

G47

Tool position setting (double)

G47 X__D__;

The elongation in the moving direction is calculated as twice the correction amount set in the correction amount memory area.

G48

Tool position setting (halved)

G48 X__D__;

The reduction amount in the moving direction is calculated as twice the correction amount set in the correction amount memory area.

G47.1

Simultaneous control of 2 spindles is valid

G50

Scale Cancel

G51

Scaling is valid

G51 X__Y__Z__P__;

XYZ: scaled center coordinates

P: Proportional zoom magnification

G50.1

G command mirror cancel

G50.1 X0;

G50.1 Y0;

G50.1 Z0;

Whichever axis is canceled will be entered after G50.1.

G51.1

G command image is valid

G51.1 X0;

G51.1 Y0;

G51.1 Z0;

Which axis is mirrored is input after G51.1

G52

Local coordinate system settings

G53

Mechanical coordinate system selection

G54

Workpiece coordinate system 1 selection

G55

Workpiece coordinate system 2 selection

G56

Workpiece coordinate system 3 selection

G57

Workpiece coordinate system 4 selection

G58

Workpiece coordinate system 5 selection

G59

Workpiece coordinate system 6 selection

G54.1

Workpiece coordinate system selection expanded to 48 groups

G60

One-way positioning

G60 X__Y__Z__;

G61

Correct stop check mode

G61.1

High speed and high precision control

G61.1 X__Y__F__;

G62

Automatic corner feedrate adjustment

G63

Tapping mode

Cutting percentage is fixed at 100%

Feed hold is invalid

Single block stop is invalid

G63.1

Simultaneous tapping mode (forward tapping)

G63.2

Simultaneous tapping mode (reverse tapping)

G64

Cutting mode

G65

User Macro Single Call

G66

User Macro Status Call A

G66.1

User Macro Status Call B

G67

User Macro Status Call C

G68

Coordinate rotation valid

G17 G68 X0 Y0 R__;

R: Rotation angle, counterclockwise is positive, range -360.000~+360.000

G69

Coordinate rotation Cancel

G70

user canned loop

G71

user canned loop

G72

user canned loop

G73

Fixed cycle (step cycle)

G73 X__Y__Z__R__F__S__Q__;

XYZ: hole location data

Q: Try your best

R: R point

F: Feed speed

S: spindle speed

G74

Fixed cycle (reverse tapping)

G74 X__Y__Z__R__Q__F__S__X__Y__;

Z: hole location data

R: R point

Q: step amount

F: Feed speed

S: spindle speed

The values of F and S are: speed * pitch = feed

G75

user canned loop

G76

Fixed cycle (precision boring)

After the X and Y axes are positioned, the Z axis moves quickly to point R, and then feeds to point Z at the speed given by F. Then the spindle is oriented and moves a certain distance in the given direction, and then quickly returns to the initial point or point R. Afterwards, the spindle rotates at the original speed and direction.

Note: Pay attention to check whether the direction of the tool tip after spindle orientation meets the requirements.

G77

user canned loop

G78

user canned loop

G79

user canned loop

G80

Canned cycle cancel

G81

Fixed cycle (drilling/lead hole)

G8?(G7?) X_Y_Z_R_Q_P_F_L_S_, S_, I_, J_;

G8?(G7?) X_Y_Z_R_Q_P_F_L_S_, R_, I_, J_;

G8? (G7?): Hole machining mode

XYZ: hole location data

RQPF: hole machining data (R: refers to R point Q: specification of each cutting amount, incremental value input

P: Pause time, add WeChat: Yuki7557 and receive a macro program tutorial

F: drilling speed or thread pitch)

L: number of repetitions

S: spindle rotation speed

R: Spindle rotation speed during synchronization switching or recovery

I: Position positioning axis positioning width

J: Drilling axis positioning width

G82

Fixed cycle (drilling/counting boring)

G82 X__Y__Z__R__F__P__;

P:pause time

G83

Fixed cycle (deep hole drilling)

G83 X__Y__Z__R__Q__F__;

Q: Each cutting amount, incremental input

G84

Fixed cycle (tapping) Mitsubishi system

G84 X__Y__Z__R__F__P__;

F: pitch

P: Pause time

Fixed cycle (tapping) Frank system, etc.

G84 X__Y__Z__R__F__S__;

XYZ: hole location data

R: R point

F: Feed speed

S: spindle speed

The values of F and S are: speed * pitch = feed

G85

Fixed cycle (boring in and boring out)

The canned cycle is very simple and the execution process is as follows:

X and Y axis positioning, Z axis quickly reaches point R, feeds to point Z at F speed, and returns to point R at F speed.

G86

Fixed cycle (boring)

The execution process of this canned cycle is similar to G81. The difference is that in G86, the spindle stops when the tool feeds to the bottom of the hole.

Quickly return to point R or the initial point and then rotate the spindle

G87

Fixed cycle (back boring)

In the G87 cycle, after the X and Y axes are positioned, the spindle is oriented, the X and Y axes move in the specified direction by the distance given by the processing parameter Q, and move to the bottom of the hole (point R) at a rapid feed speed, and the X and Y axes recover. At the original position, the spindle rotates at a given speed and direction, the Z axis feeds to the Z point at a speed given by F, and then the spindle is oriented again, and the X and Y axes move in the specified direction by the distance specified by Q to rapidly feed. The speed returns to the initial point, the X and Y axes return to their positioning positions, and the spindle begins to rotate.

Notes are the same as G76

G88

Fixed cycle (boring)

G88 is a canned cycle for boring with manual return function

G89

Fixed cycle (boring)

G90

Absolute value instructions

G90 X__Y__Z__;

G91

incremental value command

G91 X__Y__Z__;

G92

Mechanical coordinate system setting

G92 S__Q__;

S: Maximum clamping speed;

Q: Minimum clamping speed

G92.1

Workpiece coordinate system setting

G93

Counter time feed

G94

Non-synchronous feed (feed per minute)

G95

Synchronous feed (feed per revolution)

G96

Weekly speed customized control is effective

G96 S__P__;

S: Weekly speed

P: Peripheral speed must be controlled to specify the axis

G97

Zhousu One Custom Control Cancel

G98

Fixed cycle starting point return

G99

Fixed cycle R point return

G113

Spindle synchronization control cancel

G114.1

Spindle synchronization control valid

G114.1 H__D__R__A__;

H: Basic spindle selection

D: Synchronous spindle selection

R: Synchronous spindle phase offset amount

A: Spindle synchronization acceleration and deceleration time constant

 

 

Send Inquiry

whatsapp

skype

E-mail

Inquiry