LNC Technology LNC-Lathe Programming Manual

Page 1
LNC-Lathe Series
Prr
o
o
grr
g
a
a
m
m
mii
m
Leading Numerical Controller
n
n
g
g
M
M
a
n
n
u
u
a
2007/12 VerV04.00.003
all
a
LNC Technology Co., Ltd.
LNC Technology Co., Ltd. 1
Page 2
Page 3
LNC Lathe
Table of Content
Table of Content
1 G-CODE FUNCTION TABLE....................................................................1
2 GENERAL M-CODE FUNCTION TABLE.................................................5
3 SYNTAX OF G CODE...............................................................................7
G00: Positioning in rapid....................................................................................................................7
G01: Linear interpolation....................................................................................................................9
G02, G03: Circular interpolation (cw./ccw.).......................................................................................10
Direct pattern making.......................................................................................................................12
G04: Dwell.......................................................................................................................................23
G09: Exact stop................................................................................................................................24
G10: Data setting.............................................................................................................................25
G20, G21: Inch \ mm input................................................................................................................27
G22, G23: Stored stroke check ON / OFF.........................................................................................28
G27: Reference position return check...............................................................................................29
G28: 1st reference position return.....................................................................................................30
G29: From 1st reference position return............................................................................................31
G30: 2nd,3rd,4th, reference position return.......................................................................................32
G31: Skip function............................................................................................................................34
G33: Thread cutting..........................................................................................................................36
G34: Variable Thread Pith Threading................................................................................................38
Continuous Threading......................................................................................................................40
G40, G41, G42: Tool nose radius compensation...............................................................................45
G53: Machine coordinate system......................................................................................................47
G54 ~ G59: Selection of work coordinate system..............................................................................49
G61, G64: Exact stop mode / Cutting mode......................................................................................51
G65: User macro simple call.............................................................................................................52
G66: User macro modal call.............................................................................................................54
G67: User macro modal call cancel..................................................................................................55
G68: Mirror image for double turrets ON...........................................................................................56
G69: Mirror image for double turrets OFF.........................................................................................56
G70: Finishing Cycle........................................................................................................................58
LNC Technology Co., Ltd. I
Page 4
LNC Lathe
G-Code Function Table
G71: Stock removal in turning...........................................................................................................59
G72: Stock removal in facing............................................................................................................61
G73: Pattern repeating.....................................................................................................................63
G74: End face peck drilling cycle (Z axis).........................................................................................65
G75: Outer diameter / Internal diameter drilling cycle (X axis)...........................................................66
G76: Multiple thread cutting cycle.....................................................................................................67
G77: Outer diameter/internal diameter cutting cycle..........................................................................69
G78: Taper thread cutting cycle........................................................................................................70
G79: End face turning cycle..............................................................................................................75
G80: Canned cycle for drilling cancel................................................................................................76
G83: Face drilling cycle....................................................................................................................77
G84: Face tapping cycle...................................................................................................................81
G85: Face boring cycle.....................................................................................................................83
G87: Side drilling cycle (X axis)........................................................................................................85
G88: Side tapping cycle (X axis).......................................................................................................89
G89: Side boring cycle (X axis).........................................................................................................92
G187: Side drilling cycle (Y axis)......................................................................................................94
G188: Side tapping cycle (Y axis).....................................................................................................98
G189: Side boring cycle (Y axis).....................................................................................................100
G90, G91: Absolute / Incremental programming..............................................................................102
G92: Coordinate system setting or max. spindle speed setting........................................................103
G94, G95: Feed per minute (mm/min), Feed per revolution (mm/rev)..............................................104
G96, G97: Constant surface speed control ON / OFF.....................................................................105
G98, G99: Intial point return / R point return....................................................................................106
4 AUXILIARY FUNCTION (M CODE)......................................................107
5 MACRO.................................................................................................112
5.1 Macro program introduction.....................................................................................................112
5.2 User macro call.......................................................................................................................113
5.3 Difference between macro program call (G65) and general subprogram call (M98)..................118
5.4 MACRO function list................................................................................................................119
5.5 Variable...................................................................................................................................120
5.6 Mathematics command............................................................................................................130
5.7 Logic command.......................................................................................................................131
II LNC Technology Co., Ltd.
Page 5
Table of Content
5.8 Compare command.................................................................................................................132
5.9 Procedures control command..................................................................................................133
5.10 Function..................................................................................................................................134
5.11 Note........................................................................................................................................136
LNC Lathe
LNC Technology Co., Ltd. III
Page 6
Page 7
LNC Lathe
G-Code Function Table
1 G-Code Function Table
Function Group TYPE A TYPE B TYPE C Positioning in rapid 01 G00 G00 G00 Linear interpolation 01 G01 G01 G01 Circular interpolation (cw.) 01 G02 G02 G02 Circular interpolation (ccw.) 01 G03 G03 G03 Dwell 00 G04 G04 G04 Exact stop 00 G09 G09 G09 Data setting 00 G10 G10 G10 ARC Plane Setting 02 G17~19 G17~19 G17~19 input in inch 06 G20 G20 G70 input in mm 06 G21 G21 G71 Stored stroke check ON 09 G22 G22 G22 Stored stroke check OFF 09 G23 G23 G23 Reference position return check 00 G27 G27 G27 1st reference position return 00 G28G29 G28G29 G28G29 2nd,3rd,4th, reference position return 00 G30 G30 G30 Skip function 00 G31 G31 G31 Thread cutting 01 G32 G33 G33 Variable Thread Pith Threading 01 G34 G34 G34 Tool nose radius compensation Cancel 07 G40 G40 G40 Tool nose radius compensation Left 07 G41 G41 G41 Tool nose radius compensation Right 07 G42 G42 G42 Machine coordinate system 00 G53 G53 G53 Selection of work coordinate system 14 G54 ~G59 G54 ~ G59 G54 ~ G59 Exact stop mode 15 G61 G61 G61 Cutting mode 15 G64 G64 G64 User macro simple call 00 G65 G65 G65 User macro modal call 12 G66 G66 G66 User macro modal call cancel 12 G67 G67 G67 Mirror image for double turrets ON 16 G68 G68 G68
LNC Technology Co., Ltd. 1
Page 8
LNC Lathe
Outer diameter / Internal diameter drilling cycle
Coordinate system setting or max. spindle
G-Code Function Table
Function Group TYPE A TYPE B TYPE C Mirror image for double turrets OFF 16 G69 G69 G69 Finishing Cycle 00 G70 G70 G72 Stock removal in turning 00 G71 G71 G73 Stock removal in facing 00 G72 G72 G74 Pattern repeating 00 G73 G73 G75 End face peck drilling cycle (Z axis) 00 G74 G74 G76
00 G75 G75 G77 (X axis) Multiple thread cutting cycle 00 G76 G76 G78 Outer diameter/internal diameter cutting cycle 01 G90 G77 G20 Taper thread cutting cycle 01 G92 G78 G21 End face turning cycle 01 G94 G79 G24 Canned cycle for drilling cancel 10 G80 G80 G80 Face drilling cycle 10 G83 G83 G83 Face tapping cycle 10 G84 G84 G84 Face boring cycle 10 G85 G85 G85 Side drilling cycle (X axis) 10 G87 G87 G87 Side tapping cycle (X axis) 10 G88 G88 G88 Side boring cycle (X axis) 10 G89 G89 G89 Absolute programming 03 - G90 G90 Incremental programming 03 - G91 G91
00 G50 G92 G92 speed setting Feed per minute (mm/min) 05 G98 G94 G94 Feed per revolution (mm/rev) 05 G99 G95 G95 Constant surface speed control ON 02 G96 G96 G96 Constant surface speed control OFF 02 G97 G97 G97 Intial point return 11 - G98 G98 R point return 11 - G99 G99 Side drilling cycle (Y axis) 10 187 187 187 Side tapping cycle (Y axis) 10 188 188 188 Side boring cycle (Y axis) 10 189 189 189
2 LNC Technology Co., Ltd.
Page 9
Function Group TYPE A TYPE B TYPE C
NoteThe TYPE is A, B or C to decide on the Pr153, default is TYPE B.
LNC Lathe
G-Code Function Table
LNC Technology Co., Ltd. 3
Page 10
Page 11
General M-Code Function Table
2 General M-Code Function Table
M Code Function Remark
M00 Program stop CNC M01 Optional stop CNC M02 End of program CNC M03 Spindle CW M04 Spindle CCW M05 Spindle stop
LNC Lathe
Txx Auto tool change
xxTool no. M08 Coolant ON M09 Coolant OFF M10 Chuck clamp M11 Chuck unclamp M30 Program rewind CNC M98 Calling of subprogram CNC M99 End of subprogram CNC
LNC Technology Co., Ltd. 5
Page 12
Page 13
Y Z
3 Syntax of G code
G00: Positioning in rapid
Format:
Argument:
G00 X___ Y___ Z___ C___;
LNC Lathe
Syntax of G code
X__ Y__ Z__ C__
Action:
The function of G00 command is to make the tool move to the position of the specified coordinate rapidly.
When using G00, the speed of moving is not descided by the format of F__, but by setting values of parameter 1000 ~ 1003. Meanwhile, the rapid traverse adjustment knob can be used to adjust the percentage of speed. (F0, 25%, 50%, 100%)
Illustration:
: For G90, the coordinate of an end point in absolute command.
For G91, the coordinate of an end point in Incremental command.
Target
Start
X
Tool path
Note:
Regarding G00 movement command, the movement of each servo axis is independent. The movement speed of each axis is specified by parameters respectively. Operators should be especially careful lest the tool may collide with the workpiece.
LNC Technology Co., Ltd. 7
Page 14
LNC Lathe
axis does not exceed
Moving speed of each axis does not exceed
Moving speed of each axis does not exceed
Syntax of G code
Methods of determing G00 simultaneously interpolated feed rate
None dry run
mechanism
Dry run mechanism
paremeter 0083 is 0
Dry run mechanism
paremeter 0083 is 1
Remark 1 Under this condition, Override depends on rapid traverse percentage. Remark 2 Under this condition, Override depends on cutting feed percentage.
G00 command or commands with same
function under MEM, MDI modes
Moving speed of each respectively set G00 speed (Remark 1)
respectively set JOG speed (Remark 2)
respectively set G00 speed
G00, G53 command of PMC axis function
Moving speed of each axis does not exceed respectively set G00 speed
C23 is OFF: Moving speed of each axis does not exceed respectively set JOG speed
C23 is ON: Moving speed of each axis does not exceed respectively set G00 speed
Moving speed of each axis does not exceed respectively set G00 speed
8 LNC Technology Co., Ltd.
Page 15
G01: Linear interpolation
Format:
Argument:
X___, Z___ : For G90, the coordinate of an end point in absolute command.
U___, W___ : For G90/G91, the coordinate of an end point in Incremental
F___ : Feedrate.
Action:
G01 depends on the interpolation feed rate specified by F code, starts from current tool position, to
Syntax of G code
G01 X(U)___ Z(W)___ F___;
For G91, the coordinate of an end point in Incremental command.
command.
LNC Lathe
cut in a linear path to the end. Axes which are not specified do not move. Actual cutting feed can be adjusted by the continuous feed rate adjustment knob at any time (0%-150%).
Max interpolation feed rate of G01 is specified by system parameter 1004. Acc/Dec time of G01 is specified by system parameter 0014.
Illustration:
G91 G92 X100. Z100.; G01 X10. Z10. F50;
(100,100)
G90 G92 X100. Z100.; G01 X10. Z10. F50;
(110,110)
(100,100)
G92 X100. Z100.; G01 U10. W10. F50;
(110,110)
(100,100)
G90 G92 X100. Z100.; G01 X10. F50;
(100,100)
(10,10)
(10,100)
LNC Technology Co., Ltd. 9
Page 16
LNC Lathe
Syntax of G code
G02, G03: Circular interpolation (cw./ccw.)
Format:
G02
 
