GSK218M CNC SYSTEM Programming and Operation Manual
This user manual describes all proceedings concerning the
operations of this CNC system in detail as much as possible. However,
it is impractical to give particular descriptions for all unnecessary or
unallowable system operations due to the manual text limit, product
specific applications and other causes. Therefore, the proceedings not
indicated herein should be considered impractical or unallowable.
This user manual is the property of GSK CNC Equipment Co., Ltd.
All rights are reserved. It is against the law for any organization or
individual to publish or reprint this manual without the express written
permission of GSK and the latter reserves the right to ascertain their
legal liability.
I
GSK218M CNC SYSTEM Programming and Operation Manual
Preface
Your excellency,
It’s our pleasure for your patronage and purchase of this GSK GSK218M CNC
system made by GSK CNC Equipment Co., Ltd.
This book is “Programming and Operation” manual.
! Accident may occur by improper connection and operation! This
system can only be operated by authorized and qualified personnel.
Please carefully read this manual before usage!
Special cautions:
The power supply fixed on/in the cabinet is exclusively used for the CNC
system made by GSK. It can't be applied to other purposes, or else it may cause
serious danger.
This manual is reserved by final user.
All specifications and designs herein are subject to change without further notice.
We are full of heartfelt gratitude to you for supporting us in the use of GSK’s products.
II
GSK218M CNC SYSTEM Programming and Operation Manual
Warning and Precautions
Warning, note and explanation
This manual contains the precautions to protect user and machine. The
precautions are classified as warning and note by safety, and supplementary
information is regarded as explanation. Read the warnings, notes and
explanations carefully before operation.
Warning
Personnel may be hurted or equipment be damaged if operations and steps are not
observed.
Note
Equipment may be damaged if operation instructions or steps are not observed by
user.
Explanation
It is used for the supplementary information except for warning and note.
z Copy right is reserved.
III
GSK218M CNC SYSTEM Programming and Operation Manual
GSK218M CNC SYSTEM Programming and Operation Manual
Ⅰ OVERVIEW
1
GSK218M CNC SYSTEM Programming and Operation Manual
1. Overview
This manual is comprised by following parts:
I Overview
It describes the chapter structure, system model available, relative instructions and the
note.
Ⅱ Programming
It describes G functions and the programming format, characteristics and restrictions
by NC language.
OperationⅢ
It describes the manual and auto operation, program input/output and editing methods.
Appendix
It describes parameter list, alarm list and programming data table.
The manual is used for GSK218M CNC system.
2
GSK218M CNC SYSTEM Programming and Operation Manual
Ⅱ PROGRAMMING
3
GSK218M CNC SYSTEM Programming and Operation Manual
1 General
1.1 Tool movement along workpiece contour —interpolation
1)Tool movement along a straight line
Fig. 1-1-1
2)
Tool movement along an arc
Fig. 1-1-2
The tool linear and arc motion function is called interpolation.
The programming instructions such as G01, G02 are called preparatory function, which is
used for interpolation for CNC device.
4
GSK218M CNC SYSTEM Programming and Operation Manual
a) Movement along straight line
G01 Y
X Y ;
;
Interpolation
a) Movement along straight
line
b) Movement along arc
b) Movement along arc
G03 X
Y R ;
X axis (Motor)
Y axis (Motor)
Tool movement
Fig.1-1-3
Note For some machines, it is the worktable moving other than tool moving in practice.
It is assumed that the tool moves relative to the workpiece in this manual. Refer to
the machine actual movement direction in practice to protect against personnel
hurt and machine damage.
1.2 Feed——Feed function
The feedrate specification is called feed function.
Fig. 1-2-1
To specify a speed to machine the part by tool is called feed and the machine speed is
instructed by a numerical value. For example, the program instruction is F150 if tool feeds by
150mm/min.
5
GSK218M CNC SYSTEM Programming and Operation Manual
1.3 Cutting feedrate, spindle speed function
Tool
工件
Tool diameter
V: Cutting speed
(m/min)
RPM
RPM
workpiece
Fig. 1-3-1
The speed of tool relative to workpiece in cutting is called cutting feedrate. It can be
instructed by spindle speed RPM(r/min) by CNC.
Example: If the tool diameter is 10mm, cutting linear speed is 8 m/min, the spindle speed
is about 255RPM according to N=1000V/πD, so the instruction is: S255
Instructions related to spindle speed are called spindle speed function.
1.4 Operation instruction——miscellaneous function
When the workpiece is to be machined, to make the spindle run and supply coolant, the
machine spindle motor and cooling pump switches must be controlled by actual requirement.
Fig. 1-4-1
The programs or machine switch actions controlled by system NC instructions are called
miscellaneous functions, which are instructed by M code.
Example: If M03 is instructed, the spindle rotates clockwise by the speed specified.
(Clockwise direction means the direction viewed from the spindle –Z negative direction.)
1.5 Tool selection for various machining——Tool function
It is necessary to select a proper tool when drilling, tapping, boring, milling, etc. is
performed. When a number is assigned for each tool and the number is specified in the program,
the corresponding tool is selected.
6
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 1-5-1
Example When the tool is placed at location 01 in the ATC magazine, the tool can be selected by
specifying T01 code. This is called the tool function.
1.6 Tool figure and tool motion by program
1.6.1 Tool length compensation
Usually several tools are used for machining one workpiece. If instructions such as G0Z0
are executed in a same coordinate system, because tools have different tool lengths, the
distances from tool end to workpiece are different. So it is very troublesome to change the
program frequently.
Fig. 1-6-1-1
Therefore, the length of each tool used should be measured in advance. By setting the
difference between the length of the standard tool and the length of each tool in the CNC (usually
the 1st tool), machining can be performed without altering the program even when the tool is
changed. After the tool positioning in Z axis (e.g. G0Z0), the distances of the tool end to the
workpiece are identical. This function is called tool length compensation.
1.6.2 Tool radius compensation
Because a tool has a radius, if the tool goes by the path given by program, the workpiece will
be cut off a part for a radius wide. To simplify the programming, the program can be run by CNC
around the workpiece with the tool radius deviated, while the transient path of the intersections of
the lines or the arcs can be processed automatically by system.
7
GSK218M CNC SYSTEM Programming and Operation Manual
Tool path using tool radius compensation
Workpiece
Machined part figure
Tool
Fig.1-6-2-1
If diameters of tools are stored in the CNC tool compensation list, the tool can be moved by
tool radius apart from the machining part figure by calling different radius compensation according
to program. This function is called tool radius compensation.
1.7 Tool movement range——stroke
The travel limit switches are fixed at the positive and negative maximum stroke of the
machine X, Y, Z axis respectively. If the overtravel occurs, the moving axis slows down and stops
after it touches the limit switch. And the overtravel alarm is issued. This function is usually called
hardware limit.
The parameter setting can specify the safe tool running range, if the tool exceeds the range,
the system stops all the axes moving with overtravel alarm given. This function is called stroke
verification, namely, the software limit.
Fig. 1-7-1
8
GSK218M CNC SYSTEM Programming and Operation Manual
2 Part Program Composition
2.1 Program composition
A program is composed by many blocks which are formed by words. The blocks are
separated by the end code (LF for ISO,CR for EIA). In this manual the end code is represented by
“;”character.
O00002 N00180
EOB CODE
BLOCK
PROGRAM
END
S0000 T0100
PROGRAM
NAME
SEQUENCE
NO.
ADD: Ln:2
PROGRAM
O00002;
N60 X100 Y0;
N120 X0;
N180 G01 X50 Y50 F2000 ;
N240 G41 X100 D1;
N300 G01 Y100;
N360 G02 X200 R50;
N420 G01 Y0 F2500;
N480 X0;
N540 M30;
WORD
EDIT
【◆PRG】
Fig. 2-1-1 Program structure
The set instructions to control the CNC machine tool to machine the parts are called program.
After the program edited is entered into the CNC system, the system controls the tool to move
【CUR
/
MOD】【DIR】 【MDI】
【CUR/NXT】
along straight line, arc or make the spindle run or stop by these instructions. And the instructions
should be edited by the machine actual movement sequence. The program structure is shown in
Fig.2-1-1.
2.1.1 Program name
In this system the system memory may store many programs. In order to differentiate these
programs, address O with five figures behind it is headed in the beginning of the program. And it is
shown in Fig. 2-1-1-1.
Fig. 2-1-1-1 Program name composition
9
GSK218M CNC SYSTEM Programming and Operation Manual
2.1.2 Sequence number and block
A program is consisted by many instructions, and an instruction unit is called block (see Fig.
2-1-1). The blocks are separated by program end code (see Fig. 2-1-1). In this manual the block
end code is represented by character“;”.
Address N with 4 figures sequence number behind it can be used at the beginning of the
block (see Fig. 2-1-1), and the leading zero can be omitted. The sequence of the sequence number
(insertion set by bit parameter No. 0 # 5) can be arbitrary, and the intervals between them can be
inequal (set by Parameter P210). Sequence number can be either in all blocks, or in some
important blocks. But by common machining sequence, the number should be arranged by
ascending. That the sequence number is placed in important part of the program is for convenience.
(e.g. in tool changing, or worktable indexed to a new plane).
2.1.3 Instruction word
Word is a factor to block composition. It is formed by an address and figures behind it
(sometimes +, - added before figures)
Fig.2-1-3-1 Word composition
The address is a character from English alphabetic table which defines the meaning of the
figure behind it. In this system, the usable addresses and their meaning as well as value range are
shown as Table2-1-3-1:
Sometimes an address has a different meaning for different preparatory function.
If 2 or more identical addresses appear in an instruction, the alarm for it will be set by
parameter N0. 32#6.
Table 2-1-3-1
Address Range Meaning
O
N
G
X
Y
Z
R
I
10
-99999.999~99999.999(mm)
0.001~9999.999(s) Dwell time
-99999.999~99999.999(mm)Y coordinate address
-99999.999~99999.999(mm)
-99999.999~99999.999(mm)
-99999.999~99999.999(mm)
-99999.999~99999.999(mm)
0~99999
0~99999
00~99
Program name
Sequence number
Preparatory function
X coordinate address
Z coordinate address
Arc radius/angle displacement
R level in canned cycle
Arc center vector in X axis relative to start
point
GSK218M CNC SYSTEM Programming and Operation Manual
Address Range Meaning
J
K
F
S
T
M
P
Q
H
D
-99999.999~99999.999(mm)
-99999.999~99999.999(mm)
0~99999(mm/min)
0.001~500(mm/r)
0~99999(r/min)
00~04
0~9999
00~99
1~99999.9999(ms)
1~99999
-99999.9999~99999.9999
(mm)
01~99
00~256
00~256
Arc center vector in Y axis relative to start
point
Arc center vector in Z axis relative to start
point
Feed in a minute
Feed in a revolution
Spindle speed
Multi-gear spindle output
Tool function
Miscellaneous function output, program
executing process, subprogram calling
Dwell time
Subprogram number calling
Cutting depth or hole bottom offset in
canned cycle
Operator for G65
Length offset number
Radius offset number
Special attention should be paid that the limits in table 2-1-3-1 are all for CNC device, but not
for machine tool. Therefore, programming should be done on a basis of good understanding of the
programming limitation of machine builder manual besides this manual.
2.2 General structure of a program
The program is classified for main program and subprogram. Generally, the CNC system is
acutated by the main program. If the main program contains the subprogram call, the CNC system
acts by the subprogram. If the subprogram contains the instruction of returning to main program,
the CNC system returns to the main program to go on execution. The program execution sequence
is shown as Fig.2-2-1.
11
GSK218M CNC SYSTEM Programming and Operation Manual
Fig.2-2-1 Program execution sequence
The structure of the subprogram is same as that of the main program.
If there are fixed sequence blocks occurring repeatedly in a program, it can be taken as a
subprogram which can be stored in the memory in advance with no need to be edited repeatedly.
So it can simplify the program. The subprogram can be called in Auto mode, usually by M98 in the
main program. And the subprogram called can also call other subprograms. The subprogram
called from the main program is called the 1
st
level subprogram. 4 levels subprogram at most can
be called in a program (Fig.2-2-2). The last block in the subprogram must be the returning
instruction M99. After M99 execution, the control returns to next block following the block that calls
the subprogram in the main program to go on execution. If the main program end is M99, the
program execution can be repeated.
Fig. 2-2-2 Two-level subprogram nesting
A single subprogram call instruction can be continuously and repeatedly used to call a
subprogram up to 9999 times.
12
GSK218M CNC SYSTEM Programming and Operation Manual
2.2.1 Subprogram edit
Write out a subprogram by following format:
Write out the subprogram number behind the address O at the subprogram beginning, and
the M99 instruction at the subprogram end (M99 format as above).
2.2.2 Subprogram call
The subprogram is called out for execution by the main program or the subprogram. The
instruction format is as following:
Fig. 2-2-2-1
● If the repeat time is omitted, the default is 1.
Example M98 P1002L5 ;(It means No.1002 subprogram is continuously called for 5
times.)
● Execution sequence of subprogram call from main program
Subprogram call from subprogram are identical with that from main program.
Note 1、Alarm (PS 078) occurs if subprogram number specified by address P is not found.
2、No. 90000~99999 subprograms are the system reserved programs, if they are
called, they can be executed, and can be displayed.
13
GSK218M CNC SYSTEM Programming and Operation Manual
2.2.3 Program end
The program begins with program name, ends with M02, M30 or M99 (see Fig.2-1-1-1). For the
end code M02,,M30 or M99 detected in program execution: if M02, M30 specifies the end, the
program finishes and reset; and M30 can be set by bit parameter N0.33#4 for returning to the program
beginning, and M02 can be set by bit parameter N0.33#2 for returning to the program beginning. if
M99 specifies the end, the control returns to the program beginning to restart the program; if M99 、
M02 and M30 is at the end of the subprogram, the control returns to the program that calls the
subprogram and go on executing the following block.
14
GSK218M CNC SYSTEM Programming and Operation Manual
3 Programming Fundamentals
3.1 Controlled axis
Table 3-1
Item 218M
Basic controlled axes
Extended controlled axes (total) 4 axes
3.2 Axis name
The 3 primary axis names are always X, Y, or Z. And the controlled axes are set by number
parameter No.5. The additional axis names are set by number parameter No.6 accordingly, such as
A, B, C.
3 axes(X, Y, Z)
3.3 Coordinate system
3.3.1 Machine coordinate system
A special point on machine used as machine benchmark is called machine zero, which is set
by the machine builder. The coordinate system set by machine zero taken as origin is called
machine coordinate system. It is set up by manual machine zero return after power is on. Once set,
it remains unchanged till the power off, system reset or emergency stop.
This system uses right-hand Cartesian coordinate system. The motion along spindle is Z axis
motion. Viewed from spindle, the motion of headstock approaching the workpiece is negative Z axis
motion, and departing for positive. The other directions are determined by right-hand Cartesian
coordinate system.
3.3.2 Reference point
There is a special point on CNC machine tool for tool change and coordinate system setup,
which is called reference point. It is a fixed point in machine coordinate system set by machine
builder. By reference point return, the tool can easily move to this position. Generally this point in
CNC milling system coincides with the machine zero, while the reference point of Machine Center is
usually the tool change point.
15
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 3-3-2-1
There are two methods to traverse the tool to reference point:
1. Manual reference point return (see“Manual reference point return”in Operation Manual )
2. Auto reference point return
3.3.3 Workpiece coordinate system
The coordinate system used for workpiece machining is called workpiece coordinate system
(or part coordinate system), which is preset by CNC system (to set workpiece coordinate
system)。
Fig.3-3-3-1
In order to make the tool to cut the workpiece to the figure on drawing by instruction
program according to drawing in the workpiece coordinate system specified by CNC, the
relation of the machine coordinate system and the workpiece coordinate system must be
determined.
The method to determine the relation of these two coordinate systems is called alignment. It
can be done by different methods such as part figure, workpiece quantity.
.
) By part base pointⅠ) When part is fixed on jigⅡ
16
GSK218M CNC SYSTEM Programming and Operation Manual
To align the tool center to the
workpiece base point, specify the workpiece
coordinate system by CNC instructions at
this position, and the workpiece coordinate
system coincides with the programming
coordinate system.
Workpiece coordinate system should be set for each processing program (to select a
workpiece coordinate system). The workpiece coordinate system set can be changed by moving its
origin.
There are two methods to set the workpiece coordinate system:
1. By G92, see 4.2.11 for details.
2. By G code from 54 to 59, see 4.2.8 for details.
Because the tool center can’t be
located at the workpiece base point, locate
the tool to a position (or reference point)
that has a distance to the base point, set
the workpiece coordinate system by this
distance(e.g. G92)
3.3.4 Absolute programming and relative programming
There are absolute and relative definitions to define the axis moving. The absolute definition
is the method of programming by the axis moving final point, which is called absolute
programming. The relative definition is the method of programming by the axis moving, which is
called relative programming (call incremental programming).
1) Absolute coordinate
It is the target position coordinate in the specified workpiece coordinate system, namely the
position the tool to move to.
Fig.3-3-4-1
Move the tool from point A to point B, using the B coordinate in G54 workpiece coordinate
system, the instruction is as following:
G90 G54X10 Y30 Z20 ;
17
GSK218M CNC SYSTEM Programming and Operation Manual
2) Incremental coordinate
It is the target position coordinate relative to the current position by taking the current
position as the origin.
Fig.3-3-4-2
For traversing the tool from point A to point B, the instruction is as following:
G0 G91 X-40 Y-30 Z-10;
3.4 Mode and non-mode
The mode means that the address value set by a block is effective till it is reset by another
block. Another significance of it is that if a functional word is set, it doesn’t need to be input again if it
is used in the following blocks.
¾ e.g. for following program:
G0 X100 Y100; (rapid positioning to the location X100 Y100)
X20 Y30; (rapid positioning to the location X120 Y30, G0 specified by mode can be
omitted)
G1 X50 Y50 F300; (interpolate to location X50 Y50 by straight line with the feedrate
300mm/min G0→G1 )
X100; (interpolate to location X100 Y50 by straight line with the feedrate 300mm/min ,
G1, Z50,F300 are all specified by mode and can be omitted )
G0 X0 Y0; (rapid positioning to the location X0 Y0)
The initial state is the default state after the system power-on. See table 4-1.
¾ For following program:
O00001
X100 Y100; (rapid positioning to the location X100 Y100, G0 is the initial state)
G1 X0 Y0 F100; (interpolate to location X0 Y0 by straight line with the feedrate
100mm/min, G98 is the initial power-on state )
Non-mode means that the relevant address value is effective only in the block contains
this address, if it is used in following blocks, it must be specified again. e.g. G functional
18
GSK218M CNC SYSTEM Programming and Operation Manual
instructions of 00 group in Table 4-1.
Refer to Table 3-4 for mode and non-mode description for functional word.
Table 3-4-1 Mode and non-mode for functional instruction
A group of G functions that can be cancelled by each
other, once executed, they are effective till they are
cancelled by other G functions in the same group.
A group of M functions that can be cancelled by each
other, once executed, they are effective till they are
cancelled by other G functions in the same group.
They are only effective in the block they are specified
and cancelled at the block end.
They are only effective in the block they are specified.
Mode
Non-mode
Modal G
function
Modal M
function
Non-modal G
function
Non-modal M
function
3.5 Decimal point programming
Numerical values can be entered with a decimal point. A decimal point can be used when
entering a distance, time, or speed. Decimal points can be specified with the following addresses:
X, Y, Z, A, B, C, I, J, K, R, P, Q, and F.
Explanation:
1、 The decimal point programming are set by bit parameter NO:33#1. If bit parameter
NO:33#1=1, the programming value unit is mm, inch, or deg; if bit parameter
NO:33#1=0, the programming value unit is the min. moving unit which is set by bit
parameter NO:5#1.
2、 The decimal part that is less than the min. input incremental unit should be omitted.
Example:
X9.87654; When the min. input incremental unit is 0.001mm, it should be X 9.876.
When the min. input incremental unit is 0.0001mm, it should be X 9.8765.
19
GSK218M CNC SYSTEM Programming and Operation Manual
4 Preparatory Function: G code
4.1 Classification of G code
Preparatory function is represented by G code with the number behind it, which defines the
meaning of the block that contains it. G codes are devided by the following two types:
Classification Meaning
Non-mode G code Effective in the block in which it is specified
mode G code Effective till another G code of the same group is specified
Example G01 and G00 are mode G code in the same group.
G01 X _ ;
Z ___ ; G01 effective
X ___ ; G01 effective
G00 Z__; G00 effective
Note: Refer to system parameter list for details.
Table 4-1 G codes and their functions
G code GroupInstruction format Function
*G00 G00 X_Y_Z_ Positioning (rapid traverse)
G01 G01 X_Y_Z_F_ Linear interpolation(cutting feed)
G02 Circular interpolation CW
G03
G04
G10
*G11
*G12
G13
*G15 G15 Polar coordinate instruction cancel
G16
01
00
16
11
G02 R_
G03
G04 P_ or G04 X_
G10L_;N_P_R_
G11
G12 X_Y_Z_ I_J_K_
G13 X_Y_Z_ I_J_K_
G16
X_Y_
I_J_
F_;
Circular interpolation CCW
Dwell, exact stop
Programmable data input
Programmable data input cancel
Storage stroke detection on
Storage stroke detection off
Polar coordinate instruction
*G17
G18
G19
G20 Inch input
*G21
20
02
06
Write in with other program in block,
used for circular interpolation and tool
radius compensation
Specified by a single block at the
program beginning before the
coordinate system set
XY plane selection
ZX plane selection
YZ plane selection
Metric input
GSK218M CNC SYSTEM Programming and Operation Manual
G22
G22_X_Y_Z_R_I_L_W_Q_V_D_F_K
G23 G23_X_Y_Z_R_I_L_W_Q_V_D_F_K
CCW inner circular groove rough
milling
CW inner circular groove rough milling
09
G24 G24_X_Y_Z_R_I_J _D_F_K CCW fine milling cycle within a circle
G25 G25_X_Y_Z_R_I_J _D_F_K CW fine milling cycle within a circle
G26
G26_X_Y_Z_R_I_J _D_F_K CCW outer circle fine milling cycle
G27 G27 Reference point return detection
G28 G28 Reference point return
G29 G29 Return from reference point
00
X_Y_Z_
G30 G30Pn 2nd ,3rd, 4th reference point return
G31
G31
Skip function
G32 G32_X_Y_Z_R_I_J _D_F_K CW outer circle finish milling cycle
GSK218M CNC SYSTEM Programming and Operation Manual
¾ Circle center coordinate or radius, which gives two programming format: Circle center
coordinate I, J ,K or radius R programming
Only the three points above are all confirmed, could the interpolation operation be done
in coordinate system.
The circular interpolation can be done by the following instructions to make the tool to go
along an arc, it is shown as follows:
Arc in XY plane
G02R_
G17
X_Y_
G03
F_;
I_J_
Arc in ZX plane
G02R_
G18
X_Z_
G03
F_;
I_K_
Arc in YZ plane
G02R_
G19
Y_Z_
G03
F_;
J_K_
Table 4-2-3-1
Item Content Instruction Description
G17 Arc specification on XY plane
1 To specify plane
G18 Arc specification on ZX plane
G19 Arc specification on YZ plane
2
3
4
To specify rotation
direction
G90
End position
G91
Distance from start point
to circle center
Two axes of X,Y, Z
Two axes of X,Y, Z
Two axes of I,J, K
G02 CW
G03 CCW
End point coordinate in
axis
workpiece coordinate system
Coordinate of end point
axis
relative to start point
Coordinate of circle center
axis
relative to start point
Arc radius R Arc radius
5 Feedrate F Arc tangential speed
CW and CCW mean the directions viewed from the positive Z(or Y, Z) axis to the negative
in the right-hand Cartesian coordinate system regarding to XY ( or ZX, YZ)plane , as shown in Fig.
4-2-3-1.
26
GSK218M CNC SYSTEM Programming and Operation Manual
Y
G03
G02
X
G17
X
G02
G03
Z
G18
Fig. 4-2-3-1
Z
G03
G02
Y
G19
The default plane mode at power-on can be set by bit parameters NO:31#1, #2, #3.
The arc end point can be specified by parameter words X, Y, Z. It is an absolute value in G90,
an incremental value that is a coordinate of the end point relative to the start point in G91. The
circle center is specified by parameter words I, J, K, corresponding to X, Y, Z respectively. Either in
absolute mode G90, or in incremental mode G91, parameter values of I, J, K are coordinates of
circle center relative to the arc start point (for simplicity, the circle center coordinate when taking
the start point as origin). They are incremental values with signs. See Fig. 4-2-3-2.
End point (X,Y)
End point (Z,X)
End point (Y,Z)
Start pointStart point
Center
J
Center
I
K
I
Center
J
Fig. 4-2-3-2
I, J, K are assigned with sign according to the circle center relative to the start point. The
circle center can also be specified by radius R besides I, J, K.
G02 X_ Y_ R_ ;
G03 X_ Y_ R_ ;
1 Two arcs can be drawn out as following, one arc is more than 180°, the other one is
less than 180°. The radius of the arc more than 180° should be specified by a
negative value.
(e.g. Fig. 4-2-3-3) as arc is less than 180° ①
G91 G02 X60 Y20 R50 F300 ;
Start point
K
as arc is more than 180°②
G91 G02 X60 Y20 R-50 F300 ;
27
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-2-3-3
2 The arc equal to 180° can be programmed either by I, J, K, or by R.
Example: G90 G0 X0 Y0;G2 X20 I10
Equal to G90 G0 X0 Y0;G2 X20 R10
F100;
F100
or G90 G0 X0 Y0;G2 X20 R- 10 F100
Note For the arc 180°, the positive or negative value of R doesn’t affect the arc path.
3 The arc equal to 360° can only be programmed by I, J, K.
(Program example)
Fig. 4-2-3-4
The tool path programming for Fig. 4-2-3-4 is as following:
1. Absolute programming
G90 G0 X200 Y40 Z0;
G3 X140 Y100 R60 F300;
28
GSK218M CNC SYSTEM Programming and Operation Manual
G2 X120 Y60 R50;
Or
G0 X200 Y40 Z0;
G90 G3 X140 Y100 I-60 F300;
G2 X120 Y60 I-50;
2. Incremental programming
G0 G90 X200 Y40 Z0;
G91 G3 X-60 Y60 R60 F3000;
G2 X-20 Y-40 R50;
Or
G0 G90 X200 Y40 Z0;
G91 G3 X-60 Y60 I-60 F300;
G2 X-20 Y-40 I-50;
Restriction
1. If address I, J, K and R are specified together in program, the arc specified by R is in priority
and others are ignored.
2. If both arc radius parameter and the parameter from the start point to the circle center are not
specified, error message will be issued by system.
3. If the circle is to be interpolated, only the parameters I, J, K from start point to circle center but
the parameter R can be specified.
4. Attention should be paid to the coordinate plane selection when the circular interpolation is
being done.
5. If X, Y, Z are all omitted, i.e. the start point and the final point coincides, as well as R is
specified (e.g. G02R50), the tool doesn’t move.
B Helical interpolation
Format:
G02/G03
Fig. 4-2-3-5
Function: It is used to move the tool to a position specified from current position by a feedrate
specified by parameter F in a helical path.
29
Explanation:
GSK218M CNC SYSTEM Programming and Operation Manual
Z
Tool path
X
The feedrate along the circumference of two
circular interpolated axes is the specified feedrate
Y
Fig. 4-2-3-6
The first two bits of the instruction parameter are positioning parameter. The parameter
words are the two axes name (X, Y or Z) in current plane. These two positioning parameters
specify the position the tool is to go to. The third parameter word of the instruction parameter
is a linear axis except the circular interpolation axis. Its value is the helical height. The
significance and restriction for other instruction parameters are identical with circular
interpolation.
If the circle can’t be machined by the system specified instruction parameter, the system
will give error message. And the system changes the current tool moving mode for G02/G03
mode.
Feedrate along the two circular interpolation axes are specified
A moving axis that is not circular interpolation axis is added as for the instruction method,
and F instruction specifies the feedrate along an arc. So the feedrate of this linear axis is as
following:
The feedrate should be ensured that the linear axis feedrate are not beyond any limit.
Restriction Attention should be paid to the coordinate plane selection set when the helical
interpolation is being done.
4.2.4 Absolute/ incremental programming G90/G91
Format: G90/G91
Function: There are 2 instructions for axis moving, the absolute instruction and the incremental
instruction. The absolute instruction is a method of programming by the axis moving
end point coordinate, which is concerned with coordinate system. Refer to section
3.3.1~3.3.4.
The incremental instruction is a method of programming by the axis relative moving.
30
GSK218M CNC SYSTEM Programming and Operation Manual
The incremental value is irrelevant with the coordinate system concerned, it only uses
moving direction and distance of the end point relative to the start point.
The absolute instruction and the incremental instruction are specified by G90 and G91
respectively.
Fig. 4-2-4-1
For the moving from start point to end point in Fig. 4-2-4-1, the programming by absolute
instruction G90 and incremental instruction G91 are as follows:
G90 G0 X40 Y70;
or G91 G0 X-60 Y40 ;
The action can be performed by both programming methods that can be expediently used
by operator.
Explanation:
¾ No instruction parameter. It can be written into the block with other instructions.
¾ G90 and G91 are the same group mode, i.e. if G90 is specified while G91 not, the mode is
G90(default). If G91 specified while G90 not, the mode is G91.
System parameter
G90 mode ( parameter is 1) or G91 ( parameter is 1) mode specified for the default
positioning parameter at power-on can be set by bit parameter NO:31#4.
4.2.5 Dwell(G04)
Format: G04 X_ or P_
Function: The dwell is executed by G04, and the execution of next block is delayed by the time
specified. In addition, a dwell can be specified to make an exact stop check in cutting mode G64.
G04
0~9999.999
X
0~99999.9999
P
X for second
P for millisecond
Explanation:
1 G04 is non-modal instruction, which is only effective in current line.
2 If parameters X, P both appear, parameter X is effective.
3 Alarm occurs if X, P value is set for negative.
4 Exact stop is executed if neither X nor P is specified.
31
GSK218M CNC SYSTEM Programming and Operation Manual
4.2.6 Unidirectional positioning (G60)
Format: G60 X_ Y_ Z_ F_
Overrun
Dwell
Start point
Start point
End point
Fig. 4-2-6-1
Function: For accurate positioning to eliminate machine backlash, G60 can be used for
accurate positioning in a direction.
Explanation:
Dwell
G60 is non-modal code(the modal value can be set by bit parameter NO. 48#0), which is
only effective in a specified block.
For parameter X, Y, Z, they represent the end point coordinate in absolute programming; and
moving distance of tool in incremental programming.
When using unidirectional positioning in tool offset, the path of unidirectional positioning is the
tool compensation path.
The overrun marked in above figure can be set by system parameter P335,P336,P337,P338,
P339, and the dwell time can be set by parameter P334. The positioning direction can be
defined by the set positive or negative overrun, refer to system parameter for details.
Example 1:
G90 G00 X-10 Y10;
G60 X20 Y25; (1)
If the system parameter P334 = 1, P335 = -8, P336 = 5;as for statement (1), the tool path is
AB→dwell for 1s→BC
Y
C(20,25)
20
A(-10,10)
10
—100
102030
Fig. 4-2-6-2
32
B(28,20)
Dwell for 1s
X
System parameter:
GSK218M CNC SYSTEM Programming and Operation Manual
P334
P335
P336
P337
P338
P339
Dwell time of unidirectional positioning
(unit:mm)
Overrun and unidirectional positioning
direction in X axis(unit:mm)
Overrun and unidirectional positioning
direction in Y axis(unit:mm)
Overrun and unidirectional positioning
direction in Z axis(unit:mm)
Overrun and unidirectional positioning
direction in 4th axis(unit:mm)
Overrun and unidirectional positioning
direction in 5th axis(unit:mm)
4.2.7 System parameter online modification (G10)
Function: It is used to set or modify the values of radius, length offset, external zero offset,
workpiece zero offset, additional workpiece zero offset, number parameter, bit
parameter and so on in program.
Format:
G10 L50 N_P _R_; Set or modify bit parameter
G10 L51 N_ R_; Set or modify number parameter
G11; Parameter input mode cancel
Parameter definition:
N: Parameter number. Sequence number to be modified.
P: Parameter bit number. Bit number to be modified.
R: Value. Parameter value after it modified.
The values can also be modified by following instructions, refer to relative sections for details:
G10 L2 P_X_Y_Z_A_B_; Set or modify external zero offset or workpiece zero offset
G10 L10 P_R_; Set or modify length offset
G10 L11 P_R_; Set or modify length wear
G10 L12 P_R_; Set or modify radius offset
G10 L13 P_R_; Set or modify radius wear
G10 L20 P_ X_Y_Z_A_B_; Set or modify additional workpiece zero offset
Note:
1、In parameter input mode, except annotation statement, other NC statement can’t be
specified.
2、G10 must be specified in a single block or the alarm occurs. It should be noted that
the parameter input mode must be cancelled by G11 for after G10 for program
normal use.
3、The parameter value modified by G10 must be within the system parameter range. If
33
GSK218M CNC SYSTEM Programming and Operation Manual
not, alarm occurs.
4、The canned cycle mode must be cancelled prior to G10 execution, or alarm occurs.
5、Those parameters above the user level and effective by restarting after power-off
can not be modified by G10.
4.2.8 Workpiece coordinate system G54~G59
Format: G54~G59
Function: It specifies the currentworkpiece coordinate system. It is used to select workpiece
coordinate system by specifying workpiece coordinate system G code in program.
Explanation:
1. No instruction parameter.
2. 6 workpiece coordinate systems can be set in the system, any of which can be selected
by G54~G59 instruction.
3. G54 (workpiece coordinate system 1) is selected automatically by system after machine
zero return at power-on. The absolute position on displayer is the coordinate set in G54
coordinate system.
G54 ---------------- Workpiece coordinate system 1
G55 ---------------- Workpiece coordinate system 2
G56 ---------------- Workpiece coordinate system 3
G57 ---------------- Workpiece coordinate system 4
G58 ---------------- Workpiece coordinate system 5
G59 ---------------- Workpiece coordinate system 6
4. When different workpiece coordinate system is called by block, the axis for move by
instruction will be located in the new workpiece coordinate system; for the coordinate of
the axis not move, it turns to the corresponding coordinate in the new workpiece
coordinate system and the actual machine position doesn’t alter.
e.g. The corresponding machine coordinate for G54 coordinate system origin is (10,10,10).
The corresponding machine coordinate for G55 coordinate system origin is (30,30,30).
When the program is executed by sequence, the absolute coordinate and the machine
coordinate of the end point are shown as follows:
Table 4-2-8-1
Program Absolute coordinate Machine coordinate
G0 G54 X50 Y50 Z50 50,50,50 60,60,60
G55 X100 Y100 100,100,30 130,130,60
X120 Z80 120,100,80 150,130,110
5. The external workpiece zero offset or workpiece zero offset can be altered by G10, which is
34
GSK218M CNC SYSTEM Programming and Operation Manual
shown as follows:
By instruction G10 L2 Pp X_Y_Z_
P=0 : External workpiece zero offset
P=1 to 6 : Workpiece zero offset of workpiece coordinate system from 1 to 6
X_Y_Z_ : For absolute instruction(G90), it is workpiece zero offset of each
axis
For incremental instruction(G91), it is workpiece zero offset set
plusing each axis(the result is the new workpiece zero offset).
By G10 instruction, each coordinate system can be altered respectively.
Workpiece
coordinate
system 1
(G54)
Machine zero
Machine coordinate origin
Workpiece
coordinate
system 2
(G55)
Workpiece coordinate
system offset
Machine reference point
Fig. 4-2-8-1
Workpiece
coordinate
system 3
(G56)
Workpiece
coordinate
system 4
(G57)
Workpiece
coordinate
system 5
(G58)
Workpiece
coordinate
system 6
(G59)
As shown in Fig. 4-2-8-1, after power-on, the machine returns to machine zero by manual
zero return. The machine coordinate system is set up by machine zero with the machine
reference point generating and workpiece coordinate system to be defined. The corresponding
values of offset number parameter P10~14 in workpiece coordinate system are the integral offset
of the 6 workpiece coordinate system. The 6 workpiece coordinate system origins can be
specified by coordinate offset input in MDI mode or set by number parameter P15~44. These 6
workpiece coordinate systems are set up by the distances from machine zero to each coordinate
system origin.
35
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-2-8-2
Example:
N10 G55 G90 G00 X100 Y20;
N20 G56 X80.5 Z25.5;
For the example above, when N10 block is being executed, it rapidly traverses to a position
(X=100,Y=20)in
When N20 block is being executed, the absolute coordinate value automatically turns to the
coordinate value (X=80.5,Z=25.5)in G55 workpiece coordinate system for rapid positioning.
G55 workpiece coordinate system.
4.2.9 Additional workpiece coordinate system
Except 6 workpiece coordinate systems (from G54 to G59), 50 additional workpiece
coordinate systems can be used.
Format: G54 Pn
Pn: specified additional workpiece coordinate system code
Range : 1~50
The setting and restriction of the additional workpiece coordinate system are the same as
that of workpiece coordinate system from G54 to G59.
The workpiece zero offset in additional workpiece coordinate system can be set by G10, as
following:
By instruction G10 L20 Pn X_Y_Z_
n=1 to 50: Additional workpiece coordinate system code
X_Y_Z_ : Set axis address and offset value for workpiece zero offset.
For absolute instruction (G90), the value specified is the new offset
value.
For incremental instruction (G91), the new offset value can be got by
adding the value specified to the current offset value.
By G10 instruction, each workpiece coordinate system can be changed respectively.
When the P address of the additional workpiece coordinate and the other instructions
containing P address are in a same block, they share this P address together.
36
GSK218M CNC SYSTEM Programming and Operation Manual
4.2.10 Machine coordinate system selection G53
Format: G53 X_ Y_ Z_
Function: To rapidly position the tool to the corresponding coordinate location in the machine
coordinate system.
Explanation:
1 While G53 is used in program, the instruction coordinate behind it should be the
coordinate in the machine coordinate system and the machine will rapidly position to
the location specified.
2 G53 is a non-modal instruction, which is only effective in block containing it, and it
doesn’t affect the coordinate system defined before.
Restriction
Machine coordinate system selection G53
When the position in the machine coordinate system is specified, the tool rapidly traverses
to this position. The G53 used for selecting machine coordinate system is a non-modal G code,
which is only effective for the block specifying the machine coordinate system. Absolute G90
should be specified for G53; if G53 is specified in incremental mode (G91), G91 is neglected
(G53 is still in G90 mode without changing G91 mode). The tool can be specified to move to a
special position, e.g. G53 can be used in program to position the tool to the tool changing point.
After power on
Machine coordinate system must be set before G53 is specified after power on. Therefore,
manual reference point return must be performed after power on(zero return in manual mode)
or auto reference point return must be performed specified by G28. If an absolute position
encoder is used, this operation is unneeded.
Note: when G53 is specified, the tool radius compensation and tool length offset are cancelled
temporarily and they will be restored in the next block.
4.2.11 Floating coordinate system G92
Format: G92 X_ Y_ Z_
Function: It is used to set floating workpiece coordinate system. The current tool absolute
coordinate values in the new workpiece coordinate system are specified by 3
instruction parameters. And this instruction doesn’t’ result in the axis movement.
37
GSK218M CNC SYSTEM Programming and Operation Manual
Explanation:
G92 floating coordinate system
Machine zero
Machine coordinate origin
Fig. 4-2-11-1
1、 As the figure shows, the origin of the G92 floating coordinate system is the value in
machine coordinate system, which is irrelevant to the workpiece coordinate system, it can
be set up after the machine zero return.
G92 setting is effective in the following conditions:
1) Before system power off
2) Before workpiece coordinate system is called
3) Before machine zero return
The G92 floating coordinate system is usually used for the alignment of temporary
workpiece machining and it will be lost after the power is off. And G92 is usually used at
the program beginning or specified in MDI mode before the program auto run.
2、 There are two methods for defining the floating coordinate system:
(1)By tool nose:
Fig. 4-2-11-2
As fig. 4-2-11-2 shows, for G92 X25 Z23,take the position the tool nose locates at as the
point(X25, Z23)in the floating coordinate system,
(2)By a fixed point in the arbor as a basic point:
38
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-2-11-3
As Fig. 4-2-11-3 shows, specify the workpiece coordinate system by block “G92 X600
Y1200”(by a basic point in the arbor as a start point). Regarding a basic point as the start point, if
the motion is specified by the absolute value in the program, the basic point is moved to the
specified position and it must be added the tool length compensation value, which is the
difference of the basic point to the tool nose.
Note: 1 If G92 is used for coordinate system setting in tool offset, the coordinate system
is the one set by G92 as to the tool length compensation without the offset
value added.
2 For tool radius compensation, the tool offset should be cancelled if G92 is
used.
Restriction
After floating coordinate system is set, the 1
st
canned cycle instruction should be in a
complete format, or the tool move will be wrong.
4.2.12 Plane selection G17/G18/G19
Format:G17/G18/G19
Function: For circular interpolation, tool radius compensation, drilling or boring, plane
selection is needed, which can be selected by G 17/G18/G19.
Explanation:
It has no instruction parameter. The system default at power-on is G17 plane if parameter is
not specified. It can also be set by bit parameter NO.31#1, #2, #3. The relation of the instruction
and the plane is as following:
G17-------------XY plane
G18-------------ZX plane
G19-------------YZ plane
39
GSK218M CNC SYSTEM Programming and Operation Manual
Plane is not changed if G17,G18,G19 is not specified in the block.
For example:
G18 X_ Z_; ZX plane
G0 X_ Y_; Plane unchanged (ZX plane)
In addition the moving instruction is irrelevant to the plane selection. e.g. in the following
instruction, Y axis is not in the ZX plane, so the Y axis moving is irrelevant to ZX plane.
G18Y_;
Annotation: Only the canned cycle in G17 plane is available in this system at present. For
criterion or astringency, plane should be expressly defined in the corresponding
block, especially in a system used by many users, which can avoid the incident
or abnormity caused by programming error.
4.2.13 Polar coordinate system setup/cancel G16/G15
Format: G16/G15
Function:
G16 is used for the setup of the polar
coordinate system of the positioning parameter.
G15 is used for the cancellation of the polar coordinate system of the positioning parameter.
Explanation:
No command parameter.
If G16 is set, the coordinate can be input by polar coordinate radius and angle. The positive of
angle is the CCW direction of the 1
st
axis positive direction in a plane selected; while the negative is
CW direction. Both the radius and angle can use the absolute or incremental instructions(G90 ,
G91).
If G16 is used, the 1
represents the polar radius in polar coordinate system, the 2
st
axis of the positioning parameter of the tool moving command
nd
axis of that represents the polar
angle in polar coordinate system.
If G15 is specified, the polar coordinate system can be cancelled and the control returns to
the Cartesian coordinate system.
The definition of the polar coordinate system origin:
1 In G90 absolute mode, if G16 is specified, the workpiece coordinate system origin is regarded
as the polar coordinate system origin.
40
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-2-13-1
2 In G91 incremental mode, if G16 is specified, the current point is regarded as the polar
coordinate system origin.
Example: Bolt hole circle (the workpiece coordinate system zero point is set as the polar
coordinate system origin, selecting X-Y plane)
Fig. 4-2-13-2
zTo specify angle and radius by absolute value
G17 G90 G16; To specify polar coordinate system and take the workpiece coordinate system
zero point in X-Y plane as the polar coordinate system origin
G81 X100.0 Y30.0 Z-20.0 R-5.0 F200.0; To specify 100mm distance and 30°angle
Y150; To specify 100mm distance and 150°angle
Y270; To specify 100mm distance and 270°angle
G15 G80; To cancel the polar coordinate system
z
To specify angle by incremental value, polar radius by absolute value
G17 G90 G16; To specify the polar coordinate system and take the workpiece coordinate
system zero point in X-Y plane as the polar coordinate system origin
G81 X100.0 Y30.0 Z-20.0 R-5.0 F200.0; To specify 100mm distance and 30°angle
G91 Y120;
Y120;
G15 G80;
To specify 100mm distance and 150°angle
To specify 100mm distance and 270°angle
To cancel the polar coordinate system
Moreover, when programming by polar coordinate system, the current coordinate plane setting
should be considered. And the polar coordinate plane and the current coordinate plane are
41
GSK218M CNC SYSTEM Programming and Operation Manual
relevant. e.g. in G91 mode, if the current coordinate plane is specified by G17, the origin of it is
defined by the X,Y axis components of the current tool position. If the current coordinate plane is
specified by G18, the origin of it is defined by the Z, X axis components of the current tool position.
Fig. 4-2-13-3
If the positioning parameter of the 1
current position is the default positioning parameter of the hole cycle. The 1
st
hole cycle after G16 instruction is not specified, the tool
st
canned cycle
instruction after the current polar coordinate must be complete, or the tool moving will be wrong.
After G16 instruction, except the hole cycle, the words of the positioning parameter for tool
moving involves with the special plane selection mode. While the polar coordinate system is
cancelled by G15 which followed by a moving instruction, the tool current position is defaulted as
the start point of the moving instruction.
4.2.14 Scaling in plane G51/G50
Format:
G51 X_ Y_ Z_ P_ (X、Y、Z: Absolute instruction for scaling center coordinate, P: axis scaling by
a same ratio)
… Scaling processing blocks
G50 Scaling cancel
or G51 X_ Y_Z_ I_ J_ K_(scaling by different ratios (I, J, K)by each axis)
… Scaling processing block
G50 Scaling cancel
Function:
G51 is used for the programming figure scaling in a same or different ratio by a position
specified as the center. G51 is needed to be specified in a single block and cancelled by G50.
42
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-2-14-1 Scaling (P1'P2P3P4→ P1’P2’P3’P4')
Explanation:
1 Scaling center: G51 can be specified with 3 positioning parameters X_Y_Z_, which are
optional. These positioning parameters are used to specify the scaling center of G51. If they
are not specified, the tool current position will be specified for the scaling center. Whether the
positioning mode is absolute or incremental, the scaling center is specified by the absolute
positioning mode. Moreover, in polar coordinate system G16 mode, the parameters in G51 are
expressed by Cartesian coordinate system.
Example:
G17 G91 G54 G0 X10 Y10;
G51 X40 Y40 P2; Though in incremental mode, the scaling center means the
absolute coordinate(40,40)in G54 coordinate system
G1 Y90; By incremental mode as for parameter Y
2 Scaling: whether the current mode is G90 or G91, the scaling are always expressed by
absolute mode.
Except specified in program, the scaling can also be specified in parameters. The number
parameters P331~335 correspond to the scaling ratios of X, Y, Z, 4
TH
and 5th respectively. If
no scaling is specified, the number parameter P330 can be used for scaling setting.
If the parameter P or I, J, K value specified are negative, the mirror image is made for the
corresponding axis.
3 Scaling setting: The effectiveness of the X axis scaling is set by bit parameter NO:47#3,
the effectiveness of the Y axis scaling is set by bit parameter NO:47#4, the effectiveness of
the Z axis scaling is set by bit parameter NO:47#5, and the scaling ratio of each axis is set
by bit parameter NO:47#6. (0: instructed with P, 1: instructed with I, J, K.)
4 Scaling cancellation: After the scaling is cancelled by G50 followed by a moving instruction, if
the coordinate rotation is cancelled by default, the current tool position is regarded as the
43
GSK218M CNC SYSTEM Programming and Operation Manual
start point of this moving instruction.
5 In scaling mode, G codes for reference point return (G27~G30 etc.)and coordinate system
specification(G52~G59 , G92 etc.)can’t be specified. If needed, they should be specified
after the scaling is cancelled.
6 Even different scalings are specified for circular interpolation and axes, the ellipse path cann’t
be made by tool.
If the scaling ratios of the axes are different and the circular interpolation are programmed by
R, the interpolation figure is shown as Fig. 4-2-14-2, (below the scaling ratio of X is 2, that of
Y is 1)
Above commands are equivalent to the following one:
G90 G0 X0 Y0 Z0;
G02 X200 Y0 R200 F500;
Scaling of radius R depends on I or J which is larger
Y
Scaled shape
(0,0)
Fig. 4-2-14-2 Scaling of circular interpolation 1
(100,0)(200,0)
If the axes scaling ratio are different, and the circular interpolation is programmed by I, J,
K. if the arc is failed, alarm for it occures by the system.
7 Scaling is ineffective for the tool radius compensation, tool length compensation and tool offset,
which is shown in Fig. 4-2-14-3.
X
44
GSK218M CNC SYSTEM Programming and Operation Manual
Programmed figure
Scaled figure
The tool radius compensation values are not scaled
F i g. 4-2-14-3Scaling of tool radius compensation
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-2-14-4
Restriction
1 The moving scaling of Z axis is ineffective in following canned cycles:
1) The cut-in value Q and retraction value d of peck drilling cycle(G83, G73)
2) Fine boring cycle(G76).
3) Offset value Q of X axis and Y axis in back boring cycle(G87).
2 In MANUAL mode, the traverse distance can’t be in creased or de creased by scaling .
Note: 1 The position is displayed by scaling coordinates.
2 The result for an axis performing mirror image in a specified plane is as
following:
1)Circular instruction……………….reverse direction of rotation
2)Tool radius compensation C……….reverse direction of offset
3)Coordinate system rotation…………….reverse direction of rotation angle
4.2.15 Coordinate system rotation G68/G69
A programmed shape can be rotated. When a workpiece comprises some identical shapes,
this function can be used for programming by prepairing a subprogram for the shape unit, then
calling it by rotation function.
Format:
Function: G68 is used for the programming shape in plane rotating by a center point specified
G17 G68 X_ Y_ R_
or G18 G68 X_ Z_ R_
or G19 G68 Y_ Z_R_
G69
as an origin. G69 is used for cancellation of coordinate system rotation.
46
GSK218M CNC SYSTEM Programming and Operation Manual
Y
Angle of rotation
Explanation:
1 G68 is an optional parameter with 2 positioning parameters that are used for specifying
the rotation center. If the rotation center is not specified, the tool current position is
regarded as the center by system. The positioning parameters are relevant to the
current coordinate plane, while X, Y for G17; Z, X for G18; Y, Z for G19.
2 Whether the current positioning mode is absolute or incremental, the rotation center
can only be specified by absolute positioning of Cartesian coordinate system.
G68 can be followed by a command parameter R, the value of the parameter is the
angle to be rotated. The positive value is for CCW rotation and the angle unit is degree.
If no rotation angle is specified in this function, the angle will be set by number
parameter P329.
3 In G91 mode, the rotation angle by increment is set by bit parameter NO: 47#0 (rotation
angle of coordinate system, 0: by absolute instruction; 1: by G90/91 instruction ).
Center of rotation
Fig. 4-2-15-1
X
4 When the system is in rotation mode, plane selection is not allowed, or errors will be
shown. Attention should be paid in programming.
5 In coordinate system rotation mode, G codes for reference point return (G27~G30
etc.)and coordinate system specification(G52~G59 , G92 etc.)can’t be specified.
They should be specified after the scaling is cancelled if needed.
6 After coordinate system rotation, the tool radius compensation, tool length
compensation, tool offset and other compensation operation will be performed.
7 If coordinate system rotation is performed in scaling mode(G51), the rotation center
coordinate values will be scaled. but the rotation angle is not scaled, when the moving
instruction is given, the scaling will be executed first, then the coordinate system
rotation.
Example 1: Rotation
G92 X-50 Y-50 G69 G17;
G68 X-50Y-50 R60;
47
GSK218M CNC SYSTEM Programming and Operation Manual
GSK218M CNC SYSTEM Programming and Operation Manual
Programmed path
(0,0)
When offset is applied
(0,-20)
(14.142,-14.142)
(8.284,-20)
subprogram
Fig. 4-2-15-4
4.2.16 Skip function G31
Format: G31 X_Y_Z_
Function: The linear interpolation can be specified like G01 after G31 instruction. During the
execution of G31, the current instruction execution will be interrupted to execute
next block if an external skip signal is entered. While the working end point is
specified not by programming but by signals from machine, this function can be
used (e.g. used for grinding). It can also be used for measuring the workpiece
dimensions.
Explanation:
1、 G31 is a non-mode G code that is only effective in a specified block.
2、 Alarm occurs if G31 is given during the tool radius compensation. The tool radius
compensation should be cancelled before G31 in struction .
Example:
The block after G31 is a single axis moving specified by incremental values, as Fig. 4-2-16-1
shows:
Skip signal is input here
50
Y
100
X
Fig. 4-2-16-1 A single axis moving specified by incremental values of next block
50
Actual motion
Motion without skip signal
GSK218M CNC SYSTEM Programming and Operation Manual
The block after G31 is a single axis moving specified by abso lute values, as F ig. 4-2-16-2 shows:
G31 G90 X200 F100;
Y100;
Y100
Skip signal is input here
Y
X200
Actual motion
X
Fig. 4-2-16-2 Single axis moving specified by absolute values of next block
The block after G31 is 2-axis moving specified by absolute values, as Fig. 4-2-16-3 shows:
Y
Skip signal is input here
100
(300,100)
Motion without skip signal
Actual motion
Motion without skip signal
X
100200300
Fig. 4-2-16-3 2-axis moving specified by absolute values of next block
4.2.17 Inch/metric conversion G20/G21
Format: G20: input by inch system
G21: input by metric system
Function: They are used for the inch/metric input conversion in program.
Explanation:
1 This function must be specified by a single block at the beginning of the program before
the coordinate system setup.
2 Change the unit of the following item after the inch/metric conversion:
Feedrate specified by F code
Position instruction
Workpiece zero offset value
Tool compensation value
51
GSK218M CNC SYSTEM Programming and Operation Manual
Scale unit of MPG
Mov i ng di s tanc e i n incremental feeding
The G code status at power-on is the same as that in power-off.
Note: 1 Inch/metric conversion can’t be executed during the program execution.
2 The tool compensation value must be preset by the minimum incremental
input unit when inch system is converted to metric system or the reverse.
3 For the 1
st
G28 instruction, th e running from the intermediate point is the same
as the MANUAL reference point return when inch system is converted to
metric system or the reverse.
4 When the minimum incremental input unit is different from the minimum
command unit, the maximum error that is not accumulated is the half of the
minimum command unit .
5 The inch/metric system for program input can be set by bit parameter NO:00#2.
6 The inch/metric system for program output can be set by bit parameter NO:03#0.
4.2.18 Optional angle chamfering/corner rounding
Format: L_:chamfering
R_:corner rounding
Function: When the above instruction is added to the end of a block that specifies linear
interpolation(G01)or circular interpolation(G02, G03), a chamfering or corner
rounding is automatically done in the machining. Blocks specifying chamfering
and corner rounding can be specified consecutively.
Explanation:
1、 Blocks specifying chamfering and corner rounding can only be inserted between the linear
interpolation blocks.
2、 The chamfer ing after L is used to specify the distance from the virtual corner point to the
start and the end point. The virtual corner point is the corner point that exists if chamfering
is not performed. As the following figure shows:
52
GSK218M CNC SYSTEM Programming and Operation Manual
(1)G91 G01 X100 ,L10;
(2)X1 00 Y100;
Inserted charming blcok
L
L
Fig. 4-2-18-1
3、 The corner rounding after R is used to specify the radius for corner. As the following figure
shows:
(1)G91 G01 X100 ,R10;
(2)X100 Y100;
Center of a circle with radius R
R
Fig. 4-2-18-2
Restriction
Virtual corner intersection
1 Chamfering and corner rounding can only be performed in the plane specified, and
these functions can’t be performed for parallel axes.
2 If the inserted chamfering or corner rounding block causes the tool to go beyond the
original interpolation move range, alarm is issued.
3 Corner rounding can’t be specified in a threading block。
4 The chamfering and corner rounding value can’t be negative, or alarm is issued.
4.3 Reference point G code
The reference point is a fixed point on a machine tool to which the tool can easily be moved by
the reference point return function. There are 3 instructions for reference point as is shown in Fig.
4-3-1-1, the tool can be automatically moved to the reference point via an intermediate point along
an axis specified by G28; or from the reference point automatically to a specified point via an
intermediate point along a specified axis by G29.
53
GSK218M CNC SYSTEM Programming and Operation Manual
(3)
R (Reference position)
(2)(4)
(1)
(Intermediate point)
A
(return to the start point
of reference position)
B
Fig. 4-3-1
(5)
C
(return to target point
from reference position)
4.3.1 Reference point return G28
Format: G28 X_ Y_ Z_
Function: It is used for the operation to return to the reference point (a special point on
machine) via an intermediate point.
Explanation:
Intermediate point:
An intermediate point is specified by an instruction parameter in G28, which can be expressed
by absolute or incremental instructions. During the execution of this block, the coordinate value of
the intermediate point of the axis specified is stored that is to be used for the G29(returning from the
reference point) instruction.
Note: The coordinate value of the intermediate point is stored in the CNC system. Only
the axis coordinate value specified by G28 is stored each time, for the other axes
not specified by G28, the coordinate values specified by G28 before are used. If
the intermediate point defaulted by the system is not ensured by user when using
G28 instruction, it is better to specify all the axes. Take a consideration by N5
block in the following example 1.
(3)
R (reference position)
(2)(4)
(1)
B
(5)
AC
Fig. 4-3-1-1
54
GSK218M CNC SYSTEM Programming and Operation Manual
1 The action of the G28 block can be analyzed as following: (refer to Fig.4-3-1-1):
(1) Positioning to the intermediate point of the specified axis from the current position (point
A→point B) at a traverse speed.
(2) Positioning to the reference point from the intermediate point (point B →point R) at a
traverse speed.
2 G28 is a non-mode instruction which is only effective in current block.
3 The combined reference point return of a single axis or multiple axes is available in this system.
And the intermediate point coordinate is saved by system during the workpiece coordinate
system change.
Example 1:
N1 G90 G54 X0 Y10;
N2 G28 X40 ; Set the intermediate point of X axis for X40 in G54 workpiece coordinate
N3 G29 X30 ; Return to the point (30,10) via point(40,10)from reference point, i.e. target
N4 G01 X20;
N5 G28 Y60 ; Intermediate point(X40,Y60), which is substituted by X40 specified by G28
N6 G55; Due to workpiece coordinate system change, the intermediate point (40,60)
system, and return to reference point via point(40,10), i.e. reference point
return of single X axis
point return of single X axis
before due to it is not specified in X axis.
Note The intermediate point is not (20,60).
in G54 workpiece coordinate system is changed for (40,60) in G55
workpiece coordinate system.
N7 G29 X60 Y20; Return to the point (60, 20) via the intermediate point (40,60) in G55
workpiece coordinate system from reference point
The G28 instruction can automatically cancel the tool compensation and this instruction is
only used in automatic tool change mode( changing tool at the reference point after reference
point return). So the tool radius compensation and tool length compensation should be cancelled
st
before using this instruction. See the 1
reference point setting in number parameter P45~P49.
4.3.2 2nd, 3rd, 4th reference point return G30
There are 4 reference points in machine coordinate system. In a system without an
absolute-position detector, the
the auto reference point return( G28) or manual reference point return is performed.
Format:
G30 P3 X_ Y_ Z_; the
55
G30 P2 X_ Y_ Z_;the 2nd reference point return (P2 can be omitted)
2nd, 3rd, 4th reference point return functions can be used only after
3rd reference point return
GSK218M CNC SYSTEM Programming and Operation Manual
G30 P4 X_ Y_ Z_; the 4
Function: It is used for the operation of returning to the specified point via the intermediate point
specified by G30 from the reference point.
Explanation:
1 X_ Y_ Z_; Instruction for specifying the intermediate point (absolute/ incremental)
2
The specification and restriction for G30 instruction is the same as G28 instruction.
th
reference point return
See number parameter P50~64 for the
3 The G30 code can also be used together with G29 code (return from reference
point), whose setting and restriction are identical with G28 code.
2nd, 3rd, 4th reference point setting.
4.3.3 Automatic return from reference point G29
Format:
Function: It is used for the operation of returning to a specified point via the intermediate
Explanation:
1 The action of the G29 block can be analyzed as following: (refer to Fig.4-3-1-1):
2 G29 is a non-modal instruction which is only effective in current block. Usually return from
G29 X_ Y_ Z_
point specified by G28, G30 from the reference point (or current point).
(1) Positioning to the intermediate point (point R→point B) specified by G28, G30 from the
reference point at a traverse speed.
(2) Positioning to a specified point from the intermediate point (point B →point C) at a
traverse speed.
reference point should be specified immediately after G28, G30 instruction.
3 The optional parameters X,Y and Z in G29 instruction are used for specifying the target point
(i.e. point C in Fig. 4-3-1-1) from the reference point, which can be expressed by absolute or
incremental instruction. The instruction specifies the incremental value from the intermediate
point in incremental programming. If an axis is not specified it means the axis has no moving
relative to the intermediate point. The G29 instruction followed by an axis is a single axis
return with no action taken by other axes.
Example 1
G90 G0 X10 Y10;
G91 G28 X20 Y20; Reference point return via the intermediate point(30,30)
G29 X30; Return to (60,30) from the reference point via the intermediate point(30,
30).
Note: The component in X axis should be 60 in incremental programming.
The intermediate point of G29 instruction is assigned by G28, G30. Refer to G28
explanation for the definition, criterion and system default of the intermediate point.
56
GSK218M CNC SYSTEM Programming and Operation Manual
4.3.4 Reference point return check G27
Format: G27 X_ Y_ Z_
Function: It is used for the reference point return check; the reference point is specified by
X_ Y_ Z_ (absolute/incremental instruction).
Explanation:
1、 G27 instruction positions the tool at a traverse speed. If the tool reaches the reference
point, the reference point return indicator lights up. However, if the position reached by the
tool is not the reference point, an alarm is issued.
2、 In machine lock mode, even G27 is specified and the tool has automatically returned to the
reference point, the indicator for return completion doesn’t light up.
3、 In an offset mode, the position to be reached by the tool with G27 instruction is the position
obtained by adding the offset. Therefore, if the position with the offset added is not the
reference point, the indicator does not light up, and an alarm is issued. Usually the tool
offset should be cancelled before G27 instruction.
4.4 Canned cycle G code
Canned cycle make it easier for the programmer to creat programs. With a canned cycle, a
machining operation by multiple blocks can be realized by a single block which contains G function.
(In this system only canned cycle in G17 plane is available)
The general process of canned cycle:
A canned cycle consists of a sequence of 6 operations, as Fig. 4-4-1 shows:
Fig. 4-4-1
57
GSK218M CNC SYSTEM Programming and Operation Manual
Operation 1: Positioning of axes X and Y (may including another axis)
Operation 2: Traverse to point R level
Operation 3: Hole machining
Operation 4: Operation at the bottom of a hole
Operation 5: Retraction to point R level
Operation 6: Traverse to the initial point
The hole machining can be performed in Z axis if positioned in XY plane. It defines that a
canned cycle operation is determined by 3 types. They are all specified by G code.
1) Data type
G90 absolute mode; G91 incremental mode
2) Return point plane
G98 initial level; G99 R level
3) Groove machining type
G22、G23、G24、G25、G26、G32、G33、G34、G35、G36、G37、G38。
4) Hole machining type
G73, G74, G76, G81~G89
Initial level and R level
Initial level It is the absolute position where the tool locates in Z axis before the canned
cycle.
R level It is also called safe plane, it is a position in Z axis when the traverse is switched
to the feeding in canned cycle, which is usually positioned at a distance from the
workpiece surface to prevent the tool from colliding with the workpiece and
provide a sufficient distance to finish the acceleration. The instructions of
G73/G74 /G76/G81 ~ G89 specify all the data( hole location data, hole
machining data, repetition) , by which a block is constituted.
The format for hole machining is shown as following:
Therein, the significance of the hole location data and machining data is as following Table 4-4-1:
Table 4-4-1
Designation
Hole
machining
Parameter
word
G
Refer to Table 4-4-3,note the restrictions above。
Explanation
58
Data for hole
location
Data for hole
machining
GSK218M CNC SYSTEM Programming and Operation Manual
The hole location is specified by absolute value or
X,Y
incremental value and the control is identical to the G00
positioning.
As Fig. 4.4.2(A) shows, the distance from point R level to the
hole bottom is specified by incremental value, or the hole
Z
bottom coordinate is specified by absolute value. And the
feedrate is the speed specified by F in operation 3; while in
operation 5, it is a traverse speed or a speed specified by F
code due to the different machining type.
In Fig. 4.4.2(B), the distance from the initial level to point R
R
level is specified by incremental value or point R level
coodinate is specified by absolute value. The speeds in
operation 2 and 6 are both traverse.
Q
It is used to specify the cut-in value or the parallel moving
value in G76 or G87.
It is used to specify the dwell time at the hole bottom. The
canned cycle instruction can be followed by a parameter P_ ,
P
which specifies the dwell time after the tool reaches the Z
plane. The time unit is ms. The min. value of the parameter
can be set by number parameter P281, and the max. value by
number parameter P282.
F It is used to specify the cutting feedrate.
The repetition is specified in parameter K_, which is effective
only in the specified block. It can be omitted and the default is
K
one time. The max. drilling times are 99999. If a negative
value is specified, it executes by absolute values. If zero is
specified, the mode is changed without drilling operation.
Restriction
¾ The canned cycle is mode instruction, which is effective till it is cancelled by a G code.
¾ G80 and G codes in 01 group are used for cancelling canned cycle.
¾ The processing data once specified in canned cycle are effective till the canned cycle is
cancelled. Therefore, after all the processing data required for hole machining are specified in
the beginning of the canned cycle, only the data to be changed is needed to be respecified in
the following canned cycle.
Note
1 The feedrate specified by F remains effective even the canned cycle is cancelled.
2 In single mode, the canned cycle has 3 stage working type, positioning→R level→initial level
3 In canned cycle, the data of hole machining and hole position will be eliminated if the system is
reset. The instance of dada retained and eliminated is shown as following table:
59
GSK218M CNC SYSTEM Programming and Operation Manual
Table 4-4-2
No.
①
②
Designation of
data
G00X-M3;
G81X-Y-Z-R-F-;
Specify values for Z, R, F in the beginning.
Explanation
G81,Z-R-F- can be omitted due to the identical hole
Y-;
③
machining mode and data specified in ②. Drill the hole for
the length Y once by G81.
④
G82X-P-;
Move in X axis relative to hole . Do the hole machining ③
by G82 and data Z,R,F specified in and P in . ②④
⑤G80X- Y- Hole machining is not performed. Cancel all the hole data.
Because all data are cancelled in , Z, R needs to be ⑤
G85X-Z-R-P-;
⑥
respecified and F that remains can be omitted. P is saved
but not needed in this block.
⑦
⑧
⑨
X- Z-;
G89X-Y-;
G01X-Y-;
It is a hole machining with a different Z value to . And ⑥
there is moving only in X axis.
Do the hole machining by G89 according to the data Z
specified in , R, P in⑦ and F in .⑥②
Cancel the hole machining mode and data.
A Absolute instruction and incremental instruction in canned cycle G90/G91
The change of G90/G91 along drilling axis is shown as Fig. 4-4-2. (Usually it is programmed by
G90, if it is programmed by G91, Z and R are regarded as negative values.)
(A)(B)
Fig. 4-4-2
B Return to initial level in canned cycle G98/G99
After the tool reaches the bottom of a hole, it may return to the point R level or the initial level.
60
GSK218M CNC SYSTEM Programming and Operation Manual
These operations can be specified by G98 and G99.
Generally, G99 is used for the 1
st
drilling operation and G98 is used for the last drilling
operation. The initial level does not change even drilling is performed in G99 mode. The following
figure illustrates the operation of G98 and G99.
G98 is the system default mode.
G9 8 (re tu rn to in itia l lev e l )
Initia l l e v e l
G99 (return to point R level)
Fig. 4-4-3
The following symbols are used for the canned cycle illustration:
CCW finish-milling within a circle cycle
CW finish-milling within a circle cycle
CCW outer circle finish-milling cycle
CW outer circle finish-milling cycle
61
GSK218M CNC SYSTEM Programming and Operation Manual
G33 Feed
G34 Feed
4.4.1 Rough milling of inner circular groove G22/G23
Format:
G22
G98/G99 X_ Y_ Z_ R_ I_ L_ W_ Q_ V_ D_ F_ K_
G23
Function: They are used for circular interpolations from the circle center by helical type till the
circular groove programmed is machined.
62
GSK218M CNC SYSTEM Programming and Operation Manual
Explanation:
G22: CCW inner circular groove rough milling
G23: CW inner circular groove rough milling
X、Y:The start point within X, Y plane
Z: Machining depth, which is absolute position in G90 and position to R reference
level in G91
R: R reference level, which is absolute position in G90 and position to start point of this block in
G91
I: Circular groove radius, it should be over the current tool radius
L: Cut width increment within XY plane, less than tool diameter but more than 0;
W:Initial cut depth in Z axis, which is the distance below R reference level and it
is over 0( if the initial cut depth exceeds the groove bottom, it should machine by
this bottom) ;
Q:Cut depth of each feed;
V:Distance to the end surface at rapid tool traverse, which is over 0;
D:Tool diameter number, ranging within 0 ~ 256, D0 is defaulted for 0. The current tool
diameter value is got by the given number.
K:Repetitions.
Cycle process:
Rapid t⑴o a location in XY plane;
Rapid down to R level; ⑵
⑶ To cut W depth downward by cutting feedrate; ⑷ From center outward to mill a circle surface with a radius I helically by a L increment
each time;
Z axis rapidly returns to R level;⑸
X, Y⑹ axes rapidly position to the circle center;
Z axis rapid downward to a location with a distance V to the end surface; ⑺
To cut a⑻(Q+V)depth downward in Z axis;
Repeat the actions from ⑼(4)~(8)till the total depth of circle surface is finished;
Return⑽ to initial level or R level according to G98 or G99 instruction.
Instruction path:
63
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-4-1-1
G22: CCW inner circle groove rough milling
Y
2I-D
Note:D is the tool diameter value
is the helical radius coefficient
Tool
Tool center path
L
X
D*
Circle groove border
Feed point
2I
Fig. 4-4-1-2
G23: CW inner circle groove rough milling
Y
2I-D
Note:D is the tool diameter value
is the helical radius coefficient
Tool
Tool center path
L
D*
Circle groove border
Feed point
2I
X
Fig. 4-4-1-3
64
GSK218M CNC SYSTEM Programming and Operation Manual
Note:1、The NO: 12#1 should be set to 1 when the instruction is used.
2、When the helical radius coefficient in groove cycle is set to 0, the system uses linear feed
instead of helical ; if the programmed speed is over F15, it feeds by the speed of F15, if
the programmed speed is less than F15, it feeds by the programmed one.
Example: To rough mill a groove within a circle by canned cycle G22 instruction, which is as
follows:
Fig. 4-4-1-4
G90 G00 X50 Y50 Z50; (G00 rapid positioning)
G99 G22 X25 Y25 Z-50 R5 I50 L10 W20 Q10 V10 F800;
(Groove rough milling cycle within a circle)
G80 X50 Y50 Z50; (Canned cycle cancel and return from R level)
M30;
Cancellation:G codes of 01 group (G00 to G03), G60 modal G code (bit parameter NO: 48#0
is set to 1) and G22/G23 cannot be specified in a same block, or G22/G23 will
be cancelled.
Tool offset:The tool radius offset in canned cycle is ingnored.
4.4.2 Fine milling cycle within a circle G24/G25
Format:
G24
G98/G99 X_ Y_ Z_ R_ I_ J_ D_ F_ K_
G25
Function: They are used to fine mill a circle by a radius I and direction specified and the tool
returns after milling.
Explanation:
G24: CCW fine milling within a circle
G25: CW fine milling within a circle
X、Y:The start point position within X, Y plane
Z:Machining depth which is absolute position in G90 and position to R reference level
65
GSK218M CNC SYSTEM Programming and Operation Manual
in G91
R: R reference level which is absolute position in G90 and position to start point of this block in
G91
I: Milling circle radius, ranging within 0 mm ~9999.999mm, use absolute value if it is a
negative one;
J: Distance of fine milling start point to circle center, ranging with 0 mm ~9999.999mm,
use absolute value if it is a negative one;
D:Tool diameter number, ranging within 0 ~256. D0 is defaulted for 0. The tool
diameter value is obtained by the given number.
K:Repetitions
Cycle process:
Rapid to a location within XY plane;⑴
Rapid down to R le⑵vel;
Feed to the hole bottom;⑶
⑷ To position to the start point from current position at the bottom;
To interpolate by the transition arc 1 from the start point;⑸
⑹To make circular interpolation for the whole circle by inner arc path of finish-milling.
To make circular interpolation by transition arc 4 and return to the start ⑺
point;
Return to the initial level or R level according to G98 or G99 instruction.⑻
Instruction path:
Fig. 4-4-2-1
Note:TheNO: 12#1 should be set to 1 when this instruction is used.
Example: To fine mill a circular groove that has been rough milled as following by canned cycle
G24 instruction:
66
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-4-2-2
G90 G00 X50 Y50 Z50; (G00 rapid positioning)
G99 G24 X25 Y25 Z-50 R5 I50 J10 F800;
(Canned cycle starts, and goes down to the bottom to
perform the inner circle fininsh milling)
G80 X50 Y50 Z50; (To cancel canned cycle and return from R level)
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G24/G25 cannot be specified in a same block,
or G24/G25 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.3 Outer circle finish milling cycle G26/G32
Format:
G26
G98/G99 X_ Y_ Z_ R_ I_ J_ D_ F_ K_;
G32
Function: They are used to finish mill a circle outside a circle by the specified radius and
direction and the tool returns after milling.
Explanation:
G26: CCW outer circle finish milling cycle
G32: CW outer circle finish milling cycle
X、Y:The start point within X, Y plane
Z:Machining depth, which is absolute position in G90 and position to R reference level
in G91
R:R reference level, which is absolute position in G90 and position to start point of this block in
G91
I: Finish milling circle radius, ranging within 0 mm ~9999.999mm, use the absolute
value if it is a negative one.
67
GSK218M CNC SYSTEM Programming and Operation Manual
J: Distance from the milling start point to milling circle center, ranging within
0 mm ~9999.999mm, use the absolute value if it is a negative one
D:Tool radi us number, ranging within 0 ~256, D0 is defaulted for 0. The current tool
radius value is obtained by the given number.
K:Repetitions.
Cycle process:
Rapid to a location within XY plane;⑴
Rapid down to R level;⑵
Feed to the hole bottom;⑶⑷ To position to the start point from current position at the bottom;
⑸ To interpolate by the transition arc 1 from the start point; ⑹ To make circular interpolation for the whole circle by arc 2, arc 3 ⑺ To make circular interpolation by transition arc 4 and return to the start point; Return to the initial level or R level according to G98 or G99 instruction.⑻
Instruction path:
G26: CCW outer circle finish milling cycle
Y
2I+D
2
4
Center of circle
Outer circle border
Tool
1
J
3
Tool center path
Fig. 4-4-3-1
X
Feed position
68
GSK218M CNC SYSTEM Programming and Operation Manual
G32: CW outer circle finish milling cycle
Y
2I+D
3
1
X
Center of circle
Outer circle b o rde r
Tool
4
J
Feed position
( X0, Y0 )
2
Tool center path
Fig. 4-4-3-2
Explanation:
In outer circle finish milling, the interpolation directions of transition arc and finish milling arc
are different, while the interpolation direction in the instruction means the interpolation direction of
the finish milling.
Example: To finish mill a circular groove that has been rough milled as following by canned cycle
G26 instruction:
Fig. 4-4-3-3
G90 G00 X50 Y50 Z50; (G00 rapid positioning)
G99 G26 X25 Y25 Z-50 R5 I50 J30 F800; (Canned cycle starts, and goes down to the bottom
to perform the outer circle finish milling)
G80 X50 Y50 Z50; (To cancel canned cycle and return from R level)
M30;
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter NO: 48#0
is set to 1) and G26/G32 cannot be specified in a same block, or G26/G32 will be
cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
69
GSK218M CNC SYSTEM Programming and Operation Manual
4.4.4 Rectangular groove rough milling G33/G34
Format:
G33
G98/G99 X_ Y_ Z_ R_ I_ J_ L_ W_ Q_ V_ U_ D_ F_ K_
G34
Function: These instructions are used for linear cutting cycle from the rectangle center by the
parameter data specified till the rectangular groove programmed is machined.
Explanation:
G33: CCW rectangular groove rough milling
G34: CW rectangular groove rough milling
X、Y:The start point within X, Y plane
Z:Machining depth which is absolute position in G90 and position to R reference plane
in G91
R:R reference plane which is absolute position in G90 and position to start point of this
block in G91
I: Rectangular groove width in X axis, which should be over the tool radius and helical
feed radius should be less than half of it .
J: Rectangular groove width in Y axis, which should be over the tool radius
and helical feed radius should be less than half of it .
L:Cutting width increment within a specified plane, which should be less than the tool
diameter and over 0
W: Initial cut depth in Z axis, which is a downward distance from R level and is over 0
(if the initial cut exceeds the groove bottom, it will cut at the bottom position)
Q:Cut depth of each cutting feed
V:Distance to the end surface to be machined in rapid feed, which is over 0
U:Corner arc radius, no corner arc transition if omitted, U should be more than
or equal to the tool radius.
D:Tool diameter number, ranging within 0 ~ 256, D0 is defaulted for 0. The current tool
diameter value is given by the number specified.
K:Repetitions
Cycle process:
Rapid to a ⑴start point within XY plane;
Rapid down to R level;⑵
⑶ The diameter helical feed W width can be gotten by radius compensation value
multiplying the parameter N0. 269 value
(4) Feed to the rectangle center X0 , Y0;
70
⑸ To mill a rectangular surface helically from center outward by L increment each
time;
⑹ Z axis rapids to R level;
⑺ X, Y axes rapidly locates to the rectangle center;
⑻ Z axis rapids down to a position that has a V distance to the end surface;
⑼ Z axis cuts downward for a(Q+V)depth;
⑽ Repeat the actions of(4)~(8)till the rectangular surface with the total depth is
machined;
⑾ Return to the initial level or R level according to G98 or G99 instruction.
Instruction path:
GSK218M CNC SYSTEM Programming and Operation Manual
G33 CCW rectangular groove rough milling
Note: is the helical radius coefficient
L
U
U-R
(U-R)/2
6
Feed
position
Programmed path
3
45
1
2
D*
I
Start
position
7
Tool
Tool center path
J
groove border
Rectangular
G34 CW rectangular groove rough milling
L
U
U-R
(U-R)/2
2
1
6
Feed
position
D*
Programmed path
3
7
4
5
Start
position
J
Tool
I
Tool center path
Rectangular
groove border
Fig. 4-4-4-1
Note: The NO:12#1 should be set to 1 when this instruction is used.
Example: To rough mill an inner rectangular groove as shown in the following by canned cycle
G33 instruction:
71
GSK218M CNC SYSTEM Programming and Operation Manual
Z: Machining depth which is absolute position in G90 and position to R reference
plane in G91
R: R reference plane which is absolute position in G90 and position to start point of
this block in G91
I: Rectangular width in X axis, ranging within 0~9999.999mm
J: Rectangular width in Y axis, ranging within 0~9999.999mm
72
GSK218M CNC SYSTEM Programming and Operation Manual
L:Distance of start point to rectangular side in X axis, ranging within 0~9999.999mm;
U:Corner radius, no corner transition if omitted. Alarm is issued if U is omitted or equal
to 0 and the tool radius is over 0.
D:Tool diameter number, ranging within 0 ~ 256, D0 is defaulted for 0. The current tool
diameter value is given by the number specified.
K:Repetitions.
Cycle process:
Rapid to a location within XY plane;⑴
Rapid down to R level;⑵
Feed to the hole bottom;⑶
To position to th⑷e start point from current position at the bottom;
To make circular interpolation by the transition arc 1 from the start point; ⑸
To make linear and circular interpolation by the path 2⑹-3-4-5-6;
To make circular interpolation by the path of transi⑺tion arc 7 and return to the start
point;
Return to the initial level or R level according to G98 or G99 instruction.⑻
Instruction path:
G35: CCW rectangular groove finish milling cycle
L
2
6
Tool center path
J
Rectangular
groove border
U
4
Tool
3
Start
position
5
I
7
1
G36: CW rectangular groove finish milling cycle
L
U
4
Tool
5
Start
position
3
I
1
7
Tool center path
6
J
2
Rectangular
groove border
Fig. 4-4-5-1
Note The NO:12#1 should be set to 1 when this instruction is used.
Example: To finish mill a circular groove that has been rough milled as following by canned cycle
G35 instruction:
73
GSK218M CNC SYSTEM Programming and Operation Manual
Fig. 4-4-5-2
G90 G00 X50 Y50 Z50; (G00 rapid positioning)
G99 G35 X25 Y25 Z-50 R5 I80 J50 L30 U10 F800;(Canned cycle starts, and go down to
the bottom to perform the rectangular groove finish
milling)
G80 X50 Y50 Z50; (To cancel canned cycle and return from R level)
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G35/G36 cannot be specified in a same block,
or G35/G36 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
Function: They are used for finish milling outside a rectangle by the width and direction
specified, and the tool returns after finish milling.
Explanation:
G37: CCW rectangle outside finish milling cycle
G38: CW rectangle outside finish milling cycle
X、Y:The start point within X, Y plane
Z:Machining depth which is absolute position in G90 and position to R reference plane
in G91
R:R reference plane which is absolute position in G90 and position to start point of this
block in G91
I: Rectangular width in X axis, ranging within 0 mm ~99999.999mm
74
GSK218M CNC SYSTEM Programming and Operation Manual
J: Rectangular width in Y axis, ranging within 0 mm ~99999.999mm
L:Distance of start point to rectangular side in X axis, ranging within 0~9999.999mm
U:Corner radius, no corner transition if omitted
D:Tool diameter number, ranging within 0 ~ 256, D0 is defaulted for 0. The current tool
diameter value is given by the number specified
K:Repetitions
Cycle process:
Rapid to a location within XY plane;⑴
Rapid down to R level;⑵
Feed to the hole bottom;⑶
To position to the start point from current position at the bottom;⑷
To make circular interpolation by the transition arc 1 from the start poi⑸nt;
To make linear and circular interpolation by the path 2⑹-3-4-5-6;
To make circular interpolation by the path of transition arc 7 and return to the start ⑺
point;
Return to the initial level or R level according to G98 or G99 instruction.⑻
Instruction path:
G37 : C CW rec tangle o u t s id e finish milling cyc le
L
U
4
3
2
J
6
5
Tool
I
Tool center path
7
1
Rectangular
groove border
G38: C W rectangle ou t s ide finish milling cy c le
L
U
4
5
6
1
J
3
Tool
I
7
2
Rectangular
groove border
Fig. 4-4-6-1
Explanation:
For the rectangle outside finish milling, the interpolation direction of the transition arc is not
Tool center path
consistent with that of the finish milling arc, and the interpolation direction in explanation means
that of the finish milling arc.
Example: To finish mill a circular groove that has been rough milled as following by canned cycle
G37 instruction:
G90 G00 X50 Y50 Z50; (G00 rapid positioning)
G99 G37 X25 Y25 Z-50 R5 I80 J50 L30 U10 F800;
(Canned cycle starts, and go downward to the bottom to
75
GSK218M CNC SYSTEM Programming and Operation Manual
perform the rectangular groove finish milling)
G80 X50 Y50 Z50; (To cancel canned cycle and return from R level)
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G37/G38 cannot be specified in a same block,
or G37/G38 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.7 High-speed peck drilling cycle G73
Format: G73 X_Y_Z_R_Q_F_K_
Function: This cycle is especially defined for high-speed peck drilling, it performs intermittent
cutting feed to the bottom of a hole while removing chips from the hole by rapid retraction. The
operation illustration is shown as Fig. 4-4-7-1.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to
the bottom of the hole; in absolute programming it specifies the absolute
coordinate of the hole bottom.
R_: In incremental programming it specifies the distance from the initial level
to point R level; in absolute programming it specifies the absolute
coordinate of point R.
Q_: Depth of cut for each cutting feed
F_: Cutting feedrate
K_: Repetitions
76
GSK218M CNC SYSTEM Programming and Operation Manual
Point R
q
q
q
G73(G98)
Initial level
d
d
Point Z
Fig. 4-4-7-1
Point R
q
q
q
G73(G99)
Poin t R level
d
d
Point Z
Z, R: The hole bottom parameter Z and R must be correctly specified while performing the 1st
drilling operation (omitting unallowable) or the alarm is issued.
Q: If parameter Q is specified, the intermittent feed is performed as shown in above figure.
And the retraction is performed by the retraction value d (Fig.4-4-1-1) set in number
parameter P270. The rapid tool retraction for a distance d is performed in each
intermittent feeding.
If G73 and M codes are specified in a same block, M code is executed during the 1
hole positioning operation, then the system goes on the next drilling operation.
If the repetition K is specified, M code is only executed for the first hole.
Note 1 If parameter Q is not specified, alarm ”address Q not found(G73/G83)” will be
issued. If Q value is specified for a negative, the intermittent feed will be
performed by the absolute value of Q.
Note2 In canned cycle, if the tool length compensation (G43,G44 or G49) is
specified, the offset value is either added or cancelled while positioning to
point R level.
st
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G73 cannot be specified in a same block,
otherwise G73 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
77
GSK218M CNC SYSTEM Programming and Operation Manual
Example 1
M3 S1500 Spindle running start
G90 G99 G73 X0 Y0 Z-15. R-10.Q5. F120. Positioning and drill hole 1 then return to point R
level
Y-50; Positioning and drill hole 2 then return to point R level
Y-80; Positioning and drill hole 3 then return to point R level
X10; Positioning and drill hole 4 then return to point R level
Y10; Positioning and drill hole 5 then return to point R level
G98 Y75;Positioning and drill hole 6 then return to initial level
G80;
G28 G91 X0 Y0 Z0; Return to reference point
M5; Spindle stop
M30;
Note The chip removal operation is still performed though Q is omitted in the machining
of the holes from 2
to 6.
4.4.8 Drilling cycle, spot drilling cycle G81
Format: G81 X_ Y_ Z_ R_ F_ K_
Function: It is used for normal drilling feed to the hole bottom, then the tool rapidly retracts from
the hole bottom.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the
bottom of the hole; in absolute programming it specifies the absolute coordinate of
the hole bottom.
R_: In incremental programming it specifies the distance from the initial level to point R
level; in absolute programming it specifies the absolute coordinate of point R level.
F_: Cutting feedrate
K_: Repetitions (if necessary)
78
GSK218M CNC SYSTEM Programming and Operation Manual
G81(G98)
Initial level
Point R
Z点
G81(G99)
Point R level
Point R
Z点
Fig. 4-4-8-1
Z, R: The hole bottom parameter Z and R must be correctly specified while performing the
st
1
drilling operation(omitting unallowable) or the alarm occurs. If parameter P,Q are
specified, they are ignored by system.
After positioning along X and Z axes, the tool traverses to point R level to perform the drilling
from point R level to point Z level, then retracts rapidly.
The spindle is rotated by miscellaneous function M code before G81 is specified.
If G81 and M code are specified in a same block, M code is executed while the 1
st
hole
positioning operation is being performed, then the system goes on next drilling operation.
If number of repeats K is specified, M code is only executed for the 1st hole.
If the tool length compensation G43, G44 or G49 is specified in canned cycle, the offset is
either added or cancelled while positioning to point R level.
Example
M3 S2000 Spindle running start
G90 G99 G81 X300. Y-250. Z-150. R-10. F120. Positioning, drill hole 1, then return to point R
level
Y-550.; Positioning, drilling hole 2, then return to point R level
Y-750.; Positioning, drill hole 3, then return to point R level
X1000.; Positioning, drill hole 4, then return to point R level
Y-550.; Positioning, drill hole 5, then return to point R level
G98 Y-750.; Positioning, drill hole 6, then return to initial level
G80;
G28 G91 X0 Y0 Z0 ; Return to reference point
M5; Spindle stops
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G81 cannot be specified in a same block,
79
GSK218M CNC SYSTEM Programming and Operation Manual
otherwise G81 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.9 Drilling cycle, counterboring G82
Format: G82 X_ Y_ Z_ R_ P_ F_ K_;
Function: It is used for normal drilling to feed to the hole bottom and dwell, then retract the tool
rapidly from hole bottom.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the bottom of
the hole; in absolute programming it specifies the absolute coordinate of the hole
bottom.
R_: In incremental programming it specifies the distance from the initial level to point R
level; in absolute programming it specifies the absolute coordinate of point R.
F_: Cutting feedrate
P_: Dwell time
K_: Repetitions
G82(G98)
Point R
P
Dwell
Initial level
Point Z
G82(G99)
Point R
P
Dwell
Fig. 4-4-9-1
Point R level
Point Z
After positioning along X and Z axes, the tool traverses to point R level to perform the drilling
from point R level to point Z level, then dwells and returns rapidly after the tool reaches the
hole bottom.
The spindle is rotated by miscellaneous function M code before G82 is specified.
If G82 and M code are specified in a same block, M code is executed while the 1
positioning operation is being performed, then the system goes on next drilling operation.
If number of repeats K is specified, M code is only executed for the 1st hole.
80
st
hole
GSK218M CNC SYSTEM Programming and Operation Manual
If tool length compensation G43, G44 or G49 is specified in canned cycle, the offset value is
either added or cancelled while positioning to point R level.
P is a modal instruction, and the min. value of it is set by number parameter P281, the max.
value by P282. If P value is less than the setting by P281, the min. value is effective; if P value
is more than the setting by P282, the max. value is effective. If P is specified in a block
containing no drilling, it can’t be stored as a modal datum.
Example
M3 S2000 Spindle running start
G90 G99 G82 X300. Y-250. Z-150. R-100. P1000 F120 Positioning, drill hole 1 with 1s dwell at the
hole bottom, then return to point R level
Y-550; Positioning, drill hole 2 with 1s dwell at the hole bottom, then return to point R level
Y-750; Positioning, drill hole 3 with 1s dwell at the hole bottom, then return to point R level
X1000.; Positioning, drill hole 4 with 1s dwell at the hole bottom, then return to point R level
Y-550; Positioning, drill hole 5 with 1s dwell at the hole bottom, then return to point R level
G98 Y-750; Positioning, drill hole 6 with 1s dwell at the hole bottom, then return to initial level
G80; Cancel canned cycle
G28 G91 X0 Y0 Z0 ; Return to reference point
M5; Spindle stops
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G82 cannot be specified in a same block,
otherwise G82 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.10 Drilling cycle with chip removal G83
Format: G83 X_ Y_ Z_ R_ Q_ F_ K_
Function: It is used for peck drilling that the tool feeds to the hole bottom by intermittent feeding
with chips removed from hole during drilling.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the
bottom of the hole; in absolute programming it specifies the absolute coordinate of
the hole bottom.
R_: In incremental programming it specifies the distance from the initial level to point R
level; in absolute programming it specifies the absolute coordinate of point R.
Q_: Depth of cut for each cutting feed
81
GSK218M CNC SYSTEM Programming and Operation Manual
F_: Cutting feedrate
K_: Repetitions
G83(G98)
Initial level
Point R
q
d
q
d
Point Z
G83(G99)
Point R
q
d
q
d
Point Z
Fig. 4-4-10-1
Q: It specifies each cutting depth expressed by incremental value. In the second and the
following feeding, the tool rapidly traverse to the position which has a distance d to the end position
of last drilling and still performs the feeding d that is set by parameter P270, as is shown in Fig.
4-4-10-1.
Only positive value can be specified for Q and the negative value is used as a positive one
with its negative sign ignored.
Q is specified in drilling block, it can’t be stored as a modal datum if it is specified in the block
containing no drilling.
The spindle is rotated by miscellaneous function(M code) before G83 is specified.
If G83 and M code are specified in a same block, M code is executed while the 1st hole
positioning operation is being performed, then the system goes on next drilling operation.
If number of repeats K is specified, M code is only executed for the 1st hole.
If tool length compensation G43,G44 or G49 is specified in canned cycle, the offset value is
either added or cancelled while positioning to point R level.
Example
M3 S2000 Spindle running start
G90 G99 G83 X300. Y -250. Z-150. R-100. Q15 F120;Positioning, drill hole 1, then return to point R
level
82
GSK218M CNC SYSTEM Programming and Operation Manual
Y-550; Positioning, drill hole 2, then return to point R level
Y-750; Positioning, drill hole 3, then return to point R level
X1000; Positioning, drill hole 4, then return to point R level
Y-550; Positioning, drill hole 5, then return to point R level
G98 Y-750; Positioning, drill hole 6, then return to initial level
G80;
G28 G91 X0 Y0 Z0 ; Return to reference point
M5; Spindle stops
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G83 cannot be specified in a same block,
otherwise, G83 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.11 Right-handed tapping cycle G84
Format: G84 X_ Y_ Z_ R_ P_ F_
Function: It is used for tapping. In this tapping, when the tool reaches the hole bottom, the
spindle runs reversely.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the bottom
of the hole; in absolute programming it specifies the absolute coordinate of the hole
bottom.
R_: In incremental programming it specifies the distance from the initial level to point R
level; in absolute programming it specifies the absolute coordinate of point R.
P_: Dwell time.
F_: Cutting feedrate.
83
GSK218M CNC SYSTEM Programming and Operation Manual
Point R
Spindle ccw
P
G84(G98)
Initial le vel
Spindle cw
P
Spindle ccw
Point Z
Point R
P
G84(G99)
Point R lev el
Spindle cw
P
Point Z
Fig. 4-4-11-1
Tapping is performed by rotating the spindle CW, when the tool reaches the hole bottom, the
spindle is rotated reversely for retraction. This operation creates threads.
Feedrate overrides are ignored during tapping. A feed hold does not stop the machine until the
return operation is finished.
Before specifying G84, use a miscellaneous function (M code) to rotate the spindle. If the
spindle CW rotation is not specified, it will be adjusted for CW rotation automatically in R level by
the current spindle specification.
If G84 and M code are specified in a same block, M code is executed while the 1
st
hole
positioning operation is being performed, then the system goes on next drilling operation.
If number of repeats K is specified, M code is only executed for the 1
st
hole.
P is a modal instruction, and the min. value of it is set by number parameter P281, the max.
value by P282. If P value is less than the setting by P281, the min. value is used; if P value is more
than the setting by P282, the max. value is used. If P is specified in a block containing no drilling, it
can’t be stored as a modal datum.
If tool length compensation G43, G44 or G49 is specified in canned cycle, the offset value is
either added or cancelled while positioning to point R level.
In feeding per minute, the relation betwe en the thread lead and feedrate as well as spindle
speed is as following:
Feedrate F=tap pitch×spindle speed S
For example: for the M12×1.5 thread hole on the workpiece, the following parameter can be used:
S500=500r/min F=1.5×500=750mm/min
For multi-start thread, F value can be gotten by multiplying the thread number.
Example:
M3 S100 Spindle running start
84
GSK218M CNC SYSTEM Programming and Operation Manual
G90 G99 G84 X300. Y-250. Z-150. R-120 P300 F120 Positioning, tap hole 1, then return to
point R level
Y-550.; Positioning, tap hole 2, then return to point R level
Y-750.; Positioning, tap hole 3, then return to point R level
X1000; Positioning, tap hole 4, then return to point R level
Y-550.; Positioning, tap hole 5, then return to point R level
G98 Y-750.; Positioning, tap hole 6, then return to initial level
G80;
G28 G91 X0 Y0 Z0 ; Return to reference point
M5; Spindle stops
M30
;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G84 cannot be specified in a same block,
otherwise G84 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.12 Left-handed tapping cycle G74
Format: G74 X_ Y_ Z_ R_ P_ F_
Function: It is used for tapping cycle. In this tapping cycle, when the hole bottom is reached,
the spindle rotates reversely.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the
bottom of the hole; in absolute programming it specifies the absolute
coordinate of the hole bottom.
R_: In incremental programming it specifies the distance from the initial level to
point R level; in absolute programming it specifies the absolute coordinate of
point R.
P_: Dwell time.
F_: Cutting feedrate.
85
GSK218M CNC SYSTEM Programming and Operation Manual
Point R
Spindle cw
G74(G98)
P
Point Z
Initial level
Spindle ccw
P
Spindle cw
Point R
P
G74(G99)
Poin t R level
Spindle ccw
P
Point Z
Fig. 4-4-12-1
Tapping is performed by rotating the spindle CCW , when the tool reaches the hole bottom, the
spindle is rotated reversely for retraction. This operation creates threads.
Feedrate overrides are ignored during tapping. A feed hold does not stop the machine until
the retraction operation is finished.
Before specifying G74, use a miscellaneous function (M code) to rotate the spindle. If the
spindle CCW rotation is not specified, it will be adjusted for CCW rotation in R level automatically by
the current spindle speed specified.
If G74 and M code are specified in a same block, M code is executed while the 1
st
hole
positioning operation is being performed, then the system goes on next drilling operation.
If number of repeats K is specified, M code is only executed for the 1
st
hole.
P is a modal instruction, and the min. value of it is set by number parameter P281, the max.
value by P282. If P value is less than the setting by P281, the min. value is used; if P value is more
than the setting by P282, the max. value is used. If P is specified in a block containing no drilling, it
can’t be stored as a modal datum.
If tool length compensation G43, G44 or G49 is specified in canned cycle, the offset value is
either added or cancelled while positioning to point R level.
Example
M4 S100 Spindle running start
G90 G99 G74 X300. Y-250. Z-150. R-120 P300 F120 Positioning, tap hole 1, then return to
point R level
Y-550.; Positioning, tap hole 2, then return to point R level
Y-750.; Positioning, tap hole 3, then return to point R level
X1000; Positioning, tap hole 4, then return to point R level
Y-550.; Positioning, tap hole 5, then return to point R level
G98 Y-750.; Positioning, tap hole 6, then return to initial level
G80;
G28 G91 X0 Y0 Z0 ; Return to reference point
86
GSK218M CNC SYSTEM Programming and Operation Manual
M5; Spindle stops
M30
;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G74 cannot be specified in a same block,
otherwise G74 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.13 Fine boring cycle G76
Format: G76 X_Y_Z_Q_R_P_F_K_
Function: It is used for boring a hole precisely. When the tool reaches the hole bottom, the
spindle stops and the tool departs from the machined surface of the workpiece and
retracts. The retraction trail that affects machined surface finish and the tool damage
should be avoided in the operation.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the
bottom of the hole; in absolute programming it specifies the absolute coordinate of
the hole bottom.
R_: In incremental programming it specifies the distance from the initial level to point
R level; in absolute programming it specifies the absolute coordinate of point R
level.
Q_: Offset of the hole bottom
P_: Dwell time.
F_: Cutting feedrate.
K_: Number of fine boring repeats
Fig. 4-4-13-1
87
GSK218M CNC SYSTEM Programming and Operation Manual
When the tool reaches the hole bottom, the spindle stops at a fixed rotation position and the tool is
moved in the direction opposite to the tool tip and retracted. This ensures that the machined
surface is not damaged and enables precise and efficient boring. The parameter Q specifies the
retraction distance and the retraction axis and direction are specified by bit parameter NO.42#4
and NO.42#5. And Q is a positive value, if Q is specified with a negative value, the sign is ignored.
The hole bottom offset of Q is a modal value saved in canned cycle which should be specified
carefully as it is also used for the cutting depth for G73 and G83.
Before specifying G76, use a miscellaneous function (M code) to rotate the spindle.
st
If G76 and M code are specified in a same block, M code is executed while the 1
hole
positioning operation is being performed, then the system goes on next boring operation.
If number of repeats K is specified, M code is only executed for the 1st hole.
If tool length compensation G43,G44 or G49 is specified in canned cycle, the offset value is
either added or cancelled while positioning to point R level.
Axis switching: before the boring axis is changed, the canned cycle must be cancelled.
Boring: In a block that does not contain X , Y , Z, R or any additional axes, boring is not
performed.
Example
M3 S500 Spindle running start
G90 G99 G76 X300.Y-250. Positioning, bore hole 1, then return to point R level
Z-150. R-100.Q5. Orient at the hole bottom, then shift by 5mm
P1000 F120.; Stop at the hole bottom for 1s
Y-550.; Positioning, bore hole 2, then return to point R level
Y-750.; Positioning, bore hole 3, then return to point R level
X1000.; Positioning, bore hole 4, then return to point R level
Y-550.; Positioning, bore hole 5, then return to point R level
G98 Y-750.; Positioning, bore hole 6, then return to initial level
G80 G28 G91 X0 Y0 Z0 ; Return to reference point
M5; Spindle stops
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G76 cannot be specified in a same block,
otherwise G76 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.14 Boring cycle G85
Format: G85 X_ Y_ Z_ R_ F_ K_
Function: It is used to bore a hole.
Explanation:
88
GSK218M CNC SYSTEM Programming and Operation Manual
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the
bottom of the hole; in absolute programming it specifies the absolute coordinate of
the hole bottom.
R_: In incremental programming it specifies the distance from the initial level to point R
level; in absolute programming it specifies the absolute coordinate of point R.
F_: Cutting feedrate.
K_: Number of repeats
Fig. 4-4-14-1
After positioning along X and Y axis, traverse is performed to point R level, and boring is
performed from point R level to point Z level. As the tool reaches the hole bottom, cutting feed is
performed then return to point R level.
Before specifying G85, use a miscellaneous function (M code) to rotate the spindle.
If G85 and M code are specified in a same block, M code is executed while the 1
st
hole
positioning operation is being performed, then the system goes on next boring operation.
st
If number of repeats K is specified, M code is only executed for the 1
hole.
If the tool length compensation G43, G44 or G49 is specified in the canned cycle, the offset is
added while positioning to point R level.
Axis switching: Before the boring axis is changed, the canned cycle must be cancelled.
Boring: In a block that does not contain X , Y , Z, R or any additional axes, boring is not
performed.
Example
M3 S100 Spindle running start
G90 G99 G85 X300. Y-250. Z-150. R-120. F120. Positioning, bore hole 1, then return to
point R level
89
GSK218M CNC SYSTEM Programming and Operation Manual
Y-550.; Positioning, bore hole 2, then return to point R level
Y-750.; Positioning, bore hole 3, then return to point R level
X1000.; Positioning, bore hole 4, then return to point R level
Y-550.; Positioning, bore hole 5, then return to point R level
G98 Y-750.; Positioning, bore hole 6, then return to initial level
G80;
G28 G91 X0 Y0 Z0 ; Return to reference point
M5; Spindle stops
M30;
Restriction:
Cancellation:G codes in 01 group (G00 to G03), G60 modal G code (bit parameter
NO: 48#0 is set to 1) and G85 cannot be specified in a same block,
otherwise G85 will be cancelled.
Tool offset:The tool radius offset in canned cycle is ignored.
4.4.15 Boring cycle G86
Format: G86 X_ Y_ Z_ R_ F_ K_;
Function: It is used to perform a boring cycle.
Explanation:
X_Y_: Hole positioning data
Z_: In incremental programming it specifies the distance from point R level to the
bottom of the hole; in absolute programming it specifies the absolute coordinate of
the hole bottom.
R_: In incremental programming it specifies the distance from the initial level to point R
level; in absolute programming it specifies the absolute coordinate of point R.
F_: Cutting feedrate
K_: Repetitions
90
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.