G03
 
Argument:
X___, Z___ : For G90, the coordinate of an end point in absolute command.
For G91, the coordinate of an end point in Incremental command.
U___, W___ : For G90/G91, the coordinate of an end point in Incremental
command. R___ : Arc radius. (R>0, Arc<=180°. R<0. Arc>180°) I___ : Xp axis distance from start point to the center of an arc. Xp is a
I__K__
Z(W)__X(U)__
R__
;F__
 
Action:
component in X direction. K___ : Zp axis distance from start point to the center of an arc. Zp is a
component in Z direction.
F___ : Feedrate.
Pay attention to current tool position. The end point and the center of circle should be in the same circle. If not, the controller emits an error signal INT 132. When R___, I___, and K___ of the program are all written-in, system will depends only on the setting of R___.
System parameter 132 (XRC) defines if X (U) position is radius-specified or diameter-specified. Radius-specified (XRC=1) and diameter-specified (XRC=0) differ in 2 times of the actual movement amount of X axis. E.g. The movement amount of radius-specified U-10 is equal to diameter-specified U-20.
End point
+X
G
0
3
Starting point
+X
G
0
2
G
0
3
I
Centre
K
+Z
Centre
+Z
10 LNC Technology Co., Ltd.
Page 17
Illustration:
The following 4 figures have the same cutting path of a clockwise cutting of a 1/4 circle, and the radius is 5.
LNC Lathe
Syntax of G code
(In radius programming)
G91 G92 X100. Z100.; G02 X-5. Z5. I-5. K0. F50;
(100,100)
(In diameter programming)
G91 G92 X100. Z100.; G02 X-10. Z5. I-5. K0. F50;
(100,100)
(90,100)
(90,100)
(In radius programming)
G90 G92 X100. Z100.; G02 X95. Z105. I-5. K0. F50;
(100,100)
(90,100)
(In diameter programming)
G90 G92 X100. Z100.; G02 X90. Z105. I-5. K0. F50;
(100,100)
(90,100)
LNC Technology Co., Ltd. 11
Page 18
LNC Lathe
Syntax of G code
Direct pattern making
In order to make the manufacturing of workpieces easier, the controller provides functions of making corner chamfering (,C_), corner rounding (,R_) and angle of straight line (A_).
1. Chamfering ,C_
Continuous 2 blocks of command. In the 1st block, C_ sets up chamfer length between the 2 blocks. It is applicable also when the previous and next blocks are circular commands.
Format:
G01
 
G02
 
G03
G01
 
G02
 
G03
   
 
  
C__; , Z__X__
Z__;X__
Example:
X
X
(80,10)
End point of
1st block
,C_
Z
(80,40)
C10
(20,40)
Z
G00 X20.0 Z40.0 G01 X80.0,C10.0 F100.0 G01 Z10.0
12 LNC Technology Co., Ltd.
Page 19
LNC Lathe
Z
Syntax of G code
2. Corner Rounding ,R_
Continuous 2 blocks of command. In the 1st block,,R_ sets up the radius of the rounding corner linking the 2 blocks. It is applicable also when the previous and next blocks are circular commands.
Format:
G01
 
G02
 
G03
G01
 
G02
 
G03
   
R__; , Z__X__
 
Z__;X__
 
X
Example:
G00 X20.0 Z0.0 G02 X20.0 R10.0,R3.0 F100.0
X
(20,0)
,R_
R10
(20,20)
Z
(20,30)
G01 Z30.0
LNC Technology Co., Ltd. 13
Page 20
LNC Lathe
Syntax of G code
3. Angle of Straight Line A_
When applying linear interpolation command G01, only the positions of X_ or Z_ and the angle of the line A_ can be specified. The actual position of the corresponding end point will be calculated by the controller. It is especially convenient when the manufacturing drawing provides only coordinates of X or Z directions and angles.
Format:
Wherein A_ angle is calculated from the horizontal direction (Z axis). A positive value of A represents a counterclockwise direction, and vice versa.
G01
X__
 
Z__
A__;
 
Example:
X
A+
X
(X, Z)
(10,10)
27°
Z
X
A-
(X, Z)
Z
(20, ??)
Z
G00 X10.0 Z10.0 G01 X20.0 A27.0 F100.0
14 LNC Technology Co., Ltd.
Page 21
LNC Lathe
Z X
Syntax of G code
4. Geometric input function
In a manufacturing drawing, it is often that angles are provided, but not correct cutting positions; or that only the size of corner or round corner is provided when making a corner. Therefore the calculation of the coordinates of the intermediate point can be inconvenient when transforming the data to linear and circular cutting command while compiling a manufacturing program. This function makes compiling programs more easily, and help avoid calculation errors.
l Type 1
Intersection point of 1st and 2nd blocks is unknown Angles of 1st and 2nd blocks are known End point coordinates are known
Format:
N01 G01 Aa
1
N02 G01 Xx3 Zz3 Aa2
a
N01
1
a
2
N02
(x1, z1)
(x3, z3)
LNC Technology Co., Ltd. 15
Page 22
LNC Lathe
X
Z
a2
a1 ?
Syntax of G code
Example:
G00 X0.0 Z0.0 G01 A30.0 G01 X10.0 Z30.0 A-45.0
Coordinates of intermediate point are unknown
-45°
l Type 2
Format:
30°
(10,30)
Intersection point of 1st and 2nd blocks is unknown Angles of 1st and 2nd blocks are known End point coordinates are known Corner of 1st and 2nd blocks is chamfer or fillet
N01 G01 Aa1,Cc1 (,Rr1)
N02 G01 Xx3 Zz3 Aa2
X
(z3,z3)
N02
C1 or r1
N01
(z1,z1)
Z
16 LNC Technology Co., Ltd.
Page 23
X
a2
a1 ?
a3
l Type 3
Format:
Either X_ or Z_ of the intersection point of 1st and 2nd blocks is known Intersection point of 2nd and 3rd blocks is unknown Coordinates of end point of 3rd block are known Angles of 1st, 2nd and 3rd blocks are known
N01 G01 Xx2(Zz2) Aa1 N02 G01 Aa2 N03 G01 Xx4 Zz4 Aa3
LNC Lathe
Syntax of G code
(z4,z4)
N03
N02
(z2,z2)
N01
Z
LNC Technology Co., Ltd. 17
Page 24
LNC Lathe
X
C1 or r1
a2
a1 ?
a3
Syntax of G code
l Tyep 4
Intersection point of 1st and 2nd blocks is known Intersection point of 2nd and 3rd blocks is unknown Coordinates of end point of 3rd block is known Angles of 1st, 2nd and 3rd blocks are known Corner of 1st and 2nd blocks is chamfer or fillet
N01 G01 Xx2(Zz2) Aa
1
Format:
(z4,z4)
N02 G01 Aa N03 G01 Xx4 Zz
N03
N02
(z2,z2)
2
4 Aa3
N01
Z
18 LNC Technology Co., Ltd.
Page 25
a2
?
X
l Type 5
Intersection point of 1st and 2nd blocks is unknown Intersection point of 2nd and 3rd blocks is known Coordinates of end point of 3rd block are known Angles of 1st and 2nd blocks are known Corner of 1st and 2nd blocks is chamfer or fillet Corner of 2nd and 3rd blocks is chamfer or fillet
N01 G01 Xx2 Zz2 ,Cc
1
(,Rc1)
LNC Lathe
Syntax of G code
N02 G01 Aa N03 G01 Xx3 Zz
2
3 Aa1
Format:
(z4,z4)
(z3,z3)
N03
C2 or r2
N02
C1 or r1
a
1
N01
Z
Note:
1. The following G codes can not be in the same block with geometric input commands, or be used to input pattern size of continuous shapes.
a. G codes of Group 00 (excluding G04) b. G02, G03, G90, G92, G94 of Group 01
2. Only be effective under MEM Mode
3. Fillet command can not be used in thread-cutting blocks.
4. When applying G01 X_ A_, if angle value is 0∘±1, 180∘±1, then the command is ineffective.
5. When applying G01 Z_ A_, if angle value is 90∘±1, 270∘±1, then the command is ineffective.
6. If the angle between 2 lines is within +1, chamfering and filleting will be ignored.
LNC Technology Co., Ltd. 19
Page 26
LNC Lathe
2
, Z2
A
1
R
Syntax of G code
Table of usages of geometric commands
1
X2 (Z2_) A
A1
2
X3 Z3 A2
Command Illustration
(X2, Z2)
(X1, Z1)
(X3, Z3)
A
2
(X2, Z2)
A
(X1, Z1)
A
1
X2 Z2 ,R1 X3 Z3
3
or A1 ,R1
X3 Z3 A2
(X3, Z3)
(X
A
2
)
(X1, Z1)
20 LNC Technology Co., Ltd.
Page 27
LNC Lathe
Syntax of G code
X2 Z2 ,C1 X3 Z3
4
or A1 ,C1
X3 Z3 A2
X2 Z2 ,R1 X3 Z3 ,R2 X4 Z4
5
or A1 ,R1
X3 Z3 A2 ,R2 X4 Z4
(X4, Z4)
R
2
(X3, Z3)
C
1
(X3, Z3)
(X2, Z2)
A
2
(X2, Z2)
A
2
A
(X1, Z1)
R
1
(X1, Z1)
1
A
1
X2 Z2 ,C1 X3 Z3 ,C2 X4 Z4
6
or A1 ,C1
X3 Z3 A2 ,C2 X4 Z4
X2 Z2 ,R1 X3 Z3 ,C2 X4 Z4
7
or A1 ,R1
X3 Z3 A2 ,C2 X4 Z4
(X4, Z4)
(X4, Z4)
C
2
(X2, Z2)
C
2
C
1
(X3, Z3)
(X3, Z3)
A
2
(X2, Z2)
A
2
R
1
(X1, Z1)
A
(X1, Z1)
A
1
1
LNC Technology Co., Ltd. 21
Page 28
LNC Lathe
Syntax of G code
R
2
(X3, Z3)
A
X2 Z2 ,C1 X3 Z3 ,R2 X4 Z4
(X4, Z4)
8
or A1 ,C1
X3 Z3 A2 ,R2
C
1
(X2, Z2)
A
1
(X1, Z1)
X4 Z4
22 LNC Technology Co., Ltd.
Page 29
G04: Dwell
Format:
Argument:
X___ : Specify a time. Unit: sec. Range: 0.001 ~ 99999.999. P___ : Specify a time. Unit: ms. No decimal poiint. Range: 1 ~ 99999999.
Action:
Dwell action; set up dwell time after G04; when the time is over, next block will be executed automatically.
G04 X___; G04 P___;
LNC Lathe
Syntax of G code
Example:
G04 X100.;------------------------------------------------------- 100 sec G04 P100;---------------------------------------------------------0.1 sec G04;------------------------------------------------------ Exact stop (G09)
LNC Technology Co., Ltd. 23
Page 30
LNC Lathe
;
Syntax of G code
G09: Exact stop
Format:
Argument:
G09 is a command used along with the exact stop of cutting. When using G09, system checks positioning degrees after executing every positioning command. After making sure statuses of positioning comply with settings, system continues executing next block. Therefore, if cutting positioning exists between blocks, there might be a little interruption due to the demanding of the precision of positioning point. Speed is sacrificed for a higher shape precision. The degree of
__01G
 
09G
 
 
__02G
 
__03G
precision is specified by parameters 0006 ~ 0009. The function of G09 only takes effect within its block.
Example:
G91 G09 G01 Y100. F200.;-------------------------------------------------------------------------------------- (1) G01 X100.;----------------------------------------------------------------------------------------------------------- (2)
Illustration:
2
Tool path in G09
1
Tool path in non-exact stop
24 LNC Technology Co., Ltd.
Page 31
:
:
:
:
G10: Data setting
Format 1:
Format 2:
Format 3:
Argument of format 1:
P___ : No. of compensation.
G10 P 1~30 X_ (U_) Z_ (W_) R_ (C_) Q_;
G10 P 101~130 X_ (U_) Z_ (W_) R_ (C_) Q_;
G10 P 154~159 X Z
LNC Lathe
Syntax of G code
P1~30 are the values of no. 1~30 tool wear compensation. X___ Z___ U___ W___ Q___ : Tool type. Types are shown below figure. R___ : The value of tool nose wear compensation. (Absolute) C___ : The value of tool nose wear compensation. (Increment)
Argument of format 2:
P___ : No. of compensation. P101~130 are the values of no. 1~30 tool length compensation. X___ Z___ U___ W___
:
The value of tool wear compensation of X axis. (Absolute) The value of tool wear compensation of Z axis. (Absolute)
:
The value of tool wear compensation of X axis. (Increment) The value of tool wear compensation of Z axis. (Increment)
:
The value of tool length compensation of X axis. (Absolute) The value of tool length compensation of Z axis. (Absolute)
:
The value of tool length compensation of X axis. (Increment)
The value of tool length compensation of Z axis. (Increment) Q___ : Tool type. Types are shown below figure. R___ : The value of tool nose wear compensation. (Absolute) C___ : The value of tool nose wear compensation. (Increment)
Argument of format 3:
P___ : No. of compensation. P154~159 are the values of G54~G59 coordinate. X___ : The value of X axis coordinate.
LNC Technology Co., Ltd. 25
Page 32
LNC Lathe
Syntax of G code
Z___ : The value of Z axis coordinate.
Illustration:
Q=2
Q=7
Q=6Q=1
Q=0,9
Q=8Q=3
Tool type(Q__)
Q=5
Q=4
26 LNC Technology Co., Ltd.
Page 33
G20, G21: Inch \ mm input
Format:
Argument:
G20 : Inch input, minimum 0.0001inch. G21 : mm input, minimum 0.001mm.
These commands should be used alone in their respective block without any other command, and they have to be at the beginning of programs, i.e. before the setting of coordinate system.
When converting unit, pay attention to the following items:
G20; G21;
LNC Lathe
Syntax of G code
(1) Recover workpiece coordinates to basic system. (2) Cancel tool compensation. (3) System-related parameters should be meanwhile adjusted to be in accordance with new unit.
LNC Technology Co., Ltd. 27
Page 34
LNC Lathe
nternal travel forbidden
Syntax of G code
G22, G23: Stored stroke check ON / OFF
Format:
Argument:
X___ Z___andI___ K___: Marks travel range. Machine coordinates. Refer to example.
Action:
G23 is used to cancel tool-stored travel check.
Execute G22 command after manual home returing. Once its set, the tool can not enter travel-forbidden area specified by G22, or a system warning will occur.
G22 X___ Z___ I___ K___;
G23;
MOT 9009 X axis over G22 soft limit(+)” MOT 9010 X axis over G22 soft limit(-)” MOT 9013 Z axis over G22 soft limit(+)” MOT 9014 Z axis over G22 soft limit(+)
In manual mode, users can move spindle in the opposite direction to cancel warning. In auto mode, besides the aforementioned warning, system warning MOT 4058 Over soft limit will also be emitted, and NC stops moving, then users have to click RESET button to cancel warning status.
G22-specified forbidden area can be either internal ro external, and it can be specified by system parameter 0071.
Illustration:
(X,Z)
(X,Z)
28 LNC Technology Co., Ltd.
(I,K)
I area
P0071 be set to 1. P0071 be set to 0.
(I,K)
External travel forbidden area
Page 35
G27: Reference position return check
Format:
Argument:
X___, Z___ : For G90, the reference position in absolute command.
For G91, the reference position in Incremental command. U___, W___ : For G90/G91, the reference position in Incremental command.
Action:
When program finishes an execution cycle, and is at the end point or back to the reference position, users can perform a position return check in order to make sure the correctness of current real position. This command can check if system returns to the reference position. If it is back to the reference position, the reference position indication light will be alight, and the next block will be executed. If it is not at the reference position, system will emit a warning signal MOT 4046 reference position return failure.
G27 X(U)___ Z(W)___;
LNC Lathe
Syntax of G code
If X__ or U__ axis is specified in command, then X axis will perform return and check. If it is not specified, X axis will not move. It is the same as with Z or W axes.
Cancel all compensations before using command G27.
Illustration:
Failure Success
(Turn on the power, then return reference position) G92 X100. Z100.; G92 X100. Z100.; (Reference position be set to (100,100)) G00 U-30. W40.; G00 U-30. W40.; G00 W80.; G00 W80.; G27 U20. W-70.; G27 U30. W-120.; (ALARM) (Normal)
Zero point
(100,100)
Zero point
(100,100)
0
0
(70,140)
System ALARM
G
G00
2
7
(70,220)
G
0
0
(70,140)
G
2
7
G00
(70,220)
G
Failure Success
LNC Technology Co., Ltd. 29
Page 36
LNC Lathe
Syntax of G code
G28: 1st reference position return
Format:
Argument:
X___Z___ : For G90, the intermediate position in absolute command.
For G91, the intermediate position in Incremental command. U___W___ : For G90/G91, the intermediate position in Incremental command.
Action:
System reserves G28-specified coordinates of the intermediate point for later G29 to use.
In manufacturing program, use G28 command to control tool to travel through specified intermediate
G28 X(U)___ Z(W)___;
point, and then automatically return to 1st reference position (machine home). Before executing G28, users have to manually perform home return process lest system warningMOT 4018 no home return after system start will be emitted.
When argument X___ is not specified, X axis does not perform the process of 1st reference position return, and so do the other axes. However, if there is not any argument of axis direction specified, all axes will perform the process of 1st reference position return.
Illustration:
+X
Zero point
(100,80)
Zero point
+X
(50,50)Starting point (50,50)Starting point
+Z
G90 G28 X100. Z80.;
30 LNC Technology Co., Ltd.
G91 G28 X0. Z0.;(no passing through
intermediate point)
+Z
Page 37
G29: From 1st reference position return
Format:
Argument:
X___Z___ : For G90, the target position in absolute command.
For G91, the target position in Incremental command. U___W___ : For G90/G91, the target position in Incremental command.
Action:
G29 command is used only after G28. After executing G28, tool stops on 1st reference position, and then G29 can control tool to move from 1st reference position through G28-specified intermediate point to destination position.
G29 X(U)___ Z(W)___;
LNC Lathe
Syntax of G code
Illustration:
G00 X50. Z50.;------------------------------------------------------------------------------------------------------ (A) G90 G28 X100. Z100.;---------------------------------------------------------------------------------- (ABR) G29 X50. Z180.;------------------------------------------------------------------------------------------ (RBC)
+X
A(50,50)
Zero point
R
B(100,100)
C(50,180)
+Z
LNC Technology Co., Ltd. 31
Page 38
LNC Lathe
Syntax of G code
G30: 2nd,3rd,4th, reference position return
Format:
Argument:
P__ : P2~4: 2nd, 3rd, 4th reference position return. X___, Z___ : For G90, the intermediate position in absolute command.
For G91, the intermediate position in Incremental command. U___, W___ : For G90/G91, the intermediate position in Incremental command.
Action:
Z(W)__;X(U)__ 432 P G30
This command is used to perform 2nd, 3rd and 4th reference position return process. The tool will move from current position through specified intermediate point to 2nd, 3rd and 4th reference positions.
The offset amount between 2nd reference position and machine home point can be specified by parameter 1022 ~ 1025; offset amount between 3rd reference position and machine home point can be specified by parameter 1026 ~ 1029; and offset amount between 4th reference position and machine home point can be specified by parameter 1030 ~ 1033.
Before executing G30, users have to manually perform home return process lest system warningMOT 4018 no home return after system start will be emitted..
When argument X___ is not specified, X axis does not perform the process of reference position return, and so do the other axes. However, if there is not any argument of axis direction specified, all axes will perform the process of reference position return.
32 LNC Technology Co., Ltd.
Page 39
Illustration:
LNC Lathe
Syntax of G code
+X
(50,50)Starting point
G90 G30 P2 X100. Z80.;
P2
(100,80)
+Z
+X
P2
(50,50)Starting point
G91 G30 P2 X0. Z0.;(no passing
through intermediate point)
+Z
LNC Technology Co., Ltd. 33
Page 40
LNC Lathe
Syntax of G code
G31: Skip function
Format:
Argument:
X___, Z___ : For G90, the coordinate of an end point in absolute command.
U___, W___ : For G90/G91, the coordinate of an end point in Incremental
P___ P1~P4.designate skipsignal source. If P_ is not specified, the default
F___ : Feed rate of G31 block. The specified is only effective in this block. If
G31 X(U)___ Z(W)___ P___ F___;
For G91, the coordinate of an end point in Incremental command.
command.
value is P1.
Action:
its not specified, the value of parameter 1042 will be the feed rate of
the block.
This command has the same function of G01. But if a skip signal is triggered duting the execution, the block will cease working, and program will move to the next block.
Incremental mode
+X
G31 target
Skip
Programming path Actual path
G31 start
+Z
34 LNC Technology Co., Ltd.
Page 41
Note:
LNC Lathe
Syntax of G code
Absolute mode
+X
G31target
Skip
Programming path Actual path
G31start
+Z
1. When G31 skip signal is triggered, system saves coordinate value of the break point to system macro variables, as the following table shows. But before G31 skip signal is triggered, these variables are destination position coordinates of G31 command. Besides, if absolute coordinate was once used to redesignate absolute coordinate, e.g. G92 (G50 in lathe A type), the saved absolute coordinate will not include the offset made by G92.
Lathe X Y Z 4th axis
Absolute coordinate of
P1
skip point
Machine coordinate of
skip point
Absolute coordinate of
P2
skip point
Machine coordinate of
skip point
Absolute coordinate of
P3
skip point
Machine coordinate of
skip point
Absolute coordinate of
P4
skip point
Machine coordinate of
skip point
$140 $141 $142 $143 $144 $145 $146 $147 $148 $149 $150 $151 $152 $153 $154 $155 $156 $157 $158 $159 $160 $161 $162 $163 $164 $165 $166 $167 $168 $169 $170 $171
2. The lock feature of P1~P4 break position in G31 can be specified by parameter G31 P1~4 signal source Local signal point serial numbers. Specified as 1~2: corresponding to 1st axis cards 1~2 Local Input, will save values in absolute position value recorder of each axis, and the coordinate of break point can be obtained accurately. Specified as 3~8: corresponding to 1st axis cards 3~8 Local Input, for using software-specified lock action.
LNC Technology Co., Ltd. 35
Page 42
LNC Lathe
Syntax of G code
G33: Thread cutting
Format:
Argument:
X(U)___ : End point of X axis.(mm) Z(W)___ : End point of Z axis.(mm) F___ : Lead in longitudinal direction.(mm/rev)
G33 X(U)__ Z(W)__ F__; (Constant-lead thread cutting)
G33 X(U)__ Z(W)__ F__ Q__; (Mulitiple-thread cutting)
Example: G33 X_ F_ ; Lead in direction of X axis. G33 X_ Z_ F_; Lead in direction of X axis.(X_ > Z_)
Action:
G33 X_ Z_ F_; Lead in direction of Z axis. (X_ < Z_)
Q___ : Threading start angle. (Unit: 0.001deg. No decimal poiint. Range: 0 ~
360000)
1. F__ and Q__ are both norms. Once specified, there will be no need to input in later blocks.
2. In continuous G33 blocks, only the specified Q__ of the 1st G33 block is effective. E.g.: G33 W-10 F1 Q18000;----------------------------------------------------------Start angle is 180 degree U-5 W-5 Q270000;------Due to continuous threading, the specified 270 degree is not effective
3. In G33 threading process, feed rate adjustment knob is not effective ( fixed to 100%). In continuous G33 blocks, only the spindle turn around signal in the 1st block will be searched, the signal will not be waited in later blocks. E.g.: G33 W-10 F1;------------------------------------------------------------------Wait for a turn around signal U-5 W-10;---------------------------------------------------------------------------------------------Do not wait U-10;---------------------------------------------------------------------------------------------------Do not wait
4. During threading, spindle speed can be adjusted, but it will result in threading error.
5. Because servo system follows the error, when threading, incomplete threads will occur at the stard and end positions. In order to improve it, when perform threading, designate the length of thread to be longer than actual necessity.
36 LNC Technology Co., Ltd.
Page 43
Example:
Self-defined departure angle and departure speed cutting (peroform cutting only once)
T0707;---------------------------------------------------------------------------------------------------Call for #7 tool G00 X4.5 Z2.;----------------------------------------- X axis, Z axis rapidly move to cutting start position G33 Z-12. F1;-------------------------------------------------------1st section of threading, thread pith 1mm G33 X11.43 Z-14;-----------------------------------2nd section of threading, departure angle 60 degrees G00 Z2;--------------------------------------------------------------------------------------Z axis rapid movement M30;------------------------------------------------------------------------------------------------------Program ends
60°
LNC Lathe
Syntax of G code
G00
G
3
3
G33
ψ
5
1222
LNC Technology Co., Ltd. 37
Page 44
LNC Lathe
Syntax of G code
G34: Variable Thread Pith Threading Format:
Argument:
X(U)___ : End point of X axis. (mm) Z(W)___ : End point of Z axis. (mm) F___ : Lead in longitudinal direction.(mm/rev) Q___ : Threading start angle. (Unit: 0.001deg, no decimal poiint. Range: 0 ~
K___ : Lead per spindle revolution. (mm/rev)
G34 X(U)___Z(W)___ F___ Q___ K___
360000)
Increment in positive, and decrement in negative.
Action:
G34 has the same usage as G33 (excluding K___). In continuous G34, K can be specified repeatly in every block (E.g. A lead which originally increase gradually can turn to decrease gradually in the next block).
Example:
main program
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X7.;-----------------------------------------------------------------------------------------move to start position Z-5.; G66 P0342 K0.1;------------------------------------------------Use G66 call for self-defined Macro O0342 X6.5;----------------------------------------------------------------------------------------------------------------1st cut X6.25;--------------------------------------------------------------------------------------------------------------2nd cut X6.04;--------------------------------------------------------------------------------------------------------------3rd cut X5.9;----------------------------------------------------------------------------------------------------------------4th cut X5.8;----------------------------------------------------------------------------------------------------------------5th cut G67;------------------------------------------------------------------------------------------End self-defined Macro G0 X20; Z30; M30;
subprogram
G33 U-2. F2;Use G33 thread pitch 4mm for approach (F=2mm is used to increase approach speed) G34 W-15. K#11 F1;------------------------------------------------------variable lead thread cutting (K=0.1)
38 LNC Technology Co., Ltd.
Page 45
LNC Lathe
Syntax of G code
G33 U2 F4;Use G33 thread pitch 8mm for departure (F=4mmis used to increase departure speed) G0 W15;--------------------------------------------------------------use G00 to rapidly return to start position M99;-------------------------------------------------------------------------------------------------subprogram ends
W15
U2
W-15
U-2
ψ5
5153
LNC Technology Co., Ltd. 39
Page 46
LNC Lathe
Syntax of G code
Continuous Threading
command format 1: (continuous G33)
Action:
It is used to cut continuous threads. At the meantime, Z axis direction cutting amount or X axis direction cutting amount both follow spindle revolve amount (please refer to the instruction on G33 argument F__).
Note:
1. Specified threading approach angle Q__ is only effective in the 1st block of continuous G33 blocks.
2. Thread pitch F__ can be specified in every block, and sothreads with variable thread pitch can be
made.
command format 2: (continuous G34)
G33 X(U)__ Z(W)__ F__ Q__;
G34 X(U)__ Z(W)__ F__ Q__ K__;
G33 X(U)__ Z(W)__ F__; G33 X(U)__ Z(W)__ F__;
Action:
Note:
G34 X(U)__ Z(W)__ K__; G34 X(U)__ Z(W)__ K__;
It is used for cutting continuous variable thread.
1. Designation of threading approach angle Q__ is only effective in the 1st block of continuous G34
blocks.
2. Designation of thread pitch F__ is only effective in the 1st block of continuous G34 blocks.
3. Thread increment K__ can be specified in every block.
40 LNC Technology Co., Ltd.
Page 47
command format 3: (combined G33, G34)
LNC Lathe
Syntax of G code
Action:
Achieve special thread cutting with features of continuous G33 and G34. G33 can change pitch in continuous blocks, and G34 can change thread increment in continuous blocks, but start angle Q__ can still be specified in the 1st block only.
Example: continuous thread cutting
main program
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X12.;------------------------------------------------------X axis rapidly traverses to cutting start position Z-5.;------------------------------------------------------------Z axis rapidly traverses to cutting start position G66 P0332;-----------------------------------------------------------------------continuous call for subprogram
G33 X(U)__ Z(W)__ F__ Q__
G34 X(U)__ Z(W)__ F__ K__
G34 X(U)__ Z(W)__ K__
G33 X(U)__ Z(W)__ F__
X11.6;--------------------------------------------------------------------------------------------thread cutting 1st cut X11.4;--------------------------------------------------------------------------------------------thread cutting 2nd cut X11.1;--------------------------------------------------------------------------------------------thread cutting 3rd cut X10.9;-------------------------------------------------------------------------------------------thread cutting 4th cut X10.8;-------------------------------------------------------------------------------------------thread cutting 5th cut G67;-------------------------------------------------------------------------------------cancel call for subprogram G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses Z30;-------------------------------------------------------------------------------------------Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
subprogram
G33 U-7 F1;-----------------------------------------------------thread cutting approach thread pitch 1 mm W-5;-----------------------------------------------------------------------------------------thread cutting 1st section U5 W-10;--------------------------------------------------------------thread cutting 2nd section (taper section) W-5;-----------------------------------------------------------------------------------------thread cutting 3rd section U2;-------------------------------------------------------------------------------------------thread cutting departure G0 W20;--------------------------------------------------------------------Z axisrapidly returns tostart position M99;-----------------------------------------------------------------Return from subprogram to main program
LNC Technology Co., Ltd. 41
Page 48
LNC Lathe
Syntax of G code
multi-line continuous thread cutting
main program
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X12.;------------------------------------------------------X axis rapidly traverses to cutting start position Z-5.;------------------------------------------------------------Z axis rapidly traverses to cutting start position G66 P0332 A0;-------------------------------------------------------------------continuous call for subprogram X11.6;--------------------------------------------------------------------------------------------thread cutting 1st cut X11.4;-------------------------------------------------------------------------------------------thread cutting 2nd cut X11.1;-------------------------------------------------------------------------------------------thread cutting 3rd cut X10.9;------------------------------------------------------------------------------------------thread cutting 4th cut X10.8;------------------------------------------------------------------------------------------thread cutting 5th cut G67;--------------------------------------------------------------------------------------cancelcall for subprogram G66 P0332 A180000;--continuous call for subprogram, 2nd line of thread (start angle 180 degree) X11.6;--------------------------------------------------------------------------------------------thread cutting 1st cut X11.4;-------------------------------------------------------------------------------------------thread cutting 2nd cut X11.1;-------------------------------------------------------------------------------------------thread cutting 3rd cut X10.9;------------------------------------------------------------------------------------------thread cutting 4th cut X10.8;------------------------------------------------------------------------------------------thread cutting 5th cut G67;-------------------------------------------------------------------------------------cancel call for subprogram G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses Z30;-------------------------------------------------------------------------------------------Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
subprogram
G33 U-7 F1 Q#1; approach, thread pitch 1 mm (#1 is thread approach position angle, inserted from A__ to subprogram) W-5;-----------------------------------------------------------------------------------------thread cutting 1st section U5 W-10;---------------------------------------------------------------------------------thread cutting 2nd section W-5;-----------------------------------------------------------------------------------------thread cutting 3rd section U2;------------------------------------------------------------------------------------------------------------tool depart G0 W20;------------------------------------------------------Z axis rapidly traverses (increment coordinate) M99;-------------------------------------------------------------------return from subprogram to main program
42 LNC Technology Co., Ltd.
Page 49
sectional variable lead continuous thread cutting
main program
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X12.;------------------------------------------------------X axis rapidly traverses to cutting start position Z-5.;------------------------------------------------------------Z axis rapidly traverses to cutting start position G66 P0332;-----------------------------------------------------------------------continuous call for subprogram X11.6;--------------------------------------------------------------------------------------------thread cutting 1st cut X11.4;-------------------------------------------------------------------------------------------thread cutting 2nd cut X11.1;-------------------------------------------------------------------------------------------thread cutting 3rd cut X10.9;------------------------------------------------------------------------------------------thread cutting 4th cut X10.8;------------------------------------------------------------------------------------------thread cutting 5th cut G67;--------------------------------------------------------------------------------------cancelcall for subprogram G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses
LNC Lathe
Syntax of G code
Z30;----------------------------------------------------------------------------------------- Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
subprogram
G33 U-7. F2.; -----------------------------------------------approach, thread pitch 2 mm W-5. F1.25;-------------------------------------------------thread cutting 1st section, thread pitch 1.25 mm U5. W-10. F1.5;---------------------------------------------thread cutting 2nd section, thread pitch 1.5 mm W-5. F1.75;-------------------------------------------------thread cutting 3rd section, thread pitch 1.75 mm U2. F2.;------------------------------------------------------------------------------departure, thread pitch 2 mm G0 W20.;------------------------------------------------------------------Z axis rapidly returns to start position M99;-------------------------------------------------------------------return from subprogram to main program
LNC Technology Co., Ltd. 43
Page 50
LNC Lathe
Syntax of G code
X11.6 1st cutting X11.4 2nd cutting X11.1 3rd cutting X10.9 4th cutting X10.8 5th cutting
W20
U2
ψ10
W-5
5
U
5
,
W
-
1
0
W-5
U-7
ψ5
10
5 5
44 LNC Technology Co., Ltd.
Page 51
G40, G41, G42: Tool nose radius compensation
Format:
LNC Lathe
Syntax of G code
Argument:
G40 : Tool nose radius compensation. (Cancel) G41 : Tool nose radius compensation. (Left) G42: : Tool nose radius compensation. (Right)
Action:
Blocks in which tool radius compensation value begins and cancels must be linear command ( G00 or G01), not arc command (G02 or G03). Tool radius compensation can be divided into Type A and Type B, which is decided by parameter
0131.
Illustration:
G41: When face to tool movement direction,
tool shifts to the left for a radius.
G17
 
G18
 
G19
G40;
G41
  
G42
G42: When face to tool movement
direction, tool shifts to the right for a radius.
LNC Technology Co., Ltd. 45
Page 52
LNC Lathe
Syntax of G code
Programming path
Actual tool path
TYPE A
Programming path
TYPE B
Actual tool path
Programming path
Actual tool path
Programming path
Actual tool path
46 LNC Technology Co., Ltd.
Page 53
G53: Machine coordinate system Format:
LNC Lathe
Syntax of G code
Argument:
X___ : Tool traverses to machine coordinate of X axis. Z___ : Tool traverses to machine coordinate of Z axis.
Action:
Machine home point is the fixed original position specified by a machine factory while producing CNC machines. This coordinate system is fixed, and can not be changed. When designating G53 command and coordinate commands, tool traverses to the specified position on the basic machine coordinate system. When tool returns to machine home point(0,0), the position of G53 is the original position of the machine coordinate system.
G53 machine coordinate system is also called 00 coordinate system.
Note:
1. G53 command is only effective in the specified block.
G53 X__ Z__;
2. G53 is only effective in absolute value mode, not in incremental value mode.
3. Before G53 is specified, erase relevant tool radius, length or position compensation.
4. Befoire using G53 to set up coordinate system, manually set up a coordinate system based on
the returned position of reference position.
5. If G53 coordinate system has a set value, when executing G54~G59 coordinate system, an
offset occurs to G53 coordinate systems set value.
Program Example :
G53 X20. Z20. ;-------------------------------------------------------------------(Move to machine coordinate) G53 X10. Z50. ;-------------------------------------------------------------------(Move to machine coordinate)
LNC Technology Co., Ltd. 47
Page 54
LNC Lathe
Syntax of G code
+X
G53X20.Z20.
G53X10.Z50.
Zero point
+Z
Chuck
-X
48 LNC Technology Co., Ltd.
Page 55
G54 ~ G59: Selection of work coordinate system
Format:
LNC Lathe
Syntax of G code
Action:
G54;
 
G55;
 
G56;
G57;
 
G58;
G59;
        
The workpiece coordinate system adopts G54~G59 to represent 6 different coordinate systems. Users can select among them according to manufacturing needs.
Each coordinate systems original position offset can be set inOFFSETàcoordinate system setting; refer to operation manual for detailed instructions. Besides, it can also be set by G10 command, and please refer to G10 command for detailed instructions.
The relationship between each coordinate system is as the following: (default coordinate system when system starts is G54 coordinate system)
G54
G54 Offset
00 Offset
Zero point
G55 Offset
00 Work coordinate
G59 Offset
G55
G56 Offset
G57 Offset
G59
G56
G58 Offset
G57
G58
LNC Technology Co., Ltd. 49
Page 56
LNC Lathe
Syntax of G code
Example:
G90 G54 G00 X100. Z100.; G55 X100. Z100.;------------------------------------------------------------------------------------------------AàB
+X
100
+X
A(100,100)
G54
100
G53 Coordinate
+Z
100
+X
G55
B(100,100)
+Z
100
+Z
50 LNC Technology Co., Ltd.
Page 57
G61, G64: Exact stop mode / Cutting mode
Format:
LNC Lathe
Syntax of G code
Argument:
G61 : Exact stop mode G64 : Cutting mode
Action:
G61s function is the same as G09, while G09 is only effective in its block, G61 is effective ever since its executed until G64 (general cutting ) is executed. G64 is the default system mode, unless G61 is executed, system stays in G64 mode.
To cutting commands (G01/G02/G03), each axis’ positioning precision is set by parameter 0006 ~ 0009; to rapid traverse (G00), each axis’ positioning precision is set by parameter 0800 ~ 0803. Moreover, use parameter 0043 to define whether each axis’ correct positioning function is enabled.
Illustration:
G61; G64;
Example:
G61 G91 G01 X100. F200.;---------------------------------------------------------------------Exact stop mode Z100.;------------------------------------------------------------------------------------------------Exact stop mode G64;-------------------------------------------------------------------------------------------------------Cutting mode
Tool path in G61
Tool path in G64
LNC Technology Co., Ltd. 51
Page 58
LNC Lathe
#2=3.0
Syntax of G code
G65: User macro simple call
Format:
Argument:
P__ : Number of the program to call. P9010 call file name O9010. If P_ is
L__ : Repetition count. (1 by default) Besides P and L arguments, users can use other NC addresses (English letters excluding G, L, N, O,
P) to lead in arguments. The order of sequence does not matter. These argument values are corresponding to local variables in called macro programs as the following charts:
Address
A #1 B #2
G65 P__ L__ <Argument>;
inputted vacant, controller will have an alarm INT 3111 Lack of file name.
Local
variable
Address
I #9
J #10
Local
variable
Address
T #20
U #21
Local
variable
C #3 D #4 E #5 F #6 H #8
O0001; . . G65 P0008 L1 A2.0 B 3.0; . .
#1=2.0
K #11 M #13 Q #17
R #18 S #19
O0008; #3=#1+#2; G00 X#3;G00 X5.0; M99;
V #22
W #23
X #24 Y #25 Z #26
M30;
52 LNC Technology Co., Ltd.
Page 59
LNC Lathe
Syntax of G code
In a G65 block, G65 must be prior to all arguments. G65 can do nested calls, the combination of G65 and G66 can be up to the 4th level (excluding main program which is the 0th level), and each level has its own local variables, as shown in the following charts:
Main program
(Level 0)
O0001; ..
#1=2.0
.. #1=1; G65 P0002 A2.0; .. .. M30;
Local variable
(Level 0)
#1 ..
1 2 3 4 5 ..
Macro
(Level 1)
O0002; ..
#1=3.0
.. .. G65 P0003 A3.0; .. .. M99;
Local variable
(Level 1)
#1 ..
..
Macro
(Level 2)
O0003; ..
#1=4.0
.. .. G65 P0004 A4.0; .. .. M99;
Local variable
(Level 2)
#1 ..
..
Macro
(Level 3)
O0004; ..
#1=5.0
.. .. G65 P0005 A5.0; .. .. M99;
Local variable
(Level 3)
#1
..
..
Macro
(Level 4)
O0005; .. .. .. .. .. .. M99;
Local
variable
(Level 4) #1 ..
.. .. #33
..
.. #33
..
.. #33
..
.. #33
..
.. #33
..
LNC Technology Co., Ltd. 53
Page 60
LNC Lathe
Call
O0008
After move end, call
O0008
Syntax of G code
G66: User macro modal call
Format:
Argument:
P__ : Number of the program to call. P9010 call file name O9010. If P_ is
L__ : Repetition count. (1 by default) Besides P and L arguments, users can use other NC addresses (English letters excluding G, L, N, O,
P) to lead in arguments. The order of sequence does not matter. These argument values are corresponding to local variables in called macro programs, and please refer to G65 for relevant instructions.
Action:
The only difference between G66 and G65 is that G65 calls a macro program which is used for only one time, but the macro programs called by G66 will be called every time when a motion block finishes until G67 is used to cancel this mode.
G66 P__ L__ <argument>;
inputted vacant, controller will have an alarm INT 3111 Lack of file name.
O0001; . .
G66 P0008 L1 A 2.0 B3.0;
G91 G00 Y10.;
After move end, call O0008
O0008;
#3=#1+#2; G91 G00 Z#3; Z-#3;
Return O0001
M99;
Y10.;
Y10.;
After move end, call O0008
G67;
Y10.;
. .
In a G66 block, G66 must be prior to all arguments. G66 can do nested calls. The combination of G65 and G66 can be up to the 4th level (excluding main program which is the 0th level), but G66s argument (corresponding to macro programs local variables) is only specified once in the block of G66, and it wont be respecified in following mode calls.
54 LNC Technology Co., Ltd.
Page 61
G67: User macro modal call cancel
Format:
LNC Lathe
Syntax of G code
Action:
G67;
G67 is applied to cancel the calling for G66 macro program mode.
LNC Technology Co., Ltd. 55
Page 62
LNC Lathe
X Z
Syntax of G code
G68: Mirror image for double turrets ON
G69: Mirror image for double turrets OFF
Format:
Action:
This G CODE group mode can be obtained through system variable $16.
Once enter G68 mode, users can only cancel it by G69, i.e. clicking RESET button will not change this mode.
When users execute G68 command, NC will at first make an offset to the coordinate system of the corresponding tool on the other side (the distance bwtween the two paired tools is specified by system parameter #1099); latter on, the specified X axis command amount in the manufacturing program will take Z axis as the center axis and be mirrored to the other side.
Illustration:
6
5
G68; G69;
Tool A
4
1
2
3
ψ80
5
56 LNC Technology Co., Ltd.
4
ψ60
3
ψ40
2
1
140
Tool B
Page 63
LNC Lathe
Syntax of G code
T0101;--------------------------------------------------------------------------------------------------------------Tool A G00X40.Z150.;-------------------------------------------------------------------------------------------------Path 1 G01Z120.F0.1;-------------------------------------------------------------------------------------------------Path 2 G68;---------------------------------------------------------------------Mirror image of X axis ON. B(-140mm) T0202;--------------------------------------------------------------------------------------------------------------Tool B G00X60.---------------------------------------------------------------------------------------------------------Path 3 G01Z100.;-------------------------------------------------------------------------------------------------------Path 4 G69;---------------------------------------------------------------------Mirror image of X axis OFF. A(140mm) T0101;---------------------------------------------------------------------------------------------------------------Toll A G00X80.;--------------------------------------------------------------------------------------------------------Path 5 G01Z50.;--------------------------------------------------------------------------------------------------------Path 6
LNC Technology Co., Ltd. 57
Page 64
LNC Lathe
Syntax of G code
G70: Finishing Cycle
Format:
Argument:
P__ : Sequence number of the first block for the program of finishing
Q__ : Sequence number of the last block for the program of finishing
Action:
It is used after G71, G72, G73 rough cutting cycles along with G70 command to perform precise cutting to obtain desired size. Please refer to G71 for examples.
shape.
shape.
G70 P__ Q__;
58 LNC Technology Co., Ltd.
Page 65
G71: Stock removal in turning
Format:
LNC Lathe
Syntax of G code
Argument:
U d : Depth of cut in X axis direction. (Radius designation) This value can
R e : Escaping amount. This value can be specified by the parameter
P ns : Sequence number of the first block for the program of finishing
Q nf : Sequence number of the last block for the program of finishing
U___ : Distance and direction of finishing allowance in X axis direction. W___ : Distance and direction of finishing allowance in Z axis direction. F___ : Feedrate. T___ : Tool number.
G71 U d R e ;
G71 P ns Q nf U W F S T ;
be specified by the parameter (P1081).
(P1082).
shape.
shape.
Action:
Note:
S___ : Spindle speed.
1. Rapidly traverse (G00) to A position (start position) before cycle begins;
2. After executing G71 command, tool takes the set preserved precise cutting amount (X axis is U/2, Z axis is W) as the offset amount;
3. Tool again traverses to Z axis for a distance of U(d), and traverse to outline surface;
4. Then depart in Z axis direction for a distance of e at 45, and X axis traverse in the opposite direction until the adjacent position which is parallel to the start position;
5. Then depart in Z axis direction for a distance of U(d) to continue the next repeated cycle ;
6. As the last cycle ends, tool lathe cutting once along outline A'àB;
7. When finishes, tool rapidly traverses to A position, and waits for next cycle to start.
1. Outline path is specified by blocks between ns and nf, ranges from A position to A' position then to B position.
2. F, S, T commands specified in blocks between nsànf are not effective, they can be effective only when written in blocks of rough lathing cycle (G71).
3. Blocks between nsànf can not do subprogram call .
LNC Technology Co., Ltd. 59
Page 66
LNC Lathe
Syntax of G code
Illustration:
B
C
A
Δd
45°
e
ΔW
Δu/2
60 LNC Technology Co., Ltd.
Page 67
G72: Stock removal in facing
Format:
LNC Lathe
Syntax of G code
Argument:
W d : Depth of cut in Z axis direction. This value can be specified by the
R e : Escaping amount. This value can be specified by the parameter
P ns : Sequence number of the first block for the program of finishing
Q nf : Sequence number of the last block for the program of finishing
U___ : Distance and direction of finishing allowance in X axis direction. W___ : Distance and direction of finishing allowance in Z axis direction. F___ : Feedrate. T___ : Tool number.
G72 W d R e ;
G72 P ns Q nf U W F S T ;
parameter (P1081).
(P1082).
shape.
shape.
Action:
Note:
S___ : Spindle speed.
1. Rapidly traverse (G00) to A position (start position) before cycle begins;
2. After executing G72 command, tool takes the set preserved precise cutting amount (X axis is U/2, Z axis is W) as the offset amount;
3. Tool again traverses to Z axis for a distance of U(d), and traverse to outline surface;
4. Then depart in Z axis direction for a distance of R(e) at 45, and X axis traverse in the opposite direction until the adjacent position which is parallel to the start position;
5. Then depart in Z axis direction for a distance of U(d) to continue the next repeated cycle ;
6. As the last cycle ends, tool lathe cutting once along outline A'àB;
7. When finishes, tool rapidly traverses to A position, and waits for next cycle to start.
1. Outline path is specified by blocks between ns and nf, ranges from A position to A' position then to B position.
2. F, S, T commands specified in blocks between nsànf are not effective, they can be effective only when written in blocks of rough lathing cycle (G72).
3. Blocks between nsànf can not do subprogram call .
LNC Technology Co., Ltd. 61
Page 68
LNC Lathe
Syntax of G code
Illustration:
Δu/2 Δd
ΔW
A'
A
e
B
C
45°
62 LNC Technology Co., Ltd.
Page 69
G73: Pattern repeating
Format:
LNC Lathe
Syntax of G code
Argument:
U i : Distance and direction of relief in X axis direction. (Radius
W k : Distance and direction of relief in Z axis direction. This value can be
R d : The number of division. This value can be specified by the parameter
P ns : Sequence number of the first block for the program of finishing
Q nf : Sequence number of the last block for the program of finishing
U___ : Distance and direction of finishing allowance in X axis direction. W___ : Distance and direction of finishing allowance in Z axis direction.
G73 U i W k R d ;
G73 P ns Q nf U W F S T ;
designation) This value can be specified by the parameter (P1083).
specified by the parameter (P1084).
(P1085).
shape.
shape.
Action:
F___ : Feedrate. S___ : Tool number. T___ : Spindle speed.
G73 command is an outline forming rough lathing cycle which is used when the workpiece is a welding or casting product with preliminary shapes, and with a size slightly bigger than precise manufacturing, hence if using G71, G72 lathe command will result in generating many unnecessary cutting path and the waste of time. Therefore, G73 (mixed-type outline rough cutting fixed cycle ) is used to make repeated lathing which can move along workpieces indigenous outline, repeat cutting for necessary times, and move for a suitable distance and depth in each cycle.
1. Traverse tool to A position (start position) before cycle begins;
2. After executing G73 command, tool takes the set preserved precise cutting amount (X axis is U/2, Z axis is W) plus cutting amount (X axis is i, Z axis is k) as the offset amount, and then traverse to C position;
3. Tool lathes along program path AàA'àB, and according to feed and cutting times to finish cycle-type manufacturing;
LNC Technology Co., Ltd. 63
Page 70
LNC Lathe
Syntax of G code
4. When last cycle finishes, tool automatically returns to A position, and waits for next lathe cycle.
Illustration:
Δk+Δw
Δw
A
B
A'
Δw
Δu/2
D
Δi+Δu/2
Δu/2
Note:
1. Outline path is specified by blocks between ns and nf, ranges from A position to A' position then to B position.
2. F, S, T commands specified in blocks between nsànf are not effective, they can be effective only when written in blocks of rough lathing cycle (G73).
3. Blocks between nsànf can not do subprogram call .
64 LNC Technology Co., Ltd.
Page 71
G74: End face peck drilling cycle (Z axis)
Format:
LNC Lathe
Syntax of G code
Argument:
R e : Return amount. This value can be specified by the parameter
P___ : Dwell time at the cutting bottom. X___ : X component of point B. Z___ : Z component of point C. U___ : Incremental amount from A to B. W___ : Incremental amount from A to C. P i : Movement amount of X axisdirection. No decimal poiint. Q k : Depth of cut in Z axisdirection. No decimal poiint. R d : Relief amount of the tool at the ccutting bottom in X axis direction. F___ : Feedrate.
Illustration:
G74 R e P ;
G74 X(U) Z(W) P i Q k R d F ;
(P1086).
Δk' Δk Δk Δk Δk
d
C
...........
e
Z
W
A
Δi
U/2
B
X
LNC Technology Co., Ltd. 65
Page 72
LNC Lathe
Syntax of G code
G75: Outer diameter / Internal diameter drilling cycle (X axis)
Format:
Argument:
R e : Return amount in X axis direction. This value can be specified by the
P___ : Dwell time at the cutting bottom. X___ : The coordinate of X axis. Z___ : The coordinate of Z axis. U___ : Incremental amount in X axis direction. W___ : Incremental amount in Z axis direction. P i : Depth of cut in X axisdirection. No decimal poiint. Q k : Movement amount of Z axisdirection. No decimal poiint. R d : Relief amount of the tool at the ccutting bottom in Z axis direction. F___ : Feedrate.
Illustration:
G75 R e P ;
G75 X(U) Z(W) P i Q k R d F ;
parameter (P1086).
A
Δi
e
...........
Δk
Z
W
Δd
U/2
X
66 LNC Technology Co., Ltd.
Page 73
G76: Multiple thread cutting cycle
command format 1:
LNC Lathe
Syntax of G code
command format 2:
Argument:
P m r a : m: Repetitive count in finishing.
G76 P m r a Q___ R___;
G76 X(U)___ Z(W)___ R i P k Q d F___;
G76 P m r a Q___ R___;
G76 X(U)___ Z(W)___ R i P k Q d E___;
r: Chamfering amount. a: Agnle of tool tip. m and r can be specified by the parameter(P1087). a can be specified by the parameter (P1088). a can be set to °0 for acme thread or square thread.
)1( ndnd : Depth of cut in nth cut.
Q___ : Minumum cutting depth Qndnd < )1( . This value can be
R___ : Finishing allowance (specified by the radius value). This value can be
X(U)___ : Distance from A to C in X axis direction. Z(W)___ : Distance from C to D in Z axis direction. R i : Difference of thread radius. P k : Height of thread. No decimal point. Q d : Depth of cut in 1st cut. No decimal point. F___ : Lead of thread. (mm/rev) E___ : Inch thread. (threads/inch)
Illustration:
: Depth of cut in 1st cut.
d
specified by the parameter (P1089).
specified by the parameter (P1090).
LNC Technology Co., Ltd. 67
Page 74
LNC Lathe
C E D. B
(F) (R) (R) (R)
A
Δd
k Δd n
Syntax of G code
Δd
a
1st
2nd
3rd
k
nth
68 LNC Technology Co., Ltd.
Page 75
G77: Outer diameter/internal diameter cutting cycle
Format:
LNC Lathe
Syntax of G code
Argument:
X___ Z___ : X=U+(The coordinate of X axis at start point)
U___W___R___ : Definitions are shown in the figure below. F___ : Feedrate.
Illustration:
The following two examples generat the same cutting path, U= -10. W= -15. R= -5.
G77 U-10. W-15. R-5. F50;
(100,35)
-W=15.(G00)
G77 X(U)___ Z(W)___ R___ F___;
Z=W+(The coordinate of Z axis at start point)
G92 G90 X100. Z50.; G77 X90, Z35. R-5. F50;
Starting point
(100,50)
U+R=-15.(G00)
(100,35)
-W=15.(G00)
Starting point
(100,50)
U+R=-15.(G00)
-U=10.(G01)
(90,35)
(
-
R
,
W
)
=
(
5
,
(85,50)
-
1
5
)
(
G
0
1
)
-U=10.(G01)
(90,35)
(
-
R
,
W
)
=
(
(85,50)
5
,
-
1
5
)
(
G
0
1
)
LNC Technology Co., Ltd. 69
Page 76
LNC Lathe
Syntax of G code
G78: Taper thread cutting cycle
Format:
Argument:
X(U)___ : The coordinate of X axis at end point. Z(W)___ : The coordinate of Z axis at end point . R___ : Increment / decrement taper. (mm) H___ : The thread line number of multiple thread. F___ : Lead of thread. (mm/rev) E___ : Inch thread. (threads/inch)
Illustration:
Positive or negative of R value
+X
+R(R is positive)
+X
H__ R__ Z(W)__X(U)__ G78
 
F__ E__
;
 
-R(R is negative)
+X
+Z
+Z
-R(R is negative)
+R(R is positive)
+Z
+R(R is positive)
+X
+Z
-R(R is negative)
+R(R is positive)-R(R is negative)
70 LNC Technology Co., Ltd.
Page 77
Example: Single-line thread
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X6.;--------------------------------------------------------X axis rapidly traverses to cutting start position Z-5.;------------------------------------------------------------Z axis rapidly traverses to cutting start position G78 X4.5 Z-15. F1;---------------------------------cutting speed of 1st cut of thread cutting, pitch 1 mm X4.25;-------------------------------------------------------------------------------------------thread cutting 2nd cut X4.04;-------------------------------------------------------------------------------------------thread cutting 3rd cut X3.9;---------------------------------------------------------------------------------------------thread cutting 4th cut X3.8;---------------------------------------------------------------------------------------------thread cutting 5th cut G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses
Z30;------------------------------------------------------------------------------------------Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
LNC Lathe
Syntax of G code
X4.5 1st cutting X4.25 2nd cutting X4.04 3rd cutting X3.9 4th cutting X3.8 5th cutting
ψ5
10 5
LNC Technology Co., Ltd. 71
Page 78
LNC Lathe
Syntax of G code
Multi-line thread
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X6.;--------------------------------------------------------X axis rapidly traverses to cutting start position Z-5.;------------------------------------------------------------Z axis rapidly traverses to cutting start position G78 X4.5 Z-15. H5 F1;-----cutting speed of 1st cut of 5-line thread cutting, pitch 1 mm, cut 5 times X4.25;--------------------------------------------------------------------------thread cutting 2nd cut, cut 5 times X4.04;--------------------------------------------------------------------------thread cutting 3rd cut, cut 5 times X3.9;----------------------------------------------------------------------------thread cutting 4th cut, cut 5 times X3.8;----------------------------------------------------------------------------thread cutting 5th cut, cut 5 times G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses Z30;-------------------------------------------------------------------------------------------Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
X4.5 1st cutting at five times X4.25 2nd cutting at five times X4.04 3rd cutting at five times X3.9 4th cutting at five times X3.8 5th cutting at five times
ψ5
10 5
72 LNC Technology Co., Ltd.
Page 79
LNC Lathe
Syntax of G code
Approach/departure chamfer thread cutting (system parameterP196, P197, P198, 199 setting)
system parameter P196 (when set as 40, cutting chamfer thread number is 4) P197 (when set as 10, cutting chamfer is 10 degree)
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X6.;--------------------------------------------------------X axis rapidly traverses to cutting start position Z5.;-------------------------------------------------------------Z axis rapidly traverses to cutting start position G78 X4.5 Z20. H5 F1;-----------------------------cutting speed of 1st cut of thread cutting, pitch 1 mm X4.25;------------------------------------------------------------------------------------------thread cutting 2nd cut X4.04;------------------------------------------------------------------------------------------thread cutting 3rd cut X3.9;--------------------------------------------------------------------------------------------thread cutting 4th cut X3.8;--------------------------------------------------------------------------------------------thread cutting 5th cut G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses Z30;-------------------------------------------------------------------------------------------Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
X4.5 1st cutting X4.25 2nd cutting X4.04 3rd cutting X3.9 4th cutting X3.8 5th cutting
the chamfer setting by parameter
ψ5
5 15
LNC Technology Co., Ltd. 73
Page 80
LNC Lathe
Syntax of G code
Cone thread cutting
T0707;----------------------------------------------------------------------------------------------------call for #7 tool G0 X9.5;------------------------------------------------------X axis rapidly traverses to cutting start position Z-15.;----------------------------------------------------------Z axis rapidly traverses to cutting start position G78 X2.1 Z-5. R2.5 F1;------------1st cut of thread cutting, pitch 1mm, radius of rake change is 2.5
X1.8;------------------------------------------------------------------------------------------thread cutting 2nd cut X1.6;------------------------------------------------------------------------------------------thread cutting 3rd cut X1.4;------------------------------------------------------------------------------------------thread cutting 4th cut X1.3;------------------------------------------------------------------------------------------thread cutting 5th cut
G0 X20;--------------------------------------------------------------------------------------X axis rapidly traverses Z30;-------------------------------------------------------------------------------------------Z axis rapidly traverses M30;------------------------------------------------------------------------------------------------------program ends
X2.1 1st cutting X1.8 2nd cutting X1.6 3rd cutting X1.4 4th cutting X1.3 5th cutting
ψ2.5
ψ10
ψ7.5
10
5
74 LNC Technology Co., Ltd.
Page 81
G79: End face turning cycle
Format:
LNC Lathe
Syntax of G code
Argument:
X___ Z___ : X=U+(The coordinate of X axis at start point)
U___ W___ R___ : Definitions are shown in figure below. F___ : Feedrate.
Illustration:
The following two example generate the same cutting path. U= -10. W= -15. R= -5.
Starting point (100,50)
G79 U-10. W-15. R-5. F50;
W+R=-20.(G00)
(U,-R)=(-10,5)(G01)
(90,55)
-W=15.(G01)
G79 X(U)___ Z(W)___ R___ F___;
Z=W+(The coordinate of Z axis at start point)
(100,70)
-U=10.(G00)
(90,70)
Starting point(100,50)
(U,-R)=(-10,5)(G01)
G92 G90 X100. Z50.; G79 X90. Z35. R-5. F50;
W+R=-20.(G00)
(90,70)
(90,55)
-W=15.(G01)
(100,70)
-U=10.(G00)
LNC Technology Co., Ltd. 75
Page 82
LNC Lathe
Syntax of G code
G80: Canned cycle for drilling cancel
Format:
Action:
Fixed cycle (G70~G89) once be set will keeps being effective. When command (X/U/Z/W) is met, the fixed cycle will be called to work until its replaced by another fixed cycle, or G80 command, or a command of group 01 (GROUP01)--G00/G01/G02/G03/G33 appears.
Illustration:
G80;
Main program
O0200; ... ...
G74...;
U10.;
W5.;
Canned cycle
G74
Canned cycle
G75...;
X5.;
G80;
U10.; ... ...
U10.;
G75
Canned cycle
76 LNC Technology Co., Ltd.
Page 83
G83: Face drilling cycle
Format:
LNC Lathe
Syntax of G code
Argument:
X (U)___, C (H)___ : Hole position data. Z___ :
W___ : R___ :
Q___ : P___ : D___ : F___ : K___ :
G83 X(U)__ C(H) Z(W)__ R__ Q__ P__
D__ F__ K__ M ;
For G90, coordinate of Z axis at the hole bottom. For G91, distance from R to the hole bottom. Distance from R to the hole bottom. For G90, coordinate of Z axis at R. For G91, distance from start point to R. Depth of cut for each cutting feed. No decimal poiint. Dwell time at the bottom of a hole. Unit: ms Retraction distance. Feedrate. Number of repeats. (Default by 1) For G90, drill K times at the same position. For G91, drill K holes in X Y direction.
M___ :
M code for spindle clamp. M code + 1: M code for spindle unclamp.
LNC Technology Co., Ltd. 77
Page 84
LNC Lathe
Syntax of G code
Illustration: Parameter description :
TYPE I : High speed mode. (Parameter P1044 =0) A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. D : Retraction distance specified in parameter P0150. P2 : Dwell time specified in parameter P1045.
G98 TYPE I
Q
Q
R
A
M
Z P
G99
D
For G98, TYPE I (Parameter P1044=0)
W
Q
TYPE I
D
A
P2 M+1
Q
R
A
M
Z
P
D
For G99, TYPE I (Parameter P1044=0)
W
D
P2 M+1
78 LNC Technology Co., Ltd.
Page 85
Parameter description :
TYPE II: Normal speed mode. (Parameter P1044 =1) A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. D : Retraction distance specified in parameter P0150. P2 : Dwell time specified in parameter P1045.
LNC Lathe
Syntax of G code
G98 TYPE II
Q
Q
Q
Q
R
A
M
Z P
DD
W
For G98, TYPE II (Parameter P1044=1)
G99 TYPE II
Q
Q
Q
Q
P2 M+1
R
A
A
M
Z
P
DD
W
For G99, TYPE II (Parameter P1044=1)
P2 M+1
LNC Technology Co., Ltd. 79
Page 86
LNC Lathe
Syntax of G code
Parameter description :
TYPE III : Q__ vacant A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. P2 : Dwell time specified in parameter P1045.
G98
TYPE III
Z P
W
For G98, TYPE III (Q__ vacant)
R
P2 M+1
A
M
A
G99 TYPE III
Z
P
W
For G99, TYPE III (Q__ vacant)
R
P2 M+1
A
M
80 LNC Technology Co., Ltd.
Page 87
G84: Face tapping cycle
Format:
LNC Lathe
Syntax of G code
Argument:
X (U)___, C (H)___ : Hole position data. Z___ : For G90, coordinate of Z axis at the hole bottom.
W___ : Distance from R to the hole bottom. R___ : For G90, coordinate of Z axis at R.
P___ : Dwell time at the bottom of a hole. Unit: ms F___ : Feedrate. K___ : Number of repeats. (Default by 1)
M___ : M code for spindle clamp.
G84 X(U)__ C(H) Z(W)__ R__ P__ F__
K__ M__ D__ ;
For G91, distance from R to the hole bottom.
For G91, distance from start point to R.
For G90, tap K times at the same position. For G91, tap K holes in X Y direction.
M code + 1: M code for spindle unclamp.
D___ : D_ vacant: Tapping using M03.
D0 : Tapping using M03. D1 : Tapping using M04.
(Remark )D__ has a feature of succession: Once position direction tapping is used, even though later command does not specify D value, it will still be a positive direction tapping; Once negative direction tapping is used, even though later command does not specify D value, it will still be a negative direction tapping. The feature of succession is inactive after next G80 commnad (cancel fixed cycle ).
LNC Technology Co., Ltd. 81
Page 88
LNC Lathe
Syntax of G code
Example: Direction of tapping
G84;-------------------------------------------------------------------------------------------Tapping using M03. G84;-------------------------------------------------------------------------------------------Tapping using M03. G84D1;----------------------------------------------------------------------------------------Tapping using M04. G84;--------------------------------------------------------------------------Tapping using M04. (Inheritance) G84;--------------------------------------------------------------------------Tapping using M04. (Inheritance) G84D0;----------------------------------------------------------------------------------------Tapping using M03.
Illustration: Parameter description :
A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. P2 : Dwell time specified in parameter P1045. CW : M03 CCW : M04
G98
spindle stop
Z
P
CCW(D=1 CW)
CW(D=1 CCW)
W
G98 mode
G99
Spindle
stop
Z P
CCW(D=1 CW)
CW(D=1 CCW)
W
G99 mode
R
P2 M+1
R
P2 M+1
A
M
A
A
M
82 LNC Technology Co., Ltd.
Page 89
G85: Face boring cycle
Format:
LNC Lathe
Syntax of G code
Argument:
X (U)___, C (H)___ : Hole position data. Z___ : For G90, coordinate of Z axis at the hole bottom.
W___ : Distance from R to the hole bottom. R___ : For G90, coordinate of Z axis at R.
P___ : Dwell time at the bottom of a hole. Unit: ms F___ : Feedrate. K___ : Number of repeats. (Default by 1)
M___ : M code for spindle clamp.
G85 X(U)__ C(H) __ Z(W)__ R__ P__ F__
K__ M__
For G91, distance from R to the hole bottom.
For G91, distance from start point to R.
For G90, bore K times at the same position. For G91, bore K holes in X Y direction.
M code + 1: M code for spindle unclamp.
Illustration: Parameter description :
A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. P2 : Dwell time specified in parameter P1045.
G98
Z
P
W
G98 mode
R
P2 M+1
A
M
A
LNC Technology Co., Ltd. 83
Page 90
LNC Lathe
Syntax of G code
G99
Z
P
W
G99 mode
R
P2 M+1
A
M
84 LNC Technology Co., Ltd.
Page 91
G87: Side drilling cycle (X axis)
Format:
LNC Lathe
Syntax of G code
Argument:
Z (W)___, C (H)___ : Hole position data. X___ : For G90, coordinate of X axis at the hole bottom.
U___ : Distance from R to the hole bottom. R___ : For G90, coordinate of X axis at R.
Q___ : Depth of cut for each cutting feed. No decimal poiint. P___ : Dwell time at the bottom of a hole. Unit: ms D___ : Retraction distance. F___ : Feedrate. K___ : Number of repeats. (Default by 1)
G87 Z(W)__ C(H)__ X(U)__ R__ Q__ P__
D__ F__ K__ M__;
For G91, distance from R to the hole bottom.
For G91, distance from start point to R.
For G90, drill K times at the same position.
Action:
For G91, drill K holes in Y Z direction.
M___ : M code for spindle clamp.
M code + 1: M code for spindle unclamp.
While using G87, lathe spindle is locked, and tool revolves to cut workpiece.
LNC Technology Co., Ltd. 85
Page 92
LNC Lathe
Syntax of G code
Illustration: Parameter description :
TYPE I : High speed mode. (Parameter P1044 =0) A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. D : Retraction distance specified in parameter P0150. P2 : Dwell time specified in parameter P1045.
Q
Q
R
M
A
D
A
M+1 P2
U
Q
Q
M A
R
M+1 P2
D
U
G98
TYPE I
PDX
For G98, TYPE I (Parameter P1044=0) For G99, TYPE I (Parameter P1044=0)
86 LNC Technology Co., Ltd.
G99 TYPE I
PDX
Page 93
Parameter description :
TYPE II: Normal speed mode. (Parameter P1044 =1) A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. D : Retraction distance specified in parameter P0150. P2 : Dwell time specified in parameter P1045.
LNC Lathe
Syntax of G code
Q
Q
M
A
A
M+1 P2R
D
U
M
A
M+1 P2R
Q
D
U
Q
D
G98 TYPE II
G99 TYPE II
XP
For G98, TYPE II (Parameter P1044=1) For G99, TYPE II (Parameter P1044=1)
LNC Technology Co., Ltd. 87
D
XP
Page 94
LNC Lathe
Syntax of G code
Parameter description :
TYPE III : Q__ vacant A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. P2 : Dwell time specified in parameter P1045.
R
M
A
A
M+1 P2
U
R
M
A
M+1 P2
U
G98
TYPE III
P
X
For G98, TYPE III (Q__ vacant) For G99, TYPE III (Q__ vacant)
88 LNC Technology Co., Ltd.
G99 TYPE III
X
P
Page 95
G88: Side tapping cycle (X axis)
Format:
LNC Lathe
Syntax of G code
Argument:
Z (W)___, C (H)___ : Hole position data. X___ : For G90, coordinate of X axis at the hole bottom.
U___ : Distance from R to the hole bottom. R___ : For G90, coordinate of X axis at R.
P___ : Dwell time at the bottom of a hole. Unit: ms F___ : Feedrate. K___ : Number of repeats. (Default by 1)
M___ : M code for spindle clamp.
G88 Z(W)__ C(H)__ X(U)__ R__ P__ F__
K__ M__ D__;
For G91, distance from R to the hole bottom.
For G91, distance from start point to R.
For G90, tap K times at the same position. For G91, tap K holes in Y Z direction.
M code + 1: M code for spindle unclamp.
D___ : D_ vacant: Tapping using M03.
D0 : Tapping using M03. D1 : Tapping using M04.
(Remark )D__ has a feature of succession: Once position direction tapping is used, even though later command does not specify D value, it will still be a positive direction tapping; Once negative direction tapping is used, even though later command does not specify D value, it will still be a negative direction tapping. The feature of succession is inactive after next G80 commnad (cancel fixed cycle ).
LNC Technology Co., Ltd. 89
Page 96
LNC Lathe
Syntax of G code
Example: tappingdirection
G88;-------------------------------------------------------------------------------------------Tapping using M03. G88;-------------------------------------------------------------------------------------------Tapping using M03. G88D1;----------------------------------------------------------------------------------------Tapping using M04. G88;--------------------------------------------------------------------------Tapping using M04. (Inheritance) G88;--------------------------------------------------------------------------Tapping using M04. (Inheritance) G88D0;----------------------------------------------------------------------------------------Tapping using M03.
90 LNC Technology Co., Ltd.
Page 97
Illustration: Parameter description :
A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. P2 : Dwell time specified in parameter P1045. CW : M03 CCW : M04
LNC Lathe
Syntax of G code
CW (D=1 CCW)
M A
M
A
A
P2 M+1
R
P2 M+1
R
CW
(D=1 CCW)
U
U
G98
Spindle stop
G98 mode G99 mode
LNC Technology Co., Ltd. 91
CCW (D=1 CW)
P
X
G99
Spindle stop
CCW (D=1 CW)
P
X
Page 98
LNC Lathe
Syntax of G code
G89: Side boring cycle (X axis)
Format:
Argument:
Z (W)___, C (H)___ : Hole position data. X___ : For G90, coordinate of X axis at the hole bottom.
U___ : Distance from R to the hole bottom. R___ : For G90, coordinate of X axis at R.
P___ : Dwell time at the bottom of a hole. Unit: ms F___ : Feedrate. K___ : Number of repeats. (Default by 1)
M___ : M code for spindle clamp.
G89 Z(W)__ C(H)__ X(U)__ R__ P__ F__
K__ M__ ;
For G91, distance from R to the hole bottom.
For G91, distance from start point to R.
For G90, bore K times at the same position. For G91, bore K holes in Y Z direction.
M code + 1: M code for spindle unclamp.
92 LNC Technology Co., Ltd.
Page 99
Illustration: Parameter description :
A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. D : Retraction distance specified in parameter P0150. P2 : Dwell time specified in parameter P1045.
LNC Lathe
Syntax of G code
R
M
A
A
P2 M+1
U
R
M
A
P2
M+1
U
G98
XP
G98 mode G99 mode
LNC Technology Co., Ltd. 93
G99
XP
Page 100
LNC Lathe
Syntax of G code
G187: Side drilling cycle (Y axis) Format:
Argument:
X (U)___, Z (W)___, C (H)___ Y___ : For G90, coordinate of Y axis at the hole bottom.
V___ : Distance from R to the hole bottom. R___ : For G90, coordinate of Y axis at R.
Q___ : Depth of cut for each cutting feed. No decimal poiint. P___ : Dwell time at the bottom of a hole. Unit: ms D___ : Retraction distance. F___ : Feedrate.
G187 X(U)__ Z(W)__ C(H)__ Y(V)__ R__ Q__ P__ D__ F__
K__ M__;
: Hole position data.
For G91, distance from R to the hole bottom.
For G91, distance from start point to R.
K___ : Number of repeats. (Default by 1)
For G90, drill K times at the same position. For G91, drill K holes in XZ direction.
M___ : M code for spindle clamp.
M code + 1: M code for spindle unclamp.
Parameter description :
TYPE I : High speed mode. (Parameter P1044 =0) A : Start point. M : M code for spindle clamp. M+1 : M code for spindle unclamp. D : Retraction distance specified in parameter P0150. P2 : Dwell time specified in parameter P1045.
94 LNC Technology Co., Ltd.
Loading...