0% found this document useful (0 votes)
2 views171 pages

Programming Manual of Milling Machine System

This document is a manual for a milling machine system, detailing safety warnings, qualified personnel requirements, and product descriptions. It includes sections on flexible NC programming, variable definitions, and standard functions, along with a comprehensive table of contents outlining various programming commands and features. The manual is intended for machine tool operators and emphasizes the importance of following safety instructions and using the system as described in the documentation.

Uploaded by

andrianfauzi17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views171 pages

Programming Manual of Milling Machine System

This document is a manual for a milling machine system, detailing safety warnings, qualified personnel requirements, and product descriptions. It includes sections on flexible NC programming, variable definitions, and standard functions, along with a comprehensive table of contents outlining various programming commands and features. The manual is intended for machine tool operators and emphasizes the importance of following safety instructions and using the system as described in the documentation.

Uploaded by

andrianfauzi17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 171

Flexible NC program 1

NC program 11

Preparatory functions 17
Programming
Frame 99
Manual of Milling
Machine System Tool function 115

Control characteristics 121

Appendix 133
Legal information
Warning notice
For the sake of your personal safety and to prevent damage to property, the following

symbols are used in this manual. The sentences with a safety symbol are very important.

indicates that death or severe personal injury will result if an error occurs during the use.

indicates that death or severe personal injury may result if an error occurs during the use.

NOTICE

indicates that an undesirable result or state may occur if the notice is not observed.

Qualified personnel
The product/system described in this documentation may be operated only by personnel

qualified for the specific task in accordance with the relevant provisions of this manual and

the documentation provided by the machine toll manufacturer, in particular the warning

notices and safety instructions. Qualified personnel must be subject to training, have

appropriate operational experience, and be capable of identifying risks and avoiding

potential hazards when working with these products/systems.

Product description
The numerical control (NC) system may only be used for the applications described in the

relevant technical documentation. Approval must be obtained from the NC system

manufacturer for other applications. Proper transport, storage, assembly, installation,

commissioning, operation and maintenance must be ensured during the use of this product;

otherwise the system may not operate properly. The permissible ambient conditions must be
complied with and the safety instructions in the relevant documentation must be observed.

Disclaimer of liability
We have reviewed the contents of this manual to ensure consistency with the hardware and

software described. Since variance cannot be precluded entirely, we cannot guarantee full

consistency.
Foreword

Documentation category
The documentation is classified into two categories.

 User documentation; and

 Manufacturer/service documentation.

Intended readers
This manual is intended for machine tool operators of this milling machine system.

Purpose
This manual can enable the readers to get familiar with the operation method of milling

machine system.

Standard functions
This manual describes the standard functions of milling machine system. It does not cover

all types of products, all the details, and all the situations that may occur during the

installation, operation and maintenance of the product.

For functions added or changed by the machine tool manufacturer, refer to the

documentation provided by the manufacturer.

We assume no responsibility, and will not provide related maintenance services if this

product is used to perform any function not described in this documentation.


Contents

1 Flexible NC program.................................................................................... 1
1.1 Variable definitions............................................................................................................. 1
1.1.1 User-defined variables............................................................................................................... 1
1.1.2 R-parameters.............................................................................................................................. 2
1.1.3 System variables........................................................................................................................ 3

1.2 Array definition................................................................................................................... 4


1.3 Assignment.......................................................................................................................... 5
1.4 Calculation........................................................................................................................... 7
1.5 Comparison and logical operations................................................................................... 8
1.6 Operation priority..............................................................................................................10
1.7 CASE statements...............................................................................................................10
1.8 IF statement........................................................................................................................11
1.9 WHILE statement............................................................................................................. 13

2 NC program................................................................................................ 14
2.1 Program naming................................................................................................................ 14
2.2 Program structure..............................................................................................................14
2.3 Main program.................................................................................................................... 16
2.4 Subprogram........................................................................................................................16
2.4.1 Classification of subprograms................................................................................................. 17
2.4.2 Subprogram call....................................................................................................................... 18
2.4.3 Modal call of subprogram........................................................................................................19

3 Preparatory functions.................................................................................21
3.1 Interpolation commands................................................................................................... 21
3.1.1 Quick positioning (G00).......................................................................................................... 21
3.1.2 Linear interpolation (G01).......................................................................................................22
3.1.3 Circular interpolation (G02/G03)............................................................................................23
3.1.4 3D circular interpolation (CIPD).............................................................................................31
Contents

3.1.5 Polynomial interpolation (POLY)........................................................................................... 32


3.1.6 Spline interpolation (AKIMA, NURBS, CUBIC).................................................................. 33
3.1.7 Helical interpolation (G22/G23)..............................................................................................38

3.2 Chamfer and radius (CHF, CHR, RND)......................................................................... 40


3.3 Plane Command (G17/G18/G19).................................................................................... 42
3.4 Absolute/Relative Command (G90/G91, AC/IC).......................................................... 44
3.5 Conversion to metric system/British system (G70/G71).............................................. 45
3.6 Working Area Limitation (G25/G26).............................................................................. 46
3.7 Return to the Reference Point (G74)...............................................................................47
3.8 Return to the Fixed Point (G75)...................................................................................... 48
3.9 Pause (G04)....................................................................................................................... 48
3.10 Polar coordinates...............................................................................................................50
3.10.1 Polar coordinate system (AP, RP)........................................................................................... 50
3.10.2 Definition of Pole (G110/G111/G112).................................................................................... 51
3.10.3 Programming of Polar Coordinates......................................................................................... 52

3.11 Simplified Programming (Fixed Cycle)..........................................................................55


3.11.1 Plane milling CYCLE71..........................................................................................................55
3.11.2 Contour milling CYCLE72......................................................................................................59
3.11.3 Rectangular journal milling CYCLE76...................................................................................63
3.11.4 Circular journal milling CYCLE77......................................................................................... 66
3.11.5 Rectangular pocket milling POCKET1...................................................................................69
3.11.6 Circular pocket milling POCKET2......................................................................................... 73
3.11.7 Circumferential groove milling SLOT1.................................................................................. 76
3.11.8 Circular groove milling SLOT2.............................................................................................. 83
3.11.9 Thread milling CYCLE90....................................................................................................... 86
3.11.10 Centering drilling CYCLE81...................................................................................................89
3.11.11 Counterboring drilling CYCL82............................................................................................. 91
3.11.12 Deep hole drilling CYCLE83.................................................................................................. 93
3.11.13 Rigid tapping CYCLE84......................................................................................................... 96
3.11.14 Reaming 1 (boring 1) CYCLE85............................................................................................ 99
3.11.15 Boring (boring 2) CYCLE86.................................................................................................100
3.11.16 Stopping drilling 1 (boring 3) CYCLE87............................................................................. 103
3.11.17 Stopping drilling 2 (boring 4) CYCLE88............................................................................. 104
3.11.18 Reaming 2 (boring 5) CYCLE89.....................................................................................106

3.12 Feed function...................................................................................................................108


3.12.1 Feedrate definition................................................................................................................. 108
Contents

3.12.2 Linear feed (G94)...................................................................................................................109


3.12.3 Revolutional feedrate (G95).................................................................................................. 109

3.13 Spindle Function............................................................................................................. 109


3.13.1 Spindle rotation (S, M03/M04/M05).....................................................................................109
3.13.2 Spindle positioning (SPOS, M19)......................................................................................... 110

3.14 Auxiliary function (M)................................................................................................... 112

4 Frame......................................................................................................... 114
4.1 Frame definition:.............................................................................................................114
4.2 Establishing coordinate systems....................................................................................114
4.3 Settable frame..................................................................................................................117
4.4 Programmable frame.......................................................................................................119
4.4.1 Programmable work offset (TRANS/ATRANS).................................................................. 120
4.4.2 Programmable rotation (ROT/AROT).................................................................................. 123
4.4.3 Programmable scaling factor (SCALE/ASCALE)............................................................... 126
4.4.4 Programmable mirroring (MIRROR/AMIRROR)................................................................128

4.5 Frame deselection (G500, G53).....................................................................................130

5 Tool function..............................................................................................132
5.1 Tool selection.................................................................................................................. 132
5.2 Tool compensation no. D............................................................................................... 132
5.3 Tool type.......................................................................................................................... 133
5.4 Tool compensation..........................................................................................................133
5.4.1 Tool radius compensation...................................................................................................... 134
5.4.2 Tool length compensation......................................................................................................138

6 Control characteristics ............................................................................139


6.1 Exact Stop (G60, G09, G601 and G602)......................................................................139
6.2 Continuous-path control (G64)......................................................................................141
6.3 Acceleration control (BRISK, SOFT)...........................................................................141

Appendix............................................................................................................... 143
A Typical workpiece examples...................................................................................................143
B Command list........................................................................................................................... 147
C Classification list of G commands......................................................................................... 154
Contents

D Classification list of M commands.........................................................................................159

Index...................................................................................................................... 160
Flexible NC program 1
1.1 Variable definitions

Variable function:

Variables can enable flexible programming. Programmers can use the variables flexibly to

calculate and establish a highly flexible program archive, which can save a lot of

programming work.

Variable type:

The control system classifies variables into the following types, as listed in Table 1.1.

Table 1.1 Variable types


Type Remarks
User-defined Variables defined by the user, with name and type, such as:
variables calculation parameter.
Specific predefined arithmetic variables, with address R and the
R-parameters subsequent figures. The predefined arithmetic variables are of type
REAL.
Variables for the control system; can be processed (read or written)
System variables in the program. System variables can access the tool compensation,
the control system status etc.
Rules for naming of variables:

 A variable name can contain letters, digits and underscores, and can not begin with

an underscore.

 A variable name consists of up to 31 characters.

1.1.1 User-defined variables

Type of user-defined variables:

See Table 1.2 for types of user-defined variables.

Table 1.2 Types of user-defined variables


Type Meaning Range of values
Programming Manual of Milling Machine System 1
Flexible NC program
1.1 Variable definitions

Type Meaning Range of values


INT Type INT, i.e., an integer number ±(231 -1)
REAL Type REAL, i.e., a number with decimal, including ±(10-300~10+300)
integer numbers
BOOL Type BOOL, i.e., a logic value, can only be "TRUE" (1) 1 or 0
or "FALSE" (0)

CHAR Type CHAR, i.e., an individual character corresponding 0~255


to the ASCII code, marked by single quotation marks
STRING Type STRING, i.e., a string of symbols, consisting of a Up to 200
number of characters, marked by double quotation characters
marks
AXIS Type AXIS, representing axis addresses, i.e., 0 = 0,1,2,3,4,5
X-axis, 1 = Y-axis, 2 = Z-axis, 3 = A-axis, 4 = B-axis,
and 5 = C-axis

Format of variable definition:

DEF type name [= value] ; assignment upon variable definition

DEF type name 1 [= value 1], name 2 [= value 2], name 3 [= value 3]...

; continuous assignment upon variable

definition

Notes:

 If no value is assigned to a variable in the definition, it will preset as 0 in the system.

 Variables must be defined before the use and at the beginning of the program.

Definition must be implemented in a separate block. More than one variable can be

defined in the same line, separated by a comma between them.

Examples:

DEF CHAR FORM = 'A'

DEF STRING MDG = “FIYANG”

DEF REAL HH1=1,HH2=2,HH3=3

1.1.2 R-parameters

Notes:

R-parameters refer to specific predefined arithmetic variables, with address R and the

2 Programming Manual of Milling Machine System


Contents

subsequent figures. The predefined arithmetic variables are of type REAL. Under normal

circumstances, there are 100 arithmetic variables available below address R, unless

otherwise specified.

1.1.3 System variables

Function:

System variables provide the settings and status of the machine tools and the control

system.

Type:
Flexible NC program
1.3 Assignment

System parameters are classified into the following four categories.

 UI human-machine display parameters

 CNC parameters

 Servo parameters

 PLC parameters

1.2 Array definition

Function:

An array refers to a memory block that is defined by the variables with name and capacity.

Arrays can be defined by a maximum of two dimensions.

Command format:

DEF CHAR NAME[n,m]

DEF INT NAME[n,m]

DEF REAL NAME[n,m]

DEF AXIS NAME[n,m]

DEF STRING[string length] NAME[m]

DEF BOOL[n,m]

Notes:

1. During the definition, the maximum one-dimensional and two-dimensional capacity

of an array is 32767.

2. The value of an array can be assigned during execution of the program or during

definition of the array.

3. The first array element starts with the index [0,0]. If the array capacity is [3,4], the

maximum possible array index is [2,3].

4. The arrays can be initialized by the following methods.

1) Initialize an array with the value list during definition of the array, SET

The number of initial values programmed must be same as that of array elements

assigned. The array elements with no value will be automatically initialized to 0.

4 Programming Manual of Milling Machine System


Contents

The variables of type AXIS are not allowed to be left blank. If the value being

programmed exceeds the existing array elements remained, an alarm will be

triggered.

Examples:

DEF RE[2,3]=SET(1,2,3,4)

2) Initialize an array with the same value during definition of the array, REP

All array elements are assigned a same value (constant).

Examples:

DEF RE[10,3]=REP(3)

3) Initialize an array with the value list during execution of the program, SET

The initialization steps are same as those in definition. An expression can also be

used as a value. The initialization starts with the array index of the program.

Examples:

EE [0,0] = 10 ; assignment of one element

EE [0,0] = SET (10,20,30,40) ; continuous assignment

4) Initialize an array with the same value during execution of the program, REP

Examples:

DEF REAL EE[10,3]

EE[0,0]=REP(10)

1.3 Assignment

Function:

Variables can be assigned a value of the appropriate type in the program. Assignment

always requires a separate block, and each block can have more than one assignment

statement.

Command format:

An variable = a constant, a variable or an expression

Examples:
Flexible NC program
1.3 Assignment

AA1=2.3 RR1=1 ; assigning a constant


AA1=RR1 ; assigning a variable

AA1=—RR1 ; assigning an expression

6 Programming Manual of Milling Machine System


Flexible NC program
1.4 Calculation

1.4 Calculation

Function:

The calculation function is primarily used for R-parameters and variables of real numbers,

integers and characters.

Operator:

See Table 1.3 for operators.

Table 1.3 Operators


Operator Definition
+ Addition
- Subtraction
* Multiplication
/ Division
Divide two numbers and round the result to an
DIV
integer
MOD Divide two numbers and obtain the remainder
SIN( ) Sine; the parameter in parentheses is in degree.
COS( ) Cosine; the parameter in parentheses is in degree.
Tangent; the parameter in parentheses is in
TAN( )
degree.
ASIN( ) Arcsine; the calculation result is in degree.
ACOS( ) Arc cosine; the calculation result is in degree.
ATAN( ) Arc tangent; the calculation result is in degree.
ATAN2( ) Arc tangent 2; the calculation result is in degree.
SQRT( ) Square root
ABS( ) Absolute value
POT( ) Second power (square)
TRUNC( ) Truncate
LN( ) Natural logarithm
EXP( ) Exponential function
Examples:

AA=10+12
Flexible NC program
1.5 Comparison and logical operations

1.5 Comparison and logical operations

Function:

Comparison operations can be used to express a jump case. Complete expressions can also

be compared. Logical operation is used to link truth values.

Comparison and logical operators:

See Table 1.4 for comparison and logical operators.

Table 1.4 Comparison and logical operators

Operator Definition

== Equal to
!= Not equal to
> More than
Comparison < Less than
operators More than or
>=
equal to
Less than or equal
<=
to
&& AND
Logical
|| OR
operators
! NOT
Notes:

 Comparison functions can be used for variable of types CHAR, INT, REAL and

BOOL. For variables of type CHAR, the code values are compared.

 The results of comparison operations re always of type BOOL. Logical operations

can only be used for variables of type BOOL. After internal type conversion, logical

operations can also be used for data types CHAR, INT and REAL.

 The 0 in logic operations means false and other values not equal to 0 mean true.

Examples:

N10 AA1=10 AA2=20 AA3=30

N20 IF(AA2-AA1)>AA3 GOTOF BB ; comparison operation

8 Programming Manual of Milling Machine System


Flexible NC program
1.4 Calculation

N80 IF(AA1>20)&&(AA2>30)GOTOF CC ; logic operation


Flexible NC program
1.5 Comparison and logical operations

1.6 Operation priority

Function:

Each operation is assigned a priority. During the calculation of an expression, the operation

of a higher priority is always executed first. Operations of the same priority are executed

from left to right. In arithmetic expressions, the execution order of all operations can be

determined by parentheses, and the execution does not follow the normal rules of

calculation priority.

Operator priority:

See Table 1.5 for operator priority from highest to lowest.

Table 1.5 Operators priority


S/N Operator Definition
1 ! NOT
2 *, / Multiplication,
division
3 +, - Addition, subtraction
4 && AND
5 || OR
6 ==, >, <, >=, <= Comparison
operation

1.7 CASE statements

Function:

CASE commands provide the possibility of jump based on the different actual values of

type INT. The program jumps to the location determined by the jump target, based on the

value of the constant detected by CASE commands.

Command format:

CASE expression OF constant 1 GOTOF LABEL1 … DEFAULT GOTOF LABELn

CASE expression OF constant 1 GOTOB LABEL1 … DEFAULT GOTOF LABELn

10 Programming Manual of Milling Machine System


Flexible NC program
1.7 CASE statements

Notes:

 GOTOF: forward jump commands (jump to the program end).

 GOTOB: backward jump commands (jump to the program start).

 GOTO: forward-backward jump commands (jump to the program end and then the

program start).

 DEFAULT: used to determine the jump target in the case no constant value is

defined.

 If DEFAULT commands are not programmed, the block immediately following the

CASE commands will be the jump destination.

Examples:

DEF INT VAR1, VAR2

CASE (VAR1+VAR2) OF 2 GOTOF MARK1 4 GOTOF MARK2 DEFAULT GOTOF

MARK3

MARK1: G01 X1 Y1

MARK2: G01 X2 Y2

MARK3: G01 X3 Y3

1.8 IF statement

Function:

The IF-ELSE-ENDIF block is used for selection between two options. If the expression

value is true, the block of IF branch will be executed. Otherwise the block of ELSE branch

will be executed. ELSE branch can also be deselected.

Command format:

IF expression

NC block

ELSE

NC block

ENDIF
Flexible NC program
1.8 IF statement

Examples:

DEF INT VAR1, VAR2

IF VAR1>VAR2

G00 X1 Y1

12 Programming Manual of Milling Machine System


Flexible NC program
1.9 WHILE statement

ELSE

G00 X2 Y2

ENDIF

NOTICE

IF statements can be nested, but the number of nesting levels shall not exceed 9.

1.9 WHILE statement

Function:

In the WHILE statement, the cycle will be executed as long as the expression value is true.

To interrupt the cycle, continuously modify the expression in the cycle until the value is

false.

Command format:

WHILE expression

NC block

ENDWHILE

Examples:

DEF REAL HH=9

G01 X0

WHILE HH>0

G91 X=HH

HH=HH-1

ENDWHILE
NC program 2
2.1 Program naming

Each program has a program name. The program should be named in compliance with the

following rules at the time of programming.

 The program name should starts with a letter, and can only consist of letters, digits

and underscores;

 No separator is allowed;

 Case-sensitive;

 The name should not be same as that of any standard cycle in the system;

 A decimal point is included in file extensions. The extensions of the main programs

can be in formats such as txt and iso.

 Suffix of the subprogram name must be iso; and

 A program name can consist of up to 32 characters.

Examples:

SH_27.iso

2.2 Program structure

A program refers to a set of commands sent to CNC for the operation of machine tools. The

tool will move along a straight line or an arc, the spindle motor will rotate or stop based on

the commands programmed.

Commands are programmed based on the actual movement sequence of the tool, as shown

in Figure 2.1. A single-step command is a program block, and the program consists of a

series of processed individual blocks.

Programming Manual of Milling Machine System 14


Flexible NC program
1.9 WHILE statement

Figure 2.1Program structure

Structure of the block is as follows.

/ N… □G…□X…□Y…□F…□S…□T…□D…□M…

; remarks

Where,

/ indicates the block that can be skipped during the execution;

N… indicates block number, which consists of up to five digits;

□ indicates the intermediate space;

; remarks indicates description of the block and it must be occupy a separate line.

The execution order should comply with the following rules.

1. Block number N

2. Tool change commands T and D

3. Speed commands F and S

4. Function G

5. Function M executed before the block

6. Coordinate commands X, Y, etc.

7. Function M executed after the block

Notes:

 For function G and function M, more than one function can be programmed in one

block, but for other functions (X, Y, T, F, etc.), only one function can be programmed.

 Functions G are divided into different groups. Two or more commands G in the same

group cannot be used in the same block.


 Block number is generally edited by an interval of 5 or 10, so that the sequence of

block numbers will not change if a new block is inserted later. Although it will not affect

the execution of the program if the block number is not programmed, it is still

recommended that a block number be added before the block relating to coordinate

movement, auxiliary functions and other commands, in order to increase readability.

 The block number and the commands followed immediately must be separated by a

space.

2.3 Main program

There are two forms of programs: main program and subprogram. In general, CNC operates

according to the main program.

When a same machining shape occurs in the program multiple times, the shape can be

programmed into a subprogram. The original program is called the main program. If a

subprogram command occurs during execution of the main program, the subprogram

command will be executed. After the subprogram is executed, execution of the main

program will proceed.

2.4 Subprogram

In essence, there is no difference between the main program and the subprogram. A

subprogram contains the processes or steps that require multiple times of execution. The

subprogram should be programmed in a separate file, and called or run as required.

To facilitate the selection of a subprogram, the subprogram must be named. The program

name can be freely selected, but must comply with relevant regulations (same as the main

program). A certain meaning is recommended for the name.

Notes:

 Suffix of the subprogram name must be iso.


NC program
2.4 Subprogram

 The subprogram can be ended with RET to return to the calling point of the program.

Alternately, the subprogram can also be programmed to end with M02 or M30 to return to

the calling point.

2.4.1 Classification of subprograms

Classification of subprograms:

1. Standard subprogram: same as the main program. It can be called by the main

program and other subprograms.

2. Parameter subprogram: It must be started with PROC and ended with RET. During

the calling of a parameter subprogram, the specific function is realized by passing the

parameter subprogram.

Notes:

A subprogram can be called not only in the main program, but also in another subprogram.

This process is called subprogram nesting. For such nesting call, a total of up to 12 nesting

levels are allowed, including the main program level.

Figure 2.2Subprogram nesting


NC program
2.4 Subprogram

2.4.2 Subprogram call

Directly use the subprogram name when calling the subprogram in the main program.

Ensure that the subprogram call occupies an independent block.

1. Standard subprogram call

Program the repeat count by assigning the value of P: If you need to run a
subprogram in a consecutive and repeated manner, program the repeat count by
assigning the value of the address P in a subprogram call. P value ranges from 1 to
99.

Examples:

Example 1: N40 PA P3 ; run the subprogram PA continuously for 3 times.

Example 2: "()" can be omitted after the standard subprogram call is completed.

N20 WE () P3 ; call the subprogram WE for 3 times

Or, N20 CALL WE () P3 ; call the subprogram WE for 3 times

2. Subprogram call with parameters

If the subprogram works with parameters in the main program, the corresponding computed

or assigned value can be used in the subprogram. During the subprogram call, the values of

actual parameters used in the main program are passed to the formal parameters of

subprogram and processed when the subprogram is running.

Types of subprogram parameter passing:

 Pass-by-value: Parameters passed by value are used as input parameter only. It is

involved in the computation in the called subprogram and no feedback message will

be sent to the subprogram in the upper layer in case of any change of values.

 Pass-by-address: The values of parameters passed by address and used as input and

output parameters will be returned to the subprogram in the upper layer, after such

parameters are involved in the computation in the called subprogram. Add "VAR"

keyword before corresponding parameter of the called subprogram, to pass the

parameters by address.

Notes:

Parameters are passed during program call or the first execution. For other repetitive
NC program
2.4 Subprogram

operation, such parameters remain unchanged.

Examples:

Example 1:

N20 WE (10, 50, R32, , R45) P5 ;if WE has 5 parameters, call the

subprogram WE for 5 times

Or, N20 CALL WE (10, 50, R32, , R45) ; call the subprogram WE for once

Example 2:

PROC CYC84 (……)

DEF REAL PP

DEF REAL MP

…… ……

STE (PP, MP)

…… ……

RET

PROC STE (VAR REAL PP, REAL MP)

…… ……

RET

Two parameters are defined in the subprogram "CYC84": "PP" and "MP". During calling of

subprogram "STE", "PP" is passed by address and "MP" is passed by value. The call aims to

modify "PP" based on the value of "MP" in "STE" and return the results to "CYC84" for

continual use. Namely, the modification on "PP" in "STE" can be passed to "CYC84".

2.4.3 Modal call of subprogram

Any subprogram can be called in modal manner in NC program, namely self-holding. This

function has great significance on simplifying the programming during repeated use of

drilling circulation.

Command format:

MCALL SUBPROGRAM () ; modal call of a subprogram

......
NC program
2.4 Subprogram

MCALL ; cancel the modal call

Function:

Add "MCALL" keyword before the subprogram name to achieve the modal call of a

subprogram. With this function, automatically call and process the subprogram behind each

block with track movement.

Notes:

 Disable this function, if only MCALL is programmed without any subprogram name

postfixed. Or, change this function if another subprogram is subject to modal call.

 Nesting is not allowed during modal call. Namely, the subprogram to be subject to

modal call should not contain other modal calls of subprogram.

Examples:

N10 M03 S1500

N20 G00 X0 Y0 Z10

N30 F100

N40 MCALL CYCLE81 (10, 0, 3, -20, 0) ; the modal call is activated, yet without

drilling performed

N50 Y0 ; drill the first hole

N60 Y20 ; rapidly traverse to this position and drill the second hole

N70 Y40 ; rapidly traverse to this position and drill the third hole

N80 Y60 ; rapidly traverse to this position and drill the fourth hole

N90 MCALL ; cancel the modal call

N100 M02
Preparatory functions 3
3.1 Interpolation commands

It includes such interpolations as linear, circular, polynomial, and spline interpolations. It is

suggested that these interpolation commands should be used when the spindle is activated.

3.1.1 Quick positioning (G00)

Function:

Quick positioning refers to the point-to-point quick positioning.

Command format:

G00 X... Y... Z... ; quick positioning to X/Y/Z point

Notes:

 G00: quick positioning command.

 X, Y, Z: end point in Cartesian coordinates.

 G00, as an effective modal command, is a kind of G command falling within the

same group with G01 and G02. The G00 mode can be cancelled by other G

commands in the same group.

 The tool movement programmed with G00 is run at the highest traversing speed. The

rapid traverse rate is a synthetic rate and it is determined based on the internal

parameters of system.

 During quick positioning, position to the location of end point in linear interpolation

manner.

Examples:
Preparatory functions
3.3 Plane Command (G17/G18/G19)

N10 M03 S300

N20 G00 X160 Y130 Z2 ; position to the starting position

N30 G01 Z-5 F100 ; infeed

N40 X60 Y40 ; running on straight line

N50 G00 Z2

N60 G00 X40 Y200 Z100 ; retraction

N70 M30

3.1.2 Linear interpolation (G01)

Function:

Enable the tool to run along the straight line by use of G01.

Command format:

G01 X... Y... Z... F... ; linear interpolation to X/Y/Z point

Notes:

 G01: linear interpolation

 X/Y/Z: end point in Cartesian coordinates

 G01, as an effective modal command, is a kind of G command falling within the

same group with G00 and G02. The G01 mode can be cancelled by other G

commands in the same group.

 F refers to the feedrate. Example: G01 G94 X100 Y20 Z30 F100 ; approach the end
point in X, Y, and Z axes at 100mm/min feedrate.

Examples:

N10 M03 S300

N20 G00 X50 Y90 Z2 ; position to the starting position

N30 G01 Z-2 F40 ; infeed

N40 Y10

N50 G00 Z100 ; retraction

N60 M30

3.1.3 Circular interpolation (G02/G03)

The control system provides a series of different methods for programming the circular

motion. The circular motion is described through the following ways:

 Center and end points in Cartesian coordinates

 Radius and end point in Cartesian coordinates

 Central angle and end point in Cartesian coordinates

 Central angle and center point in Cartesian coordinates

 Intermediate and end points in Cartesian coordinates

 End point and starting point tangential direction in Cartesian coordinates

Command format:

G02/G03 X… Y… Z… I …J… K… ; programming methods of end and center points;

center point coordinate is an increment relative to the starting point


Preparatory functions
3.3 Plane Command (G17/G18/G19)

G02/G03 X… Y… Z… CR=… ; programming methods of end point and radius; CR=given

radius of circular arc

G02/G03 X… Y… Z… AR=… ; programming methods of end point and central angle;

AR=given central angle

G02/G03 I …J… K… AR=… ; programming methods of center point and central angle;

AR=given central angle; center point coordinate is an increment relative to the starting point

of circular arc

CIP X… Y… Z… IM=…JM=… KM=… ; programming methods of end and intermediate

points

CT X… Y… Z… ; programming methods of end point and tangent

Notes:

 G02: clockwise circular interpolation; G03: counterclockwise circular interpolation

 CIP: perform circular interpolation through the intermediate point; CT: perform

circular interpolation through tangent transition

 X, Y, Z: end point of circular arc in Cartesian coordinates

 I, J, K: increment of center point relative to the starting point in Cartesian coordinates

 CR=: radius of circular arc

 AR=: central angle of circular arc

 IM=, JM=, KM=: intermediate point in Cartesian coordinates

Notes:

 Working plane: The control system identifies the direction of rotation of circular arc

by use of working plane (G17/G18/G19). The clockwise (G02) and counterclockwise

(G03) circular interpolation directions in each plane are as shown in figure 3.1:

Figure 3.1 Relationship between working plane and directions of circular arc
 X, Y, Z: This specifies the end point of circular arc and it is expressed in absolute

value or increment value based on G90/G91. In case of increment value, the value

equals to the distance between the starting point and end point of circular arc.

 I, J, K: This specifies the position of center point of circular arc and it is the

increment value from starting point to center point of circular arc. No matter in G90

or G91 mode, this represents the increment value as shown in figure 3.2. I0, J0, and

K0 can be omitted. However, when X, Y, and Z are omitted (the starting and end

points of circular arc are the same) and I, J, and K are specified, this represents a 360°

circular arc, namely a circle.

Figure 3.2 Relationship between center and starting points in different planes

 CR=radius of circular arc: If a circular arc equal to or less than 180° is specified, the

radius is positive value ("+" can be omitted); if a circular arc over 180° is specified, the

radius must be a negative value.

 In the parameter setting on system setting page, whether to specify G02 and G03 as modal

command can be set through "modal switch of circular arc command". If the modal switch

is set to "OFF", G02 and G03 are non-modal commands. If that is set to "ON", G02 and

G03 are modal commands.

 If the programming speed of circular arc is greater than the maximum allowable speed of

curvature radius, the system will reduce the programming speed automatically.

Examples:
Preparatory functions
3.3 Plane Command (G17/G18/G19)

N10 M03 S1000

N20 G00 G90 X161.96 Y70

N30 G17 G01 Z-5 F100

N40 G02 X140 Y151.96 I-51.96 J30 ; given end and center points of circular arc

N40 G02 X140 Y151.96 CR=-60 ; given end point and radius of circular arc

N40 G02 X140 Y151.96 AR=270 ; given end point and central angle of circular arc

N40 G02 I-51.96 J30 AR=270 ; given center point and central angle

N40 CIP X140 Y151.96 IM=90 JM=43.43 ; given end and intermediate points of

circular arc

N50 G00 Z100

N60 M30

1. Given end point and center point (or radius) of circular arc

Function:

Process the circle or circular arc by programming the given end point and center point of

circular arc.

Command format:

G02/G03 X… Y… Z… I… J… K…

Or G02/G03 X… Y… Z…CR=…

Notes:

 G02: clockwise circular interpolation; G03: counterclockwise circular interpolation

 X, Y, Z: This specifies the end point of circular arc in Cartesian coordinates and it is

expressed in absolute value or increment value based on G90/G91. In case of


increment value, the value equals to the distance between the starting point and end

point of circular arc.

 I, J, K: This specifies the position of center point of circular arc and it is the increment

value from starting point to center point of circular arc. No matter in G90 or G91 mode,

this represents the increment value.

 CR=: If the programmed circular arc is equal to or less than 180°, CR is positive value

and the positive sign ("+") can be omitted; if the programmed circular arc is over 180°,

CR is negative value.

 Notice that the circle cannot be programmed by use of "CR=". The circle must be

programmed by use of "I, J, K".

Examples:

N10 G00 X80 Y94.64

N20 G03 X25.36 Y40 CR=40 F200

2. Given end point (or center point) and central angle of circular arc

Program the circular arc by specifying the central angle and end point (or center point) of

circular arc.

Command format:

G02/G03 X… Y… Z… AR=…

G02/G03 I …J… K… AR=…

Notes:

 G02: clockwise circular interpolation; G03: counterclockwise circular interpolation


Preparatory functions
3.3 Plane Command (G17/G18/G19)

 X, Y, Z: This specifies the end point of circular arc in Cartesian coordinates and it is

expressed in absolute value or increment value based on G90/G91. In case of

increment value, the value equals to the distance between the starting point and end

point of circular arc.

 I, J, K: This specifies the position of center point of circular arc and it is the increment

value from starting point to center point of circular arc. No matter in G90 or G91 mode,

this represents the increment value.

 AR=: The value of central angle ranges from 0° to 360°.

Examples:

N10 G00 X80 Y94.64

N20 G03 X25.36 Y40 AR=150 F200

Or, N20 G03 I-20 J-34.64 AR=150 F200

3. Given end and intermediate points of circular arc

Program the circular arc with CIP through the end and intermediate points. As shown in

figure 3.3, the circular arc moves towards starting point, intermediate point, and end point

successively.
Figure 3.3 Given end and intermediate points of circular arc
Command format:

CIP X…Y…Z…IM=…JM=…KM=…

Notes:

 CIP: Perform circular interpolation through the intermediate point

 X, Y, Z: This specifies the end point of circular arc in Cartesian coordinates and it is

expressed in absolute value or increment value based on G90/G91. In case of

increment value, the value equals to the distance between the starting point and end

point of circular arc.

 IM=, JM=, KM=: This specifies the intermediate point of circular arc in Cartesian

coordinates and it is expressed in absolute value or increment value based on

G90/G91. In case of increment value, the value equals to the distance between the

starting point and intermediate point of circular arc.

Examples:
Preparatory functions
3.3 Plane Command (G17/G18/G19)

N10 G00 X80 Y94.64

N20 CIP X25.36 Y40 IM=31.72 JM=88.28 F200

4. Given end point and tangent of circular arc

Function:

Tangent transition function is an extended function of circular arc programming. The

circular arc can be specified by the tangential direction of end and starting points. CT will

generate a circular arc being tangent to the contour segment formerly programmed by {}. It

is as shown in figure 3.4.

Figure 3.4 End point and tangent of circular arc

Tangential direction: The tangential direction of the starting point of a CT block depends on

the end point tangent of programmed contour of the previous block.

Command format:

CT X…Y…Z…

Notes:

 CT: circular arc of tangent transition

 X…Y…Z…: end point of circular arc in Cartesian coordinates

 This is applicable when CT is non-modal. Generally, the circular arc depends on the

tangential direction, starting and end points.

 If the extension line of starting tangent passes the end point, a straight line rather than
a circle will be generated (limiting case: circle with a radius of infinite length). In this

case, the system gives alarm.

3.1.4 3D circular interpolation (CIPD)

Perform 3D circular interpolation in three-dimensional space by specifying the intermediate

and end points of circular arc.

Command format:

CIPD X... Y... Z... IM=... JM=... KM=...

Notes:

 CIPD: 3D circular interpolation command

 X, Y, Z: end point coordinates of circular arc command

 IM=, JM=, KM=: This specifies the intermediate point of circular arc in Cartesian

coordinates and it is expressed in absolute value or increment value based on

G90/G91. In case of increment value, the value equals to the distance between the

starting point and intermediate point of circular arc.

Examples:

N10 G90 G01 X6 Y0 Z0

N20 CIPD X0 Y8 Z0 IM=3 JM=4 KM=5


Preparatory functions
3.3 Plane Command (G17/G18/G19)

3.1.5 Polynomial interpolation (POLY)

From its intended purpose, the polynomial interpolation (POLY) is not a kind of spline

interpolation.

Parameter equation of cubic polynomial:

X(t)=a0 + a1*t + a2*t2 + a3*t3

Y(t)=b0 + b1*t + b2*t2 + b3*t3

Z(t)=c0 + c1*t + c2*t 2 + c3*t3

Parameter equation of quintic polynomial:

X(t)=a0 + a1*t + a2*t2 + a3*t3 + a4*t4 + a5*t5

Y(t)=b0 + b1*t + b2*t2 + b3*t3 + b4*t4 + b5*t5

Z(t)=c0 + c1*t + c2*t 2 + c3*t3 + c4*t4 + c5*t 5

Where: t is parameter

Different curves will be generated if different specific values are assigned to the coefficient:

such as straight line, parabola, cubic polynomial, and quintic polynomial.

Command format:

POLY X=PM(Xe, a1, a2, a3) Y=PM(Ye, b1, b2, b3) Z=PM(Ze, c1, c2, c3) PT=n

POLY X=PM(Xe, a1, a2, a3, a4, a5) Y=PM(Ye, b1, b2, b3, b4, b5) Z=PM(Ze, c1, c2, c3, c4, c5)

PT=n

Parameters:

 POLY: select the cubic or quintic polynomial interpolation.

 X, Y, Z: axis names

 Xe, Ye, Ze: position of end point of programming track

 a1, a2, a3, a4, a5: If the coefficient value is zero, these values can be null, but a comma

must be used as a placeholder. If no comma is used as a placeholder, the coefficients

are of one-to-one correspondence from front to the back. The one that is not

corresponding is zero by default. Such as, if X=PM(1, 2), then a1=1, a2=2, and the

part after a3 is equal to 0.

 PT: parameter range; value range: PT>0. PT value is used in the corresponding block.

If without programming PT, then PT=1. The value range of t in the parameter
equation is [0, PT].

 If the end point value computed based on the multinomial coefficient is inconsistent

with the end point (Xe, Ye, Ze) in programming, namely, it exceeds the range of

parameter value set by the system, alarm will be given!

Notes:

 Polynomial interpolation is non-modal command, and it belongs to the same G code

group with G00, G01, G02, G03, and spline interpolation. Other commands in the

same group can cancel the polynomial interpolation.

 When the polynomial interpolation is effective, if only the programming end point

has no programming coefficient, a straight line will be interpolated to the end point.

 In the polynomial command block, G (G command in G01 group is excluded), M, S,

T, D, and other keywords cannot be programmed, otherwise, an error message will be

displayed.

Examples:

N10 POLY X=PM () Y=PM () Z=PM () ; linear axis polynomial is interpolated to the end

point.

3.1.6 Spline interpolation (AKIMA, NURBS, CUBIC)

Through spline interpolation, a smooth curve can be used for connecting the disperse points.

Spline is used for fitting a series of disperse points. Different spline functions are of

different nature, so the interpolation results are different too.

If it is required to connect a series of points through a curve, programming of spline

interpolation is required. The following three kinds of splines are acceptable:

 AKIMA spline (Akima spline)

 NURBS spline (NURBS spline, non-uniform and rational B spline)

 CUBIC spline (three-dimensional spline)

Such three splines are compared in three same data points are as shown in figure 3.5:
Preparatory functions
3.3 Plane Command (G17/G18/G19)

CUBIC

NURBS

AKIMA

Figure 3.5 Three kinds of splines with the same interpolation point

1. AKIMA spline

Command format:

AKIMA X... Y... Z...

Notes:

 As shown in figure 3.6, AKIMA spline passes each data point (namely the

programming point) accurately.

 The cubic polynomial is used in interpolation.

 AKIMA spline has to process at least 3 data points. Namely, for each AKIMA spline

curve, the user must program at least 3 blocks. If less than 3 blocks are programmed

for AKIMA spline curve, alarm will be given.

 AKIMA spline is modal command, and it belongs to the same G code group with

G00 and G01. Other commands in the same group also can cancel the AKIMA spline.

 In the AKIMA spline command block, G (G command in G01 group is excluded), M,

S, T, D, and other keywords cannot be programmed, otherwise, an error message will

be displayed.
Figure 3.6 AKIMA spline

Examples:

N10 AKIMA X... Y... Z... ; enable the first AKIMA spline curve

N20 X... Y... Z...

N90 X...Y...Z...

N100 AKIMA X... Y...Z... ; enable the second AKIMA spline curve

N110 X...

2. NURBS spline

Command format:

NURBS X... Y... Z... SD=... PW=... PL=...

Notes:

 X, Y, Z: the coordinate of control point

 SD=3: degree of spline, corresponding to the cubic spline. In case of no number of

programming, it is defaulted as cubic spline.

 PW=: weighting, as shown in figure 3.7. Value range: PW>0. In case of no

programming weighting, it is defaulted as 1.

 PL=: pitch, ranging among [0, 1]. This parameter must be programmed, and an error

message will be displayed in case of no programming. A piece of NURBS starts with

PL=0 and ends with PL=0. At the end, the PL accumulated value is equal to 1.

 The total number of control points in NURBS spline programming should not be less

than SD+1, otherwise alarm will be given.


Preparatory functions
3.3 Plane Command (G17/G18/G19)

 NURBS spline is modal command, and it belongs to the same G command group

with G00, G01, G02, G03, and polynomial. Other commands in the same group also

can cancel the NURBS spline.

 In the NURBS spline block, G (G command in G01 group is excluded), M, S, T, D,

and other keywords cannot be programmed, otherwise, an error message will be

displayed.

Figure 3.7 Impacts of different weightings on NURBS spline

Figure 3.8 NURBS spline

Examples:

G01 X0 Y0 Z0 F100

NURBS X1 Y0 Z2 PL=0

X2 Y0 Z3 PL=0.2920

X4 Y0 Z6 PL=0.2237
X4.5 Y0 Z5 PL=0.2785

X6 Y0 Z1 PL=0.2058

X7 Y0 Z5.5 PL=0

G01 X20 Y20 Z-20…

3. CUBIC spline

Command format:

CUBIC X... Y... Z...

Notes:

 The cubic polynomial is used in interpolation.

 Other programming rules are the same as that of AKIMA spline.

Figure 3.9 CUBIC spline

 AKIMA, NURBS, and CUBIC splines are effective modal commands, and they

belong to the same interpolation command group with G00, G01, G02, and G03.

Examples:
Preparatory functions
3.3 Plane Command (G17/G18/G19)

N10 G01 X0 Y0 F300

N15 X10

N30 CUBIC X20 Y10 ; take cubic spline as an example, the

curvature is zero in the starting and end

points of curved surface

N40 X30 Y10

N50 X40 Y5

N60 X50 Y15

N70 X55 Y7

N80 X60 -Y20

N90 X65 Y20

N100 X70 Y0

N110 X80 Y10

N120 X90 Y0

N130 M30

3.1.7 Helical interpolation (G22/G23)

Function:

Helical interpolation G22/G23 consists of circular interpolation within the working plane and synchronous
movement of the third axis. Circular curves within the working plane, besides common circular arc with equal

radius, shall also share the same center point. Their radius is a spiral whose linearity gradually changes.

Rectilinear motion of the third axis must be synchronous with circular arc or spiral within the working plane,

forming the spiral line in cylinder or circular cone shape with equal thread pitch. If the third axis is not specified or

coordinates of the third axis are kept the same, it is equal to performing circular arc or spiral interpolation.

Command format:

K _ 
Q _ 
G 22  
G17   X_ Y_ I_ J_ Z_   F_
G 23  L _ 
 P _ 

J _
Q _ 
G 22  
G18   Z_ X_ K_ I_ Y_   F_
G 23 L _ 
 P _ 

I _
Q _ 
G 22  
G19   Y_ Z_ J_ K_ X_   F_
G 23  L _ 
 P _ 

Notes:

 G22/G23: G22 means the spiral line rotating towards clockwise direction; G23 means the spiral line rotating

towards counterclockwise direction.

 G17/G18/G19: selecting of working plane;

 X/Y/Z: selecting of end point;

 I/J/K: Its definition is relevant to the working plane.

 G17: I/J means the coordinate of the center point with respect to the starting point, and K means thread

pitch.

 G18: K/I means the coordinate of the center point with respect to the starting point, and J means thread

pitch.

 G19: J/K means the coordinate of the center point with respect to the starting point, and I means thread

pitch.

 Q: radius increase or decrease after the spiral rotates a cycle; Positive value indicates increase, while negative

value indicates decrease.


Preparatory functions
3.3 Plane Command (G17/G18/G19)

 L: number of rotating cycles of the spiral; It is positive, and could also be decimal.

 P: rotating angle of the spiral (unit: degree).

 Thread pitch, Q, L, P: One of the four parameters must be specified, and the rest three could be neglected. If

two among the above parameters are specified at the same time, they shall be selected as per the priority of

"Q>thread pitch>P>L".

Examples:

N10 G00 X0 Y-50 Z0

N20 Y-35

N30 G22 X-50 Y0 Z-125 I0 J35 P810 The spiral travelling 810° from the starting

point to the end point, totaling 2.25 cycles

3.2 Chamfer and radius (CHF, CHR, RND)

Function:

Contour angle could be defined as radius or chamfer.

Command format:
G… X…Y…Z…CHF=… Chamfer of contour angle; its value is equal

to length of chamfer.

G… X…Y…Z…CHR=… Chamfer of contour angle; its value is equal

to side length of chamfer.

G… X…Y…Z…RND=… Radius of contour angle; its value is equal to

radius of a circle.

Notes:

 Chamfer CHF or CHR: Insert a straight line between contour of straight lines, contour of circular arc and

contour of straight line and circular arc, and chamfer the angle, as shown in Figure 3.11:

Figure 3.11 Schematic Diagram of CHF and CHR

 Radius RND: Insert a circular arc between contour of straight lines, contour of circular arc and contour of

straight line and circular arc. Tangent transits between the contour, as shown in Figure 3.12:
Preparatory functions
3.3 Plane Command (G17/G18/G19)

Figure 3.12 Schematic Diagram of RND

 Chamfer or radius could be added in the corner of any contour. If radius and chamfer are both programmed in

a program block, only add radius despite program sequence.

 If several successive program blocks exclude a program block with traverse command on coordinate axis,

either chamfering or rounding is not allowed.

 Two program blocks with traverse command, that connect chamfer or radius, must be within the same plane.

 Added radius and chamfer are subject to the last program block.

3.3 Plane Command (G17/G18/G19)

Function:

Machining plane must be determined prior to compensation for tool radius within the plane, determination of

infeed direction in compensation for tool length, and interpolation of circular arc within the plane, as shown in

Figure 3.13:

Figure 3.13 Working Plane

Command format:

G17 XY working plane in infeed direction Z

G18 ZX working plane in infeed direction Y

G19 YZ working plane in infeed direction X

Notes:
 In preliminary setting of the system, G17 is the working plane for milling, and G18 is the working plane for

turning by default.

 The working plane must be specified in invocation of G41/G42 where tool radius is compensated for. In the

way, the control system identifies the plane to compensate for tool radius.

 In machining of inclined plane, rotation of the coordinate system enables the coordinate axis to be placed on

the inclined plane, and induces rotation of the working plane.


Preparatory functions
3.3 Plane Command (G17/G18/G19)

3.4 Absolute/Relative Command (G90/G91, AC/IC)

Function:

In absolute dimensioning (G90), position data always depends on the origin of current effective coordinate system,

namely programming of the absolute position where the tool reaches. In incremental dimensioning (G91), position

data depends on the last reaching point, namely programming of incremental dimensioning indicating how long

that the tool travels.

In incremental dimensioning (G91), key word AC could be used to set effective absolute dimensioning for a single

axis within the section. Meanwhile, in absolute dimensioning (G90), key word IC could be used to set effective

incremental dimensioning for a single axis within the section.

Command format:

G90 Activating absolute dimensioning. The

modality is effective

G91 Activating incremental dimensioning . The

modality is effective

Axis=AC (…) AC non-modal command. Within the bracket

is specified position value

Axis=IC (…) IC non-modal command. Within the bracket

is specified position value

Notes:

 Modality is effective in G90 and G91. The system preliminarily specifies that absolute dimensioning of G90

is effective.

 AC/IC could be used for programming of linear axis and rotation axis, and for programming of interpolation

parameter I/J/K.

 When AC/IC is used for programming of rotation axis, AC value ranges from 0° to 360°, and AC value

ranges from 0° to ±99999.999°. When AC/IC is used for programming of linear axis, the range of AC/IC value is

the same as that of X-/Y-/Z-axis.

 When AC/IC is used for programming of rotation axis, moving direction of AC depends on actual position of
Preparatory functions
3.4 Absolute/Relative Command (G90/G91, AC/IC)

the rotation axis. When the target position is greater than actual position, the axis approaches to positive direction

of rotation. Or otherwise, the axis approaches to negative direction of rotation.

 Symbol of IC value defines rotation direction of the rotation axis. Positive sign means incremental feed in the

positive direction, while negative sign means incremental feed in the negative direction. IC could program for

more than 360° (including), for example, C=IC (720).

Examples:

N10 M03 S1000

N20 G90 G00 X140 Y70 Z2

N30 G01 Z-5 F200

N40 G02 X90 Y120 I=AC (90) J=AC (70) Coordinate of the center point is

determined with respect to absolute

dimensioning

N50 G00 Z2

N60 M30

3.5 Conversion to metric system/British system (G70/G71)

Function:
Preparatory functions
3.12 Feed function

Usage of G function below could enable conversion between metric system and British system.

Command format:

G70 Actuating British system

G71 Actuating metric system

Notes:

 The basic dimension system set in the control system, is non-relevant to dimension instruction of

programming G70/G71.

 Use G70 or G71 to program all geometric data directly relevant to the workpiece, for example:

 Position data X, Y, Z under spline function in G00, G01, G02, G03, CIP, CIPD, CT, G22, G23, POLY

 Interpolation parameter I, J, K

 Radius of circular arc, CR

 Programmable work offset (TRANS, ATRANS)

All other geometric data, which is not directly relevant to the workpiece, such as feedrate, tool compensation, and

settable work offset, is non-relevant to programming of G70 or G71.

3.6 Working Area Limitation (G25/G26)

Function:

G25/G26 command could define working area of all axes, and specify operable area and non-operable area. Tool

tip must be within the area when length compensation of the tool is effective. Or otherwise, reference point of the

tool rest must be within the area. Programmable command group, WALIMON/WALIMOF, could be used to

enable or disable working area limitation of the axis or direction.

Command format:

G25 X…Y…Z… The lower limit of the working area

G26 X…Y…Z… The upper limit of the working area

WALIMON Enabling working area limitation

WALIMOF Disabling working area limitation

Notes:

 Working area limitation is not effective until the coordinate value returns to the reference point.
Preparatory functions
3.4 Absolute/Relative Command (G90/G91, AC/IC)

 G25 X…Y…Z…, G26 X…Y…Z…, WALIMON and WALIMOF are separate program blocks.

 X-/Y-/Z-coordinate of G25/G26 is defined in coordinate system of the workpiece. For detail, see 4.2.

 Working area limitation has no effect on rotation axis of modality.

Examples:

N10 G25 X0 Z40 Lower limiting value with respect to working

area limitation

N20 G26 X80 Z160 Upper limiting value with respect to working

area limitation

N30 T1 M06

N40 G00 X70 Z150

N50 WALIMON Enabling working area limitation

… Only within working area

N90 WALIMOF Disabling working area limitation

3.7 Return to the Reference Point (G74)

Function:

Tool automatically moves to the reference point from the intermediate point. Position of reference point is stored

in parameter of the system.

Command format:

G74 X…Y…Z…

Notes:

 X, Y, Z: the coordinate of the intermediate point.

 Axes locate at the intermediate point in rapid traverse rate, and accomplish location from the intermediate

point to the reference point in rapid traverse rate.

 G74, as non-modal command, is written by separate program block.

 If X, Y and Z are not specified, axes directly return to the reference point.

Examples:

N10 G74 X40 Returning to the reference point through the


Preparatory functions
3.12 Feed function

intermediate point, X40

N20 G74 Y60 Returning to the reference point through the

intermediate point, Y60

3.8 Return to the Fixed Point (G75)

Function:

G75 command could achieve such function that NC program returns to fixed point, such as tool change point,

feeding point and tray change point. Tool automatically moves to fixed point from intermediate point. Position of

fixed point is stored in parameter of the system.

Command format:

G75 X…Y…Z…

Notes:

 X, Y, Z: the coordinate of the intermediate point.

 Axes locate at the intermediate point in rapid traverse rate, and accomplish location from the intermediate

point to the fixed point in rapid traverse rate.

 G75, as non-modal command, is written by separate program block.

 If X, Y and Z are not specified, axes directly return to the fixed point.

Examples:

N10 G75 X40 Returning to the fixed point through the

intermediate point, X40

3.9 Pause (G04)

Function:

Insertion of a G04 command between two program blocks could suspend machining for a given time.

Command format:

G04 H… Pause for a given time interval (unit: s)


Preparatory functions
3.4 Absolute/Relative Command (G90/G91, AC/IC)

Examples:

N10 G01 Z50 F200

N20 G04 H2 Pause for 2s

N30 X50

Notes:

Figure written behind H could be accurate to two decimal places. G04 command must be independent program

block.
3.10 Polar coordinates

3.10.1 Polar coordinate system (AP, RP)

Function:

Polar coordinate system, a two-dimensional coordinate system, is defined on the reference plane G17/G18/G19. In

the coordinate system, the coordinate point is represented by an intersection angle (polar angle) and a section of

distance (polar radius) with respect to central point (pole). Pole could be defined in Cartesian coordinate system or

polar coordinate system, as shown in Figure 3.14 below:

Figure 3.14 Definition of Polar Angle and Polar Radius towards Positive Direction on G17/G18 Plane

Command format:

RP= Polar radius

AP= Polar angle

Notes:

 Polar radius, a positive absolute value, is defined as the distance from current point to pole (unit: mm or

inch).

 Polar radius is always kept until pole or plane changes, and the modality is effective.

 Polar angle means intersection angle formed between X-axis on the plane, such as X-axis on plane G17.

 Polar angle is always kept until a new pole is defined or the working plane is changed, and the modality is

effective.

 Counterclockwise rotation of pole angle indicates positive direction. Polar angle ranges from -360° to 360°
Preparatory functions
3.4 Absolute/Relative Command (G90/G91, AC/IC)

(unit: degree).

3.10.2 Definition of Pole (G110/G111/G112)

Pole could be defined by Cartesian coordinates or polar coordinates, as shown in Figure 3.15 below:

Figure 3.15 Definition Mode of Pole

Command format:

G110 X…Y…Z… or G110 AP=… RP=…

G111 X…Y…Z… or G111 AP=… RP=…

G112 X…Y…Z… or G112 AP=… RP=…

Notes:

 G110: Defining pole with respect to programmed point in the last time. Polar coordinates after G110 are

programmed based on the pole.

 G111: Defining pole with respect to the origin of current workpiece coordinate system.

 G112: Defining pole with respect to the last effective pole.

 G110, G111 and G112 are all separate program blocks.

 Defined pole is kept effective until new pole is defined.

 If the pole is not defined, the origin of current coordinate system could be taken as the pole.

 Only interpolation commands G00, G01, G02 and G03 could be programmed in polar coordinates. If AP or

RP programming is found in other commands, alarm shall be given out.


Preparatory functions
3.12 Feed function

3.10.3 Programming of Polar Coordinates

Motion commands G00, G01, G02 and G03 could be programmed in polar coordinates.

Command format:

G00 AP=… RP=…

G01 AP=… RP=…

G02 AP=… RP=…

G03 AP=… RP=…

Notes:

 G00 means rapid traverse command. G01 means linear interpolation command. G02 means interpolation

command of clockwise circular arc. G03 means interpolation command of counterclockwise circular arc.

 AP means polar angle, namely intersection angle formed between polar radius and horizontal axis of the

working plane (such as, X-axis in G17 plane). Counterclockwise direction represents positive direction. The polar

angle ranges from -360° to 360° (unit: degree), and the modality of polar angle is effective.

 RP means polar radius, which is always positive absolute value. The modality of polar radius is effective.

 The third geometrical axis, vertical to the working plane, could also be represented by Cartesian coordinates,

as shown in Figure 3.16 below, G17 G00 AP=...RP=... Z....

Figure 3.16 Programming of Polar Coordinates and Cartesian Coordinates

Examples:
Preparatory functions
3.4 Absolute/Relative Command (G90/G91, AC/IC)

N10 G17 G54 Defining G17 plane and selecting workpiece

coordinate system

N20 G111 X100 Y90 Defining pole

N30 G00 RP=60 AP=30 Z5 Locating to the starting point

N40 (SUB) Subprogram call

N50 G00 AP=IC (90) Quickly positioning the next position. Polar

angle is defined by incremental

dimensioning. As polar radius defined in

N30 is still effective, it is not required for

setting.

N60 (SUB)

N70 G00 AP=IC (90)

N80 (SUB)

N90 G00 AP=IC (90)

N100 (SUB)

N110 G00 X300 Y200 Z100 Retraction. X-, Y-, and Z-coordinates take

G54 as the origin other than the pole defined

by N20

N120 M30

Notes:

Programming method of current points:


Preparatory functions
3.12 Feed function

Polar coordinates: Take newly defined pole as the origin for programming.

Rectangular coordinates: Take newly defined settable frame (such as G54) or programmable frame (such as,

TRANS) as the origin for programming.

Examples:

N10 G17 G54 G90

N20 G111 X20 Y30 Defining pole

N30 G00 X10 Y20 X and Y taking G54 as the origin for

programming

N40 AP=10 RP=20 AP and RP taking the pole defined by N20

for programming of polar coordinates

N50 X40 Y50 X and Y taking G54 as the origin for

programming
3.11 Simplified Programming (Fixed Cycle)

3.11.1 Plane milling CYCLE71

Programming:

CYCLE71 (RTP, RFP, SFD, DEP, SPA, SPO, LENG, WID, STA, MIDP, MIWD, FALD, FFS, TYP)

Parameters:
RTP Real Retraction plane (absolute coordinate)
RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Depth (absolute coordinate)
SPA Real X-coordinate of the starting point (absolute coordinate)
SPO Real Y-coordinate of the starting point (absolute coordinate)
Rectangle length, increment, symbol determining length
LENG Real
direction
Rectangle width, increment, symbol determining width
WID Real
direction
Intersection angle between the long side of the rectangle
and the first axis (X-coordinate) on the plane (unsigned
STA Real
input value)
Range of the value: 0<=STA<180°
MIDP Real The maximum infeed depth (unsigned input value)
MIWD Real The maximum infeed width (unsigned input value)
Finishing allowance on the bottom (unsigned input
FALD Real
value)
FFS Real Surface finishing feedrate
Machining type: (unsigned input value)
Units:
1=rough machining
2=finishing
TYP Int Tens:
1=parallel to X-coordinate, machining in a direction
2=parallel to Y-coordinate, machining in a direction
3=parallel to X-coordinate, machining in alternating
direction
Preparatory function
3.12 Feed function

4=parallel to Y-coordinate, machining in alternating


direction
Function:

Using CYCLE71 could mill any rectangular plane. The cycle has no compensation for tool radius, and

automatically plans paths around tool center.

Parameter description:

Figure 3.17 Parameter Diagram

RTP (Retraction Plane)

It means retraction position of the tool after a cycle.

RFP (Reference Plane)

It means initial position for plane milling, and generally refers to the upper surface of a blank.

SFD (Safety Distance)

It means the safety distance from the reference plane set to ensure safety. This distance is also applicable to safety

overflow travel along length and width direction within the plane.
Figure 3.18 SFD Diagram within the Plane (Machining Type: 41)

DEP (Depth)

It means end position for plane milling and is an absolute coordinate.

SPA and SPO (Starting Point)

SPA and SPO respectively represent X-coordinate and Y-coordinate of the starting point of the rectangle.

LENG and WID (Length and Width)

LENG and WID, as incremental coordinates with respect to the starting points SPA and SPO, define length and

width of the rectangle. Their symbol determines position of the rectangle.

STA (Intersection Angle between the Long Side of the Rectangle and the First Axis)

STA defines the intersection angle between the long side of the rectangle (the length axis) and the first axis (the

X-axis) on the working plane.

MIDP (Maximum Infeed Depth)

The cycle, in accordance with the maximum infeed depth, calculates infeed number and depth of rough machining.

If MIDP=0, the machining is completed in a cut in a cycle by default.

MIWD (Maximum Infeed Width)

The cycle, in accordance with the maximum infeed width, calculates infeed number and width in transverse

direction. If MIWD=0, it deems that MIWD is equal to 0.8 times of tool diameter in a cycle by default.

TYP (Machining Type):

Units:

1=rough machining

2=finishing

Tens:
Preparatory function
3.12 Feed function

1=parallel to X-coordinate, machining in a direction

2=parallel to Y-coordinate, machining in a direction

3=parallel to X-coordinate, machining in alternating direction

4=parallel to Y-coordinate, machining in alternating direction

Type 1x Type 2x

Type 3x Type 4x

Figure 3.19 Machining Type

Programming sample:

In the example, dimension of the plane is shown in the following figure. The plane forms a 5° intersection angle

with X-coordinate, with depth of 10mm, the maximum infeed depth/width of 6mm/10mm and machining type of

31. Namely, the plane, parallel to X-coordinate, performs rough machining in alternating direction.
Figure 3.20 Programming Diagram

N10 T8 M06

N20 M3 S1500

N30 G17 G00 G90 G94 X0 Y0 Z20

N40 CYCLE71(10,0,2,-10,20,20,50,30,5,6,10,0,2000,31)

N50 G00 G90 X0 Y0

N60 M30

3.11.2 Contour milling CYCLE72

Programming:

CYCLE72 (KNAME, RTP, RFP, SFD, DEP, MIDP, FAL, FALD, FFC, FFD, TYP, TRC)

Parameters:

KNAME String Contour subprogram name


RTP Real Retraction plane (absolute coordinate)
RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Depth (absolute coordinate)
MIDP Real The deepest infeed depth (unsigned input value)
Finishing allowance of contour edge (unsigned input
FAL Real
value)
Preparatory function
3.12 Feed function

Finishing allowance on the bottom (unsigned input


FALD Real
value)
FFC Real Contour machining feedrate
FFD Real Deep machining feedrate
Machining type: (unsigned input value)
TYP Int 1=rough machining
2=finishing
Tool compensation options
40 cancel tool compensation
TRC Int
41 left tool compensation
42 right tool compensation
Function:

Milling can be conducted along any contour defined in the subprogram by CYCLE72.

Compulsive enclosure is not required with this contour, but the programming must be

conducted in the same direction and on the same plane as the milling. The direction of tool

radius compensation is specified by the user in the main program and is cancelled automatically

by the system after use.

Figure 3.21 Contour milling

Parameter description:
Figure 3.22 Parameter diagram

KNAME (contour subprogram name)

Following attentions shall be given to the contour subprogram when it programming:

Start and retraction paths must be included in the subprogram. The first program block,

which is usually a rapid traverse block with G00 and G90, defines the starting point. The

second block defines the starting point of the contour. The last block, which is usually a

rapid traverse block with G00 and G90, defines the retraction path.

RTP (Retraction Plane)

It means retraction position of the tool after a cycle.

RFP (Reference Plane)

Initial plane of the contour milling and usually refers to the upper surface of a blank.

SFD (Safety Distance)

A safety distance from the reference plane set to ensure safety.

DEP (Depth)

End plane of the contour milling and is an absolute coordinate.

MIDP (Deepest infeed depth)

The cycle, in accordance with the deepest infeed depth, calculates infeed number and depth

of rough machining. If MIDP=0, the cycle will take rough machining as finishing in a cut

by default.

Programming example:
Preparatory function
3.12 Feed function

Conduct the milling process on the below contour. The relevant parameters are: RTP=10,

RFP=0, SFD=5, DEP=-4, MIDP=1, FAL=0.25, FALD=0.1, FFS=800, FFD=400 and

TYP=1.

Figure 3.23 Programming diagram

Main program

N10 T8 M06

N20 M03 S1000

N30 G17 G00 G90 X-90 Y18 Z50

N40 CYCLE72("sub72",10,0,5,-4,1,0.25,0.1,800,400,1,41)

N50 G00 X-90 Y18

N60 M30

Subprogram "sub72.iso":

N10 G90 G01 X-78.696 Y10.129

N20 G01 X-30 Y17.321

N30 X-20 Y34.641

N40 X20

N50 X40 Y0

N60 X20 Y-34.641


N70 X-20

N80 X-40 Y0

N90 X-30 Y17.321

N100 X-28.5 Y19.919

N110 X-46.362 Y64.725

N120 RET

3.11.3 Rectangular journal milling CYCLE76

Programming:

CYCLE76 (RTP, RFP, SFD, DEP, LENG, WID, CRAD, SPA, SPO, STA, MIDP, FAL,

FALD, FFC, FFD, MDIR, TYP, LBS, WBS)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Depth (absolute coordinate)
LENG Real Journal length (unsigned input value)
WID Real Journal width (unsigned input value)
CRAD Real Corner radius of the journal (unsigned input value)
The X-coordinate of the reference point of the
SPA Real
journal (absolute coordinate)
The Y-coordinate of the reference point of the
SPO Real
journal (absolute coordinate)
The angle between the long side of the journal and
the primary shaft (X-coordinate) on the plane
STA Real
(unsigned input value)
Range of the value: 0<=STA1<180 degree
MIDP Real The deepest infeed depth (unsigned input value)
Finishing allowance of contour edge (unsigned
FAL Real
input value)
Finishing allowance on the bottom (unsigned input
FALD Real
value)
FFC Real Contour machining feedrate
FFD Real Deep machining feedrate
Preparatory function
3.12 Feed function

Milling direction: (unsigned input value)


0=climb milling
MDIR Int 1=conventional milling
2=clockwise milling (G2)
3=counterclockwise milling (G3)
Machining type: (unsigned input value)
TYP Int 1=rough machining
2=finishing
LBS Real Blank length (unsigned input value)
WBS Real Blank width (unsigned input value)

Function:

Rectangular journal can be machined on the plane by CYCLE76. CYCLE76, which calls

the contour milling cycle CYCLE72 to machine rectangular contour, is an exception among

contour milling cycles.

Figure 3.24 Milling rectangular journal

Parameter description:

Parameters RTP, RFP, SFD, DEP and MIDP can be referred in CYCLE72.
Figure 3.25 Parameter diagram

SPA and SPO (reference point)

The X-coordinate and Y-coordinate of the journal's central point are defined by parameters

SPA and SPO.

STA (the angle between the long side of the journal and the primary shaft)

STA defines the angle between the long side of the journal (the length axis) and the primary

shaft (the X-axis) on the work plane.

LENG, WID and CRAD (length, width and corner radius of the journal)

The shape of the journal can be defined by parameters LENG, WID and CRAD.

MDIR (milling direction)

The milling direction when machining the journal is defined by the parameter MDIR. The

direction can be directly defined as clockwise (G02) or counterclockwise (G03) as well as

climb milling or conventional milling. The milling direction is automatically determined by

rotation direction of the spindle in the cycle (clockwise or counterclockwise).


Climb milling Conventional milling
M03→G02 M03→G03
M04→G03 M04→G02
LBS and WBS (the length and width of blanks of the journal)

When machining the journal, the length and width of the blanks can be defined by LBS and

WBS. There is no signed input value in LBS and WBS. The blanks are automatically and

symmetrically placed on both sides of the journal's central point in the cycle.
Preparatory function
3.12 Feed function

Programming example:

In this case, the rectangular journal is in Plane XY. The coordinate of the intermediate point

is X45 Y50. The length is 60 mm, the width 40 mm and the corner radius 10 mm. The angle

with the X-axis is 5 degree. The machining depth is 10 mm and the deepest infeed depth is 6

mm. The finishing allowances of the edge and the bottom are both 0. The length of blanks is

70 mm and the width is 50 mm. Employ the method of climb milling and the machining

type of rough machining.

Figure 3.26 Programming diagram

N10 T8 M06

N20 M03 S1000

N30 G17 G00 G90 X100 Y100 Z10

N40 CYCLE76(10,0,2,-10,60,40,10,45,50,5,6,0,0,700,700,0,1,70,50)

N50 G00 X100 Y100

N60 M30

3.11.4 Circular journal milling CYCLE77

Programming:

CYCLE77 (RTP, RFP, SFD, DEP, SDIA, SPA, SPO, MIDP, FAL, FALD, FFC, FFD, MDIR,

TYP, DBS)

Parameters:
RTP Real Retraction plane (absolute coordinate)
RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Depth (absolute coordinate)
SDIA Real Journal diameter (unsigned input value)
The X-coordinate of the center of the journal
SPA Real
(absolute coordinate)
The Y-coordinate of the center of the journal
SPO Real
(absolute coordinate)
MIDP Real The deepest infeed depth (unsigned input value)
Finishing allowance of contour edge (unsigned
FAL Real
input value)
Finishing allowance on the bottom (unsigned input
FALD Real
value)
FFC Real Contour machining feedrate
FFD Real Deep machining feedrate
Milling direction: (unsigned input value)
0=climb milling
MDIR Int 1=conventional milling
2=clockwise milling (G2)
3=counterclockwise milling (G3)
Machining type: (unsigned input value)
TYP Int 1=rough machining
2=finishing
DBS Real Blank diameter (unsigned input value)

Function:

Circular journal can be machined on the plane by CYCLE77. CYCLE77, which calls the

contour milling cycle CYCLE72 to machine circular contour, is also an exception among

contour milling cycles.


Preparatory function
3.12 Feed function

Figure 3.27 Milling circular journal

Parameter description:

Parameters RTP, RFP, SFD, DEP and MIDP can be referred in CYCLE72.

Parameter MDIR can be referred in CYCLE76.

Figure 3.28 Parameter diagram

SPA and SPO (reference point)

The X-coordinate and Y-coordinate of the journal's central point are defined by parameters

SPA and SPO.

SDIA (journal diameter)

There is no signed input value in journal diameter.

DBS (diameter of blanks of the journal)

The diameter of blanks of the journal is defined by the DBS.

Programming example:

In this case, the diameter of blanks of the circular journal is 50 mm and that of the journal is

45 mm. The journal is in Plane XY. The coordinate of the center is X40 Y50 and the depth

is 10 mm. The deepest infeed depth is 6 mm. The finishing allowance of the edge is 0.2 mm

and that of the bottom is 0. Employ the method of conventional milling and the machining

type of rough machining.


Figure 3.29 Programming diagram

N10 T8 M06

N20 M03 S1800

N30 G17 G00 G90 X100 Y100 Z10

N40 CYCLE77(10,0,3,-10,45,40,50,6,0.2,0,700,700,1,1,50)

N50 G00 X100 Y100

N60 M30

3.11.5 Rectangular pocket milling POCKET1

Programming:

POCKET1 (RTP, RFP, SFD, DEP, LENG, WID, CRAD, CPA, CPO, STA, FFD, FFS, MIDP,

MDIR, FAL, TYP, MIDF, FFC, SSF)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Pocket depth (absolute coordinate)
LENG Real Pocket length (unsigned input value)
WID Real Pocket width (unsigned input value)
CRAD Real Corner radius (unsigned input value)
Preparatory function
3.12 Feed function

The X-coordinate of the center of the pocket


CPA Real
(absolute coordinate)
The Y-coordinate of the center of the pocket
CPO Real
(absolute coordinate)
The angle between the vertical axis of the pocket
and the primary shaft (X-coordinate) on the plane
STA Real
(unsigned input value)
Range of the value: 0<=STA1<180 degree
FFD Real Deep machining feedrate
FFS Real Surface machining feedrate
MIDP Real The deepest infeed depth (unsigned input value)
Milling direction: (unsigned input value)
MDIR Int 2=clockwise milling (G2)
3=counterclockwise milling (G3)
Finishing allowance of contour edge (unsigned
FAL Real
input value)
Machining type: (unsigned input value)
0=comprehensive machining
TYP Int
1=rough machining
2=finishing
The deepest infeed depth of finishing (unsigned
MIDF Real
input value)
FFC Real Finishing feedrate
SSF Real Spindle speed of finishing

Function:

A rectangular pocket at any place in the plane can be machined by POCKET1.

Figure 3.30 Milling rectangular pocket

Parameter description:
Parameters RTP, RFP, SFD, DEP and MIDP can be referred in CYCLE72.

Figure 3.31 Parameter diagram

CPA and CPO (central point)

The X-coordinate and Y-coordinate of the pocket's central point are defined by parameters

CPA and CPO.

STA (angle)

STA defines the angle between the vertical axis of the pocket and the primary shaft

(X-coordinate) on the plane.

LENG, WID and CRAD (length, width and corner radius of the pocket)

The shape of the pocket can be defined by parameters LENG, WID and CRAD.

If the radius of the tool is larger than that of the corner or half of the pocket length (or

width), an alarm of "Tool Radius Too Large" will be output in the cycle.

MDIR (milling direction)

The milling direction when machining the pocket is defined by the parameter MDIR. The

direction falls into clockwise (G2) and counterclockwise (G3).


Preparatory function
3.12 Feed function

Figure 3.32 Milling direction

Programming example:

In this case, the length of the rectangular pocket is 80 mm, the width 60 mm, the corner

radius 7 mm and the depth 10mm. The pocket is on Plane XY. The angle between the

pocket and X-axis is 0 degree. The finishing allowance of the pocket edge is 0.75 mm and

the safety distance from the reference plane is 0.5 mm. The coordinate of the pocket's

central point is X46 and Y42. The deepest infeed depth of rough machining is 4 mm and

that of finishing is 2 mm. Employ the machining type of comprehensive machining.

Figure 3.33 Programming diagram

N10 T8 M06
N20 M04 S600

N30 G17 G0 G90 X100 Y100 Z10

N40 POCKET1(5,0,0.5,-10,80,60,7,46,42,0,120,300,4,2,0.75,0,2,0,0)

N50 G00 X100 Y100

N60 M30

3.11.6 Circular pocket milling POCKET2

Programming:

POCKET2 (RTP, RFP, SFD, DEP, PRAD, CPA, CPO, FFD, FFS, MIDP, MDIR, FAL, TYP,

MIDF, FFC, SSF)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Pocket depth (absolute coordinate)
PRAD Real Pocket radius (unsigned input value)
The X-coordinate of the center of the pocket
CPA Real
(absolute coordinate)
The Y-coordinate of the center of the pocket
CPO Real
(absolute coordinate)
FFD Real Deep machining feedrate
FFS Real Surface machining feedrate
MIDP Real The deepest infeed depth (unsigned input value)
Milling direction: (unsigned input value)
MDIR Int 2=clockwise milling (G2)
3=counterclockwise milling (G3)
Finishing allowance of contour edge (unsigned
FAL Real
input value)
Machining type: (unsigned input value)
0=comprehensive machining
TYP Int
1=rough machining
2=finishing
The deepest infeed depth of finishing (unsigned
MIDF Real
input value)
FFC Real Finishing feedrate
Preparatory function
3.12 Feed function

SSF Real Spindle speed of finishing

Function:

A circular pocket at any place in the plane can be machined by POCKET2.

Figure 3.34 Milling circular pocket

Parameter description:

Parameters RTP, RFP, SFD, DEP and MIDP can be referred in CYCLE72.

Parameter MDIR can be referred in POCKET1.

Figure 3.35 Parameter diagram

CPA and CPO (central point)

The X-coordinate and Y-coordinate of the pocket's central point are defined by parameters

CPA and CPO.

PRAD (Pocket radius)


The shape of the pocket depends on its radius PRAD.

If the radius of the tool is larger than that of the pocket, an alarm of "Tool Radius Too

Large" will be output in the cycle.

Figure 3.36 Milling direction

Programming example:

In this case, the circular pocket is on Plane XY. The coordinate of the central point is X30

Y50 and the pocket radius is 45 mm. The allowance of finishing and the safety distance are

both 0. The pocket depth is 10 mm. The deepest infeed depth of rough machining is 4 mm,

the milling direction is G2 (clockwise) and the machining type is rough machining.

Figure 3.37 Programming diagram

N10 T8 M06
Preparatory function
3.12 Feed function

N20 M03 S800

N30 G17 G00 G90 X100 Y100 Z10

N40 POCKET2(3,0,0,-10,22.5,30,50,100,200,4,2,0,1,0,0,0)

N50 G00 G90 X100 Y100

N60 M30

3.11.7 Circumferential groove milling SLOT1

Programming:

SLOT1(RTP,RFP,SFD,DEP,DPR,NUM,LENG,WID,CPA,CPO,RAD,STA,INA,FFD,FFS,M

IDP,MDIR,FAL,TYP,MIDF,FFC,SSF,FALD,STA2)

Parameters:
RTP real Retraction plane (absolute coordinate)
RFP real Reference plane (absolute coordinate)
SFD real Safety distance (unsigned input value)
DEP real Running groove depth (absolute coordinate)
Running groove depth relative to reference plane (unsigned
DPR real
input value)
NUM int Number of running grooves
LENG real Running groove length (unsigned input value)
WID real Running groove width (unsigned input value)
The X-coordinate of the center of the circle (absolute
CPA real
coordinate)
The Y-coordinate of the center of the circle (absolute
CPO real
coordinate)
RAD real Circular radius (unsigned input value)
STA real Range of value of the start angle: -180<STA<=180
INA real Incremental angle
FFD real Deep machining feedrate
FFS real Surface machining feedrate
MIDP real The deepest infeed depth (unsigned input value)
Milling direction of running groove machining: (unsigned
input value)
0=climb milling
MDIR int
1=conventional milling
2=clockwise milling
3=counterclockwise milling
Finishing allowance of the edge of the running groove
FAL real
(unsigned input value)
Machining type (unsigned input value)
Units
Value: 0. comprehensive machining
1. rough machining
TYP int 2. finishing
Tens
Value: 0. In vertical G0
1. In vertical G1
2. In reciprocating G1
MIDF real The deepest infeed depth of finishing
FFC real Finishing feedrate
SSF real Spindle speed of finishing
FALD real Finishing allowance of the bottom of the running groove
STA2 real The maximum inserting angle when reciprocating
Function:

Used for machining the running grooves arranged as a circle. The longitudinal axes are

aligned at a radical direction.

Figure 3.38 Circumferential groove

Parameter description:
Preparatory function
3.12 Feed function

Figure 3.39 Parameter diagram

RTP (Retraction Plane)

It means retraction position of the tool after a cycle.

RFP (Reference Plane)

Initial plane of the running groove milling and usually refers to the upper surface of a blank.

SFD (Safety Distance)

A safety distance from the reference plane set to ensure safety.

DEP and DPR (running groove depth)

The running groove depth can be specified either by the absolute dimension (DEP) or by the

relative dimension (DPR) from the reference plane. When specified by the relative

dimension, the depth is calculated by the cycle itself with positions of the reference plane

and retraction plane.

NUM (number)

The Parameter NUM defines the number of running grooves

LENG and WID (the length and width of running grooves)

The shape of a running groove on the plane can be defined by LENG and WID. The tool

diameter shall not be larger than the running groove width, or an alarm of "Tool Radius Too

Large" will be output and the cycle will stop the execution. The tool diameter shall not be

less than half of the running groove width.

CPA, CPO and RAD (central point and radius)


Location of the circle is defined by the central point (CPA, CPO) and the radius (RAD).

Only positive value is permitted for a radius.

STA and INA (start angle and incremental angle)

The arrangement of running grooves on the circle can be defined by these two parameters.

STA explains the angle between the X-coordinate of the work plane activated in a cycle call

and the first running groove. INA explains the angle between a running groove and the next

one.

If INA=0, the incremental angle is automatically calculated within the cycle according to

the number of running grooves which are evenly distributed on the circle.

FFD and FFS (feedrate)

FFD is the feedrate in the depth direction and FFS is the feedrate of the surface when rough

machining.

MIDP (infeed depth)

MIDP is used to define the deepest infeed depth when rough machining. The infeed number

and feed depth are calculated automatically by the cycle according to MIDP and the running

groove depth.

MIDP=0 indicates reaching the depth of groove at one step.

MDIR (milling direction)

MDIR defines the machining direction of the running groove.

The direction can be directly defined as clockwise (G2) or counterclockwise (G3) as well as

climb milling or conventional milling. The milling direction is automatically determined by

rotation direction of the spindle in the cycle (clockwise or counterclockwise).

Climb milling Conventional milling


M3→G2 M3→G3
M4→G3 M4→G2
FAL (finishing allowance of the edge of the running groove)

FAL is used for programming the finishing allowance of the edge of the running groove.

Deep feed is not affected by FAL. If the FAL value is larger than the given value of the

running groove depth and the tool diameter, FAL will cut itself down to the maximum

permissible value. In this case, reciprocating milling is conducted at two end points along
Preparatory function
3.12 Feed function

the length of the running groove by deep infeeding during rough machining.

TYP, MIDF, FFC and SSF (machining type, infeed depth of finishing, feedrate and

spindle speed)

TYP is used to define the machining type.

Units:

0=comprehensive machining (finishing after rough machining)

a, In rough machining, counterbore the running grooves to meet the requirement of finish

allowance. The spindle speed is the one programmed before the call of cycle. The infeed is

defined by FFS and the infeed depth is defined by MIDP.

b, In finishing, the spindle speed is defined by SSF, the feed is defined by FFC and the

infeed depth in the depth direction is defined by MIDF.

- If MIDF=0, feed to the final depth immediately.

- If FFC is not programmed, the feed FFS is active.

- If SSF is not programmed, the spindle speed programmed before the call of cycle is

active.

1=rough machining

The spindle speed and programmed before the call of cycle the feed FFS are used to

counterbore the diameter of running grooves to meet the requirement of finish allowance.

The infeed depth is defined by MIDP.

2=finishing

The precondition of this cycle is that the running grooves are already counterbored and the

dimension meets the requirement of finish allowance, and only finish allowance is required

to be dealt with. If the value of FFC and SSF is not given, the feed FFS and the spindle

speed programmed before the call of cycle is active. The infeed depth is defined by the

value of MIDF.

Tens:

0= infeed in vertical G00

1=infeed in vertical G01

2=infeed in reciprocating G01

Insert vertically and machining (TYP=0X, TYP=1X)


Vertically deep infeed is always conducted at the same place on the machining plane (X:

RAD+WID/2, Y: 0) until it reaches the final depth of running grooves.

Insert in reciprocating movement and machining (TYP=3X)

It indicates that the central point of the tool leads a reciprocating movement as a line and

obliquely insert until it reaches the next depth. The largest inserting angle is defined by

STA2 and the displacement of the reciprocating length is calculated by LENG-WID.

Figure 3.40 Reciprocating infeed diagram

- If the deepest infeed depth is an even multiple of the feed depth of each reciprocation, the

starting point of the X-axis is located at the end point of the long axis of running grooves that

near to the central point of the circle.

- If the deepest infeed depth is an odd multiple of the feed depth of each reciprocation, the start

point of the X-axis is located at the end point of the long axis of running grooves that far from

the central point of the circle.

- The deepest infeed depth is not the infeed depth in the actual machining. The system will

calculate a rational infeed depth within the cycle according to such parameters as RFP, DEP,

MIDP and MIDF.

If another value is programmed by TPY, the cycle will stop and an alarm of "False

Definition of Machining Type" will output.


Preparatory function
3.12 Feed function

FALD (finishing allowance of the bottom of the running groove)

A finishing allowance is given to the bottom when rough machining.

STA2 (inserting angle)

STA2 defines the largest inserting angle, used for reciprocating machining.

Programming example:

Four running grooves are machined in this procedure. The running grooves are distributed

on one circle as Figure 3.41.

Dimensions of the running grooves: length 20 mm, width 10 mm and depth 20 mm. Safety

distance 1 mm and finishing allowance 0.5 mm. The milling direction is G2 and the

maximum feed in the depth direction is 6 mm.

The running grooves shall be completely machined through reciprocating insertion.

Figure 3.41 Programming diagram

N10 G17 G90 S600 M03

N20 T10 D1

N30 M06

N40 G00 Y20 X5 Z50

N50 SLOT1(5,0,1,-20,0,4,20,10,30,40,10,45,90,100,320,6,2,0.5,20,4,400,1200,0.5,5)

N60 M30
3.11.8 Circular groove milling SLOT2

Programming:

SLOT2(RTP,RFP,SFD,DEP,DPR,NUM,ASL,WID,CPA,CPO,RAD,STA,INA,FFD,FFS,MI

DP,MDIR,FAL,TYP,MIDF,FFC,SSF,FFCP)

Parameters:
RTP real Retraction plane (absolute coordinate)
RFP real Reference plane (absolute coordinate)
SFD real Safety distance (unsigned input value)
DEP real Running groove depth (absolute coordinate)
Running groove depth relative to reference plane (unsigned
DPR real
input value)
NUM int Number of running grooves
ASL real Circular groove angle (unsigned input value)
WID real Circular groove width (unsigned input value)
The X-coordinate of the center of the circle (absolute
CPA real
coordinate)
The Y-coordinate of the center of the circle (absolute
CPO real
coordinate)
RAD real Circular radius (unsigned input value)
STA real Start angle
INA real Incremental angle
FFD real Deep machining feedrate
FFS real Surface machining feedrate
MIDP real The deepest infeed depth (unsigned input value)
The milling direction of circular groove machining
MDIR int 2=clockwise milling (G2)
3=counterclockwise milling (G3)
Finishing allowance of the edge of the running groove
FAL real
(unsigned input value)
Machining type
Unit value: 0=comprehensive machining
1=rough machining
2=finishing
TYP int Tens value: 0=the transition between two grooves is infeed with
method G0
1=the transition between two grooves is infeed with
method G2/G3 along the track of the circle where there are the
running grooves
MIDF real The deepest infeed depth of finishing
FFC real Finishing feedrate
Preparatory function
3.12 Feed function

SSF real Spindle speed of finishing


Feed speed at the center position on the circle path. The unit is
FFCP real
millimeter/minute.
Function:

Cycle SLOT2 is used for machining circular grooves which are on one circle.

Figure 3.42 Circular groove

Parameter description:

See SLOT1 for parameters RTP, RFP, SFD, DEP, DPR, FFD, FFS, MIDP, MDIR, FAL, TYP,

MIDF, FFC and SSF.

Figure 3.43 Parameter diagram

NUM (number)

NUM defines the number of running grooves

ASL and WID (the angle and width of circular grooves)


The shape of a running groove on the plane can be defined by ASL and WID. Examine

within the cycle whether the using tool will damage the running groove width. If it will, an

alarm of "Tool Radius Too Large" will be output and the cycle will stop executing.

CPA, CPO and RAD (central point and radius)

Location of the circle is defined by the central point (CPA, CPO) and the radius (RAD).

Only positive value is permitted for a radius.

TYP (machining type)

(The tens value is 0) (The tens value is 1)

Figure 3.44 transitional infeed between two grooves (the machining type is of tens value)

STA and INA (start angle and incremental angle)

The arrangement of circular grooves on the circle can be defined by these two parameters.

STA explains the angle between the X-coordinate's positive direction in the workpiece

coordinate system before the cycle call and the first circular groove. INA includes the angle

between a circular groove and the next one.

If INA=0, the incremental angle is automatically calculated within the cycle according to

the number of circular grooves which are evenly distributed on the circle.

Programming example:

The 4 circular grooves to be machined are on one circle on Plane XY. The coordinate of the

central point is X30 Y40 and the radius is17 mm. The dimensions of these circular grooves

are as followings: width is 6 mm, angle of groove length 40 degree and depth 9 millimeter.

The start angle is 70 degree and the incremental angle 90 degree. A finishing allowance of

0.5 mm shall be taken into account on the contour of the running groove, the safety distance
Preparatory function
3.12 Feed function

in the direction of transverse feed axis Z is 2 mm and the maximum feed depth is 4 mm.

These running grooves shall be comprehensively machined. When finishing, the rotation

speed and feed speed shall be the same and tool shall enter the groove depth.

Figure 3.45 Programming diagram

N10 G17 G90 S600 M03

N20 T10 D1

N30 M06

N40 G00 X60 Y60 Z5

N50 SLOT2(5,0,2,-9,0,4,40,6,30,40,17,70,90,100,300,4,2,0.5,0,3,0,600,0)

N60 M30

3.11.9 Thread milling CYCLE90

Programming:

CYCLE90(RTP,RFP,SFD,DEP,DPR,DIATH,KDIAM,PIT,FFR,MDIR,TYP,CPA,CPO)

Parameters:
RTP real Retraction plane (absolute coordinate)
RFP real Reference plane (absolute coordinate)
SFD real Safety distance (unsigned input value)
DEP real Depth (absolute coordinate)
DPR real Depth relative to reference plane (unsigned input value)
DIATH real Outer diameter of threads
KDIAM real Inner diameter of threads
Thread pitch
PIT real
Value range 0.001…2000.000 mm
FFR real Feedrate of thread milling (unsigned input value)
Thread milling direction
MDIR int Value: 2 (for thread milling with G2)
3 (for thread milling with G3)
Thread type
TYP int Value: 0=internal thread
1=external thread
The X-coordinate of the center of the circle (absolute
CPA real
coordinate)
The Y-coordinate of the center of the circle (absolute
CPO real
coordinate)
Function:

Internal and external threads can be machined by CYCLE90. The track of thread milling is

based on a helical interpolation. The three axes on the plane set before the call of cycle shall

all participate in the action.

Figure 3.46 Thread milling

Parameter description:

See SLOT1 for parameters RTP, RFP, SFD, DEP and DPR.
Preparatory function
3.12 Feed function

Figure 3.47 Parameter diagram

DIATH, KDIAM and PIT (rated diameter, internal diameter and thread pitch)

The thread parameter can be defined with these parameters: rated diameter, root diameter

and thread pitch. DIATH is the outer diameter of threads and KDIAM the inner diameter of

threads. Inward and outward movements are formed within the cycle based on these

parameters.

FFR (feed)

The value of FFR defines the feedrate of thread milling, being active in helical interpolation.

The value decreases in inward and outward movements in the cycle.

MDIR (direction of rotation)

The value of the direction of thread machining can be defined with this parameter. If there is

an invalid value in the parameter, the information of "Wrong Milling Direction and G3

Generated" will display. In this case, the cycle is continued with G3 generated

automatically.

TYP (thread type)

External and internal threads can be machined with TYP.

CPO and CPA (central point)

The central point of thread machining can be defined with these parameters.

Programming example:

An internal thread at X30 Y50 on Plane G17 can be milled with this procedure.
Figure 3.48 Programming diagram

N10 T5 M06

N20 G90 G00 G17 X0 Y0 Z80 S200 M03

N30 CYCLE90(10,0,5,-20,0,45,40,2,500,2,0,30,50)

N40 G00 Z100

N50 M02

3.11.10 Centering drilling CYCLE81

Programming: CYCLE81 (RTP, RFP, SFD, DEP and RDP)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane (unsigned
RDP Real
input value)
Preparatory function
3.12 Feed function

Figure 3.49 CYCLE81

Parameter description:

 RFP and RTP (reference plane and retraction plane): Generally, the reference plane

(RFP) and the retraction plane (RTP) have different values. The retraction plane is usually

in front of the reference plane in the cycle. The distance between the retraction plane and

the final drilling depth is larger than that between the reference plane and the final drilling

depth.

 SFD (safety distance): Safety distance (SFD) is based on and ahead of the reference

plane with a safety distance. The active direction of the safety distance is automatically

determined by the cycle.

 DEP and RDP (final drilling depth): Final drilling depth can be defined as the

absolute or relative depth relative to reference plane. If is defined as the relative depth, the

absolute depth will be automatically calculated by the cycle with positions of the reference

plane and retraction plane.

Function: The tool drills at the programmed spindle speed and feedrate to the entered final

drilling depth.

Operating sequence:

 Approach of the safety distance from the reference plane with G0.

 Move to the final drilling depth at the feedrate (G1) programmed before the cycle
call.

 Return to the retraction plane with G0.

Programming example:

CYCLE81 is used for drilling.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Move to the drilling position
N30 G94 F80 Given feed
N40 CYCLE81 (5, 0, 3, -10, 10) Cycle call
N50 G00 Z50 Retract to the safety position
N60 M02 End of program

3.11.11 Counterboring drilling CYCL82

Programming: CYCLE82 (RTP, RFP, SFD, SFD, DEP and DTB)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane (unsigned
RDP Real
input value)
Dwell time at final drilling depth (chip breakage). The unit
DTB Int
is second.
Preparatory function
3.12 Feed function

Figure 3.50 CYCLE82

Parameter description:

 See CYCLE81 for RTP, RFP, SFD, DEP and RDP.

 DTB (dwell time): The dwell time at the final drilling depth is programmed in DTB.

The unit is second.

 Function: The tool drills at the programmed spindle speed and feedrate to the

entered final drilling depth. Stop the schedule time and return to the retraction plane

rapidly, when the tool reaches the final drilling depth.

Operating sequence:

 Approach of the safety distance from the reference plane with G0.

 Move to the final drilling depth at the feedrate (G1) programmed before the cycle

call.

 Execute the dwell time at final drilling depth.

 Return to the retraction plane with G0.

Programming example:

CYCLE82 is used for counterboring drilling.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Move to the drilling position
N30 G94 F80 Given feed
N40 CYCLE82 (10, 0, 3, -10, 10, 1) Cycle call
N50 G00 Z50 Return to the safety position
N60 M02 End of program

3.11.12 Deep hole drilling CYCLE83

Programming: CYCLE83 (RTP, RFP, SFD, DEP, RDP, FDEP, FRDP, DAM, DTB, DTS,

FRF and TYP)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane (unsigned input
RDP Real
value)
FDEP Real Initial drilling depth (absolute coordinate)
Initial drilling depth relative to reference plane (unsigned input
FRDP Real
value)
DAM Real Degression: (unsigned input value)
DTB Int Dwell time at thread depth (chip breakage )
DTS Real Dwell time at the initial point and for chip removal
The feed factor at initial drilling depth (unsigned input value).
FRF Real
Value range: 0.001~1
TYP Int Machining type: chip breakage=0, chip removal=1

Function: The tool drills at the programmed spindle speed and feedrate to the defined final

drilling depth. Deep hole drilling is achieved through executing the maximum defined depth

for multiple times and increasing it to the final drilling depth. Optionally, the twist drill can

be retracted after each infeed depth either to the "reference plane+safety distance" for chip

removal or by the length of 1 mm for chip breakage.

Operating sequence:

Chip removal (TYP=1):

 Approach of the safety distance from the reference plane with G0.

 Move to the initial drilling depth with G1 at the speed which is the product of the
Preparatory function
3.12 Feed function

feedrate programmed before the cycle call and the feedrate factor FRF.

 Dwell time at the initial drilling depth (Parameter DTB).

 Return to the safety distance from the reference plane with G0 for chip removal.

 Dwell time at the initial point (Parameter DTS).

 Return to the last drilling depth with G0 and maintain the reserved distance.

 Drill to the next drilling depth with G1 (maintain the execution sequence to the final

drilling depth).

 Return to the retraction plane with G0.

Figure 3.51 CYCLE83 (TYP=1)

Chip breakage (TYP=0):

 Approach of the safety distance from the reference plane with G0.

 Move to the initial drilling depth with G1 at the speed which is the product of the

feedrate programmed before the cycle call and the feedrate factor FRF.

 Dwell time at the initial drilling depth (Parameter DTB).

 Retract by the length of 1 mm from the current drilling depth at the feedrate

programmed before the cycle call with G1 for chip breakage.

 Drill to the next drilling depth with G1 (maintain the execution sequence to the final
drilling depth).

 Return to the retraction plane with G0.

Figure 3.52 CYCLE83 (TYP=0)

Parameter description:

 See CYCLE81 for RTP, RFP, SFD, DEP and RDP. .

 Parameters DEP (or RDP), FDEP (or FRDP) and DAM:

Center drilling depth, based on the final and initial drilling depth and the degression,

is calculated in the cycle with the following methods:

 First, drill for the first time, and it shall be not greater than the total

drilling depth.

 From the second drilling, the stroke is obtained by subtracting the

degression from last drilling depth.

 When the remainder is larger than twice of the degression, the next drilling

value is equal to the degression.

 The last two drilling values will be divided equally, and therefore the

average is always larger than half of the degression.

 DTB (dwell time at the hole bottom): The dwell time at the final drilling depth is

programmed in DTB. The unit is second.


Preparatory function
3.12 Feed function

 DTS (intermediate dwell time): Dwell time at the initial point. Only execute when

TYP=1 (chip removal).

 FRF (feed factor): A curtail factor working acting on feedrate. Only applicable for

the first drilling depth in the cycle.

 TYP (machining type): If Parameter TYP=0, the twist drill is retracted after each

drilling depth by the length of 1 mm for chip breakage. If TYP=1, the twist drill is

retracted to the safety distance from the reference plane.

Programming example:

CYCLE83 is used for deep hole drilling.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Move to the drilling position
N30 G94 F80 Given feed
N40 CYCLE83 (10, 0, 3, -20, 20, -5, 5, 5, 1, 1, 1,
Cycle call
0)
N50 G00 Z50 Return to the safety position
N60 M02 End of program

3.11.13 Rigid tapping CYCLE84

Programming: CYCLE84 (RTP, RFP, SFD, DEP, RDP, DTB, SDAC, MPIT, PIT, POSS,

SST, SSR)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane (unsigned input
RDP Real
value)
DTB Int Dwell time at thread depth (chip breakage )
Direction of rotation at the end of the cycle.
SDAC Int Value range: 3, 4 or 5 (respectively corresponding to M3, M4
or M5)
The thread pitch is determined by thread sizes (signed input
value).
MPIT Real
Value range: 3-48 (corresponding to M3-M48); signs
determine the direction of rotation of threads.
The thread pitch is determined by values (signed input value).
PIT Real Value range: 0.001-2000.000mm; signs determine the direction
of rotation of threads.
POSS Real The positioning angle of the spindle while tapping (in degrees)
Spindle tapping speed: the spindle speed at the feeding of
SST Real
tapping cycle
Tapping retraction speed: the spindle speed at the retraction of
SSR Real
tapping cycle

Figure 3.53 CYCLE84

Function: The tool taps at the programmed spindle speed and feedrate to the final

drilling depth.

Caution

CYCLE84 can be only applied to the position-controlled spindle.

Operating sequence:
 Approaching in the safety distance from the reference plane withG0.
 Stopping the positioned spindle (the value is within the parameter POSS).

 Tapping to the final drilling depth at the spindle speed of SST.

 Dwell time at thread depth (Parameter DTB).


Preparatory function
3.12 Feed function

 Retraction to the safety distance from the reference plane at the same spindle speed of
SST.
 Retraction to the retraction plane with G0; the model of spindle is changed through

reprogramming the effective spindle speed before cycle call and programming the direction of

rotation at SDAC.

Parameter description:

 For RTP, RFP, SFD, DEP and RDP, see CYCLE81.

 DTB (dwell time): dwell time is programmed in seconds. You are advised to ignore

the dwell time while drilling threaded holes.

 SDAC (direction of rotation at the end of cycle): direction of rotation at the end of cycle is

programmed at SDAC.

 MPIT and PIT (as the value of the thread pitch): The value can be defined as a

thread size (nominal threads only between M3-M48) or a value of thread pitch (the value

of the distance between threads).Needless parameters should be omitted or set to 0 during

call. If the two thread pitch parameters conflict, the cycle will generate an alarm and stop.

Right-hand or left-hand threads are defined by the signs of the thread pitch parameter:

 A positive value indicates right-hand threads (for M3)

 A negative value indicates left-hand threads (for M4)

 POSS (start angle): stopping the spindle at the place that is defined by POSS and

switching into the position-controlled mode before tapping.

 SST (tapping speed): SST parameters include the spindle speed at the feeding of

tapping cycle.

 SST (tapping retraction speed): SST parameters include the spindle speed at the

retraction of tapping cycle.

Caution

In the cycle, the direction of rotation automatically reverses while tapping.

Programming Example:

CYCLE84 is used for rigid tapping of M6 threads.

N10 G90 G17 G54 S400 M03 Parameter definition


Moving to the
N20 G00 X20 Y20
machining position
N30 CYCLE84(10, 0, 3, -20, 20, 1, 3, 6, 0, 0, 200, 300) Cycle call
Returning to the safety
N40 G00 Z50
position
N50 M02 End of program

3.11.14 Reaming 1 (boring 1) CYCLE85

Programming: CYCLE85 (RTP, RFP, SFD, DEP, RDP, DTB, FFW, FBW)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane (unsigned
RDP Real
input value)
DTB Int Dwell time at final drilling depth (chip breakage )
FFW Real Feedrate
FBW Real Retraction feedrate
Preparatory function
3.12 Feed function

Figure 3.54 CYCLE85

Function: The tool drills at the programmed spindle speed and feedrate to the defined final

drilling depth. The forward and backward feedrates are respectively the values of FFW and

FBW.

Operating sequence:

1. Approaching in the safety distance from the reference plane withG0.

2. Moving to the final drilling depth at the feedrate programmed by FFW with G1.

3. Dwell time at final drilling depth.

4. Retraction to the safety distance from the reference plane at the feedrate programmed by

FBW with G1.

5. Returning to the retraction plane with G0.

Parameter description:

 For RTP, RFP, SFD, DEP and RDP, see CYCLE81.

 DTB (dwell time):The dwell time at the final drilling depth is programmed in seconds.

 FFW (feedrate): drilling feedrate.

 FBW (retraction feedrate): the feedrate when retracting.

Programming Example:

CYCLE85 is used for reaming.

N10 G90 G17 G54 G94 S400 M03 Parameter definition


N20 G00 X20 Y20 Moving to the reaming position
N30 CYCLE85(10,0,3,-20,20,1,200,300) Cycle call
N40 G00 Z50 Returning to the safety position
N50 M02 End of program

3.11.15 Boring (boring 2) CYCLE86

Programming: CYCLE86 (RTP, RFP, SFD, DEP, RDP, DTB, SDIR, RPFA, RPSA, RPTA,

POSS)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane (unsigned
RDP Real
input value)
DTB Int Dwell time at final drilling depth (chip breakage )
SDIR Int Value of rotation direction: 3 (for M3); 4 (for M4)
Return path on the first axis (X-axis) in the plane
RPFA Real
(increment, signed input value)
Return path on the second axis (Y-axis) in the plane
RPSA Real
(increment, signed input value)
Return path on the boring axis (Z-axis) in the plane
RPTA Real
(increment, signed input value)
The stopping point of the positioned spindle in the cycle (in
POSS Real
degrees)

Figure 3.55 CYCLE86

Function: This cycle can be applied to boring with boring tools. The tool drills at the

programmed spindle speed and feedrate to the final drilling depth. Once reaching the

drilling depth with boring 2, the function to stop the positioned spindle is activated. At last,

the spindle returns to the retraction plane rapidly from the programmed returning location.

Operating sequence:

1. Approaching in the safety distance from the reference plane with G0.
Preparatory function
3.12 Feed function

2. Moving to the final drilling depth at the feedrate programmed before cycle call with G1.

3. Dwell time at final drilling depth.

4. Stopping the positioned spindle at the position programmed in POSS.

5. Returning from the directions of three axes with G0.

6. Returning to the safety distance from the reference plane from the boring axis with G0.

7. Returning to the retraction plane with G0.

Parameter description:

 For RTP, RFP, SFD, DEP and RDP, see CYCLE81.

 DTB (dwell time): The dwell time at the final drilling depth is programmed in seconds.

 SDIR (direction of rotation): This parameter is used to define the direction of rotation

when boring is carried out in the cycle. If the parameter value is not 3 or 4 (M03/M04), then

an alarm is triggered and the cycle is not executed.

 RPFA (return path on the first axis): This parameter is used to define the return path on

the first axis (X-coordinate); this return path is executed after reaching the final drilling

depth and performing the function to stop the positioned spindle.

 RPSA (return path on the second axis): This parameter is used to define the return path on

the second axis (Y-coordinate); this return path is adopted after reaching the final drilling

depth and performing the function to stop the positioned spindle.

 RPTA (return path on the boring axis): This parameter is used to define the return path on

the boring axis; this return path is adopted after reaching the final drilling depth and

performing the function to stop the positioned spindle.

 POSS (spindle position): POSS is used to program the stopping point of the positioned

spindle in degrees; this function is performed after reaching the final drilling depth.

Caution

CYCLE86 can only be used if the spindle is technically able to be position-controlled.

Programming Example:

CYCLE86 is used for boring.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Moving to the boring position
N30 G94 F200 Given feed value
N40 CYCLE86(10,0,3,-20,20,1,3,-1,0,1,0) Cycle call
N50 G00 Z50 Returning to the safety position
N60 M02 End of program

3.11.16 Stopping drilling 1 (boring 3) CYCLE87

Programming: CYCLE87 (RTP, RFP, SFD, DEP, RDP, SDIR)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane
RDP Real
(unsigned input value)
SDIR Int Value of rotation direction: 3 (for M3); 4 (for M4)

Figure 3.56 CYCLE87

Function: The tool drills at the programmed spindle speed and feedrate to the final drilling

depth. Once reaching the drilling depth with boring 3, spindle stop M5 and program stop

M0 are activated. The "cycle start" button is pressed to continue to return to the retraction
Preparatory function
3.12 Feed function

plane rapidly.

Operating sequence:

1. Approaching in the safety distance from the reference plane with G0.

2. Moving to the final drilling depth at the feedrate programmed before cycle call with G1.

3. M5 spindle stop; M0 program stop.

4. Pressing "cycle start" button.

5. Returning to the retraction plane with G0.

Parameter description:

 For RTP, RFP, SFD, DEP and RDP, see CYCLE81.

 SDIR (direction of rotation): This parameter is used to define the direction of rotation

when boring is carried out in the cycle. If the parameter value is not 3 or 4 (M03/M04), then

an alarm is triggered and the cycle is not executed.

Programming example:

CYCLE87 is used to stop drilling 1.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Move to the drilling position
N30 G94 F100 Given feed value
N40 CYCLE87(10,0,3,-20,20,3) Cycle call
N50 G00 Z50 Returning to the safety position
N60 M02 End of program

3.11.17 Stopping drilling 2 (boring 4) CYCLE88

Programming: CYCLE88 (RTP, RFP, SFD, DEP, RDP, DTB, SDIR)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane
RDP Real
(unsigned input value)
DTB Int Dwell time at final drilling depth (chip breakage )
SDIR Int Value of rotation direction: 3 (for M3); 4 (for M4)

Figure 3.57 CYCLE88

Function: The tool drills at the programmed spindle speed and feedrate to the defined final

drilling depth. During the boring process, the dwell time will be created at the final drilling

depth and then spindle stop M5 and program stop M0 are executed. The "cycle start" button

is pressed to continue to return to the retraction plane rapidly.

Operating sequence:

1. Approaching in the safety distance from the reference plane with G0.

2. Moving to the final drilling depth at the feedrate programmed before cycle call with

G1.

3. Dwell time at final drilling depth.

4. M5 spindle stop; M0 program stop.

5. Pressing "cycle start" button.

6. Returning to the retraction plane with G0.

Parameter description:

 For RTP, RFP, SFD, DEP and RDP, see CYCLE81.

 DTB (dwell time): The dwell time at the final drilling depth is programmed in
Preparatory function
3.12 Feed function

seconds.

 SDIR (direction of rotation): This parameter is used to define the direction of

rotation when boring is carried out in the cycle. If the parameter value is not 3 or 4

(M03/M04), then an alarm is triggered and the cycle is not executed.

Programming example:

CYCLE88 is used to stop drilling 2; dwell time: 1s.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Move to the drilling position
N30 G94 F100 Given feed value
N40 CYCLE88 (10,0,3,-20,20,1,3) Cycle call
N50 G00 Z50 Returning to the safety position
N60 M02 End of program

3.11.18 Reaming 2 (boring 5) CYCLE89

Programming: CYCLE89 (RTP, RFP, SFD, DEP, RDP, DTB)

Parameters:

RTP Real Retraction plane (absolute coordinate)


RFP Real Reference plane (absolute coordinate)
SFD Real Safety distance (unsigned input value)
DEP Real Final drilling depth (absolute coordinate)
Final drilling depth relative to reference plane
RDP Real
(unsigned input value)
DTB Int Dwell time at final drilling depth (chip breakage )
Figure 3.58 CYCLE89

Function: The tool drills at the programmed spindle speed and feedrate to the defined final

drilling depth. The dwell time is created at the final drilling depth.

Operating sequence:

1. Approaching in the safety distance from the reference plane with G0.

2. Moving to the final drilling depth at the feedrate programmed before cycle call with

G1.

3. Dwell time at final drilling depth.

4. Returning to the safety distance from the reference plane at the same feedrate with

G1.

5. Returning to the retraction plane with G0.

Parameter description:

 For RTP, RFP, SFD, DEP and RDP, see CYCLE81.

 DTB (dwell time): The dwell time at the final drilling depth is programmed in

seconds.

Programming example:

CYCLE89 is used for reaming; dwell time: 1s.

N10 G90 G17 G54 S400 M03 Parameter definition


N20 G00 X20 Y20 Moving to the machining position
Preparatory function
3.12 Feed function

N30 G94 F100 Given feed value


N40 CYCLE89 (10,0,3,-20,20,1) Cycle call
N50 G00 Z50 Returning to the safety position
N60 M02 End of program

3.12 Feed function

3.12.1 Feedrate definition

The feedrate F is the path velocity of the tool machining along the programmed workpiece

contour. The feedrate F is active in the interpolation methods such as G01, G02, G03, CIP,

CT, CIPD, POLY and spline; and it remains active until a new F value is programmed.

Command format:

F… ;F is the feedrate of the participating linear axes; the

following value unit is determined by G94/G95

Notes:

 The feedrate is set by address F.

 The value of the feedrate F is programmed in the NC program block, whose unit is

determined by G commands (G94/G95); the default setting of the system is G94, a

modally effective command.

 The feedrate F is composed of the speed components of all linear axes participating

in the interpolation movement; F remains active until a new feedrate value is programmed.

 The feedrate F is a resultant velocity, which is composed of the velocities of all the

programmed linear axes;


F  FX2  FY2  FZ2 .

Examples:

N10 G00 X0

N30 G94 G01 X50 Y50 F100 ;Feedrate: 100mm/min

N100 G01 X20 Y30 ;Feedrate F: the feedrate of linear axis; unit:

mm/min
Preparatory function
3.14 Auxiliary function

3.12.2 Linear feed (G94)

Function:

G94 linear feed is modal. Unit: mm/min.G94 is used to define the unit of feedrate; that is to

say, without the programmed unit of feedrate, the default unit is in mm/min.

Command format:

G94 ;Linear feed

Examples:

N10 G94 F100 ;Linear feed: 100mm/min

3.12.3 Revolutional feedrate (G95)

Function:

G95 revolutional feedrate is modal. Unit: mm/rev (metric system). G95 is used to define the

revolutional feedrate.

Command format:

G95 ;Revolutional feedrate

Examples:

N10 G95 F1.5 ;Revolutional feedrate: 1.5 mm/rev

3.13 Spindle Function

The spindle can rotate by setting the speed and rotational direction of the spindle, which is

precondition of machining.

3.13.1 Spindle rotation (S, M03/M04/M05)

Command format:

M03 ; Clockwise spindle rotation


Preparatory function
3.14 Auxiliary function

M04 ;Counterclockwise spindle rotation

M05 ;Spindle stop

S… ;Spindle speed; unit: rev/min

Notes:

M03/M04: M03/M04 is executed before the axis motion starts in the program block with

axis motion.  M05: M05 is executed after the axis motion ends in the program block

with axis motion.

Examples:

N10 G01 F500 X70 Y20 S270 M03 ;The speed of spindle increases to

270rev/min before moving to the x-axis and

y-axis.

N20 G00 Z150 M05 ;The spindle stops after retraction from

z-axis.

 Spindle speed; S is used to define the spindle speed.

3.13.2 Spindle positioning (SPOS, M19)

The spindle can be positioned at the specific angle with SPOS or M19, such as tool change

points.

Command format:

SPOS=... ;The spindle shall be positioned at a setting angle;

the NC program will not execute the next block

until the point is reached. Unit: Degree


M19 SP=... ;The spindle shall be positioned; the NC program
will not execute the next block until the point is
reached (unit: degree).
Notes:

 When programming SPOS or M19, the spindle is switched to be operated in the

position-controlled mode.

 SPOS: The NC program will not switch to the next block until the setting

position is reached when SPOS is used.


Preparatory function
3.14 Auxiliary function

 Spindle position: The spindle position is indicated in degrees.G90/G91 can be used, so is

the following command:

DC ( ) ;Shortest path approaching positioning point

 Disabled: The spindle can be temporarily switched to the position-controlled mode by

SPOS or M19 and to the rotation mode by M03/M04/M05.

 If programmed spindle positioning angles are not provided in M19, the positioning point

is determined by system inside parameters.


Preparatory function
3.14 Auxiliary function

Examples:

N10 M03 S500

N100 SPOS=0 ;The position-controlled mode is effective;

the spindle is positioned at 0 degree.

3.14 Auxiliary function (M)

Function:

The M functions initiate switching operations, such as "Coolant ON/OFF" and other

functions on the machine.

Command format:

M… ;Integer, value range: 0 to 2147483647

Predefined M functions: Several M functions that are vital to the operation of the program

have been predefined in the standard supply of control system. As shown in Table 3.1:

Table 3.1 M functions


Groupin Comma Meaning Type Remarks
g nds
Group 1 M00 N Individual
Program stop
program block
M01 N Individual
Optional program stop
program block
M02 Main program stop, resetting to the N Individual
start of the program program block
M17 N Individual
End of subprogram
program block
M30 Program stop, resetting to the start of N Individual
the program program block
Group 2 M03 Clockwise spindle rotation MI
M04 Counterclockwise spindle rotation MI
M05 Spindle stop MRF
M19 N Individual
Spindle positioning
program block
Group 3 M06 Tool change NI
M66 Virtual tool change NI
Preparatory function
3.14 Auxiliary function

Where, M refers to modal; R effective by default; N modeless; I executing before block; F

executing after block.

Notes:

 All free M function numbers can be assigned by the machine manufacturer, e.g. for

functions to control the clamping devices.

 A maximum of five M functions can be programmed in the same program block.

 M00: Automatic mode is stopped after executing the program block including M00.When

a program stop occurs, all the existing modal information remains unchanged. The "Cycle

start" button is pressed to restart the automatic mode.

 M01: Similar to M00, automatic mode is stopped after executing the program block

including M01.This function is not active until the M01 switch on the machine panel is set

to 1.

 M02/M30: the main program ends and automatic mode stops. Controlling to return to the

start of the program.

 M06 command can only be run with T and D commands.

 When motion command and M functions occur in the same program block, M command

is executed according to the following ways:

 When M command is executed before motion command, M03 and M04

are always executed before motion command.

 When M command is executed after motion command, M05 is always

executed after motion command.


Frame 4
4.1 Frame definition:

The frame is an idiomatic expression in the geometry representation methods, which is a

computing specification such as translation and rotation. According to the concept of frame,

a position of the target coordinate system can be explained and described by coordinates

and angles from the previous workpiece coordinate system.

Possible frames include:

 Basic frame

 Settable frame

 Programmable frame

1. Basic frame: the coordinate transformation from the basic coordinate system (BCS) to

basic zero system (BZS) is described.

2. Settable frame: the frame can be used to call and set the work offsets from any program

block through G54-G59 and G540-G599 commands. The values of work offsets are preset

by operating personnel and stored in the ZERO memory of the control system. These values

of work offset can be used to define the settable zero system.

3. Programmable frame: Sometimes, in a NC program, the originally selected workpiece

coordinate system (or settable zero system) need to be shifted to another position through

displacements, rotations, mirroring or scaling. This can be carried out through

programmable frame.

4.2 Establishing coordinate systems

The numerical control system generally includes the following 3 coordinate systems:
Frame

machine coordinate system (MCS), settable zero system (SZS) and workpiece coordinate

system (WCS), as shown in Figure 4.1.

 Machine coordinate system (MCS): It is dependent on the actual machine structure, not

necessarily on the standard Cartesian coordinate system.

 Settable zero system (SZS): This workpiece coordinate system is set through G54-G59 on

the basis of BZS. There are multiple settable work offsets within the system; an effective

work offset shall be stored for each block.

 Workpiece coordinate system (WCS): It is the current programmed coordinate system

changed from SZS through programmable frame commands. A WCS-SZS transformation

matrix shall be stored for each block within the system.

Figure 4.1 Transformation relations between individual coordinate system

Figure 4.2 Transformation relations between individual coordinate system


Frame
4.2 Establishing coordinate systems

Figure 4.2 represents the relations between individual coordinate system. As shown in the

figure, the workpiece coordinate system is derived from a series of changes of other

coordinate system. In particular, the workpiece coordinate system set through G54-G59 will

be absolutely stored in the form of settable zero system (SZS) in the numerical control

system. The SZS will never change if the values for G54-G59 are not changed. The

workpiece coordinate system (WCS) will be derived from the programmable frame on the

basis of SZS and stored in the other unit, not overwriting SZS.
框架 Frame

4.3 可设定的框架 Settable frame

4.3 Settable frame

Function:

The settable work offset provides the position of the workpiece zero in the machine

coordinate system. The offset is computed after the workpiece clamping on the machine and

input in the prescribed data filed through operation panel. The program can select

corresponding G functions (G54-G59 and G540-G599) to activate the value.

Command format:

G54 ;The 1st settable work offset

G55 ;The 2nd settable work offset

G56 The 3rd settable work offset

G57 ;The 4th settable work offset

G58 ;The 5th settable work offset

G59 ;The 6th settable work offset

G540~G599 ;The 7th to 66th settable work offsets

Notes:

 G54-G59: With call any one of G54-G59 in NC program, the zero point can be shifted

from the basic coordinate system to workpiece coordinate system, as shown in Figure 4.2.

In the subsequent programmed NC block, all the position dimension and tool movement are

based on the present effective workpiece zero.


Frame
4.2 Establishing coordinate systems

Figure 4.2 Settable work offset


 G540-G599: In addition to G54-G59, 60 work offsets can be programmed in the

ZERO memory through machine data.

 G54-G59, G540-G599, G500 and G53 are in the same group of G commands, and

the default setting is G53.

 After resetting, the system returns to the default setting G53.

Examples:

N10 M03 S1000

N20 G54 ;Call the first work offset

N30 (SUB) ;Subprogram call

N40 G55 ;Call the second work offset

N50 (SUB) ;Subprogram call

N60 G53 ;Deselecting of work offset

N70 M30

4.4 Programmable frame

Function:

The programmable frame command is used to perform operations such as displacements,

rotations, scaling and mirroring for the workpiece coordinate system defined through

G54-G59. As shown in Figure 4.4, the workpiece coordinate system can be shifted to the

required position through corresponding operation. By shifting the coordinate system to the
Frame
4.5 Frame deselection (G500, G53)

corresponding position, multiple workpieces can be clamped at one time and machined;

when machining, just call the machining program of the corresponding workpiece for the

convenience of programming. The programmable frame commands are used to carry out the

coordinate transformation based on the settable workpiece coordinate system

G54-G59..Programmable frame commands include:

 Programmable work offset command (TRANS/ATRANS)

 Programmable rotation command (ROT/AROT)

 Programmable scale command (SCALE/ASCALE)

 Programmable mirror command (MIRROR/AMIRROR)

Notes:

 Programmable frame commands should be programmed in the individual

blocks.

 After the program runs over, the running mode of the program remains on.

The program is to be performed or pressed "reset", to restore system default setting,

namely: deselecting of programmable

frame.

Figure 4.4 Programmable frame commands

4.4.1 Programmable work offset (TRANS/ATRANS)

Function:

TRANS/ATRANS can be used to set work offsets for coordinate axes, as shown in Figure

4.3. In this way one can work with changing zero points, e.g. during repetitive machining
120 Programming Manual of Milling Machine System
Frame
4.5 Frame deselection (G500, G53)

operations at different workpiece positions.

Command format:

TRANS X Y Z ;Absolute work offset

ATRANS X Y Z ;Additional work offset

Notes:

 TRANS: absolute work offset, with the current set coordinate systems G54-G59 and

G540-G599 as the basis. Among which, the value following the X-axis, Y-axis and Z-axis is

the value of coordinate origin of the new coordinate system in the G54-G59 and

G540-G599 coordinate system.

 ATRANS: additional mirroring based on the finally set or programmed coordinate

systems. Among which, the value following the X-axis, Y-axis and Z-axis is the value of

coordinate origin of the new coordinate system in the finally set or programmed coordinate

systems. As shown in figure 4.4.

Figure 4.3 Programmable work offset

121 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

Figure 4.4 Absolute work offset and additional work offset

122 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

Examples:

N10 G17 G54 ;Establishing G54 workpiece coordinate

system

N20 G00 X0 Y0 Z0 ;Moving the tool to the coordinate origin of

G54 coordinate system

N30 TRANS X20 Y20 ;Shifting the coordinate origin to the first

point

N40 (SUB) ;Call the machining program for machining

N50 ATRANS X80 ;Shifting the coordinate origin from the first

point to the second point

N60 (SUB) ;Call the machining program for machining

N70 TRANS X100 Y100 ;Shifting the coordinate origin from the G54

origin to the third point

N80 (SUB) ;Call the machining program for machining

N90 M30 ;Program stop

4.4.2 Programmable rotation (ROT/AROT)

Function:

ROT/AROT can be used to rotate the workpiece coordinate system around the X, Y and Z

geometry axes. This can be applied to inclined surface machining or multi-surface

123 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

machining for a workpiece at a clamping position. As shown in Figure 4.7:

Figure 4.5 Programmable rotation

Command format:

ROT X Y Z ; Directly defining the rotation angle to

rotate

AROT X Y Z ;Additional rotation, directly defining the

rotation angle

Notes:

 ROT: Regardless of the programmed forms of rotation, it is based on the current set

G54-G59 and G599-G540 coordinate systems.. The value of rotation angle is the angle

which the new coordinate system rotates around the respective axis of the G54-G59 and

G599-G540 coordinate systems; the value is in degrees and signs are determined by

right-hand rule.

 AROT: Additional rotation. This is based on the finally sett or programmed coordinate

systems. The value following rotation angle is the angle which the new coordinate system

rotates around the respective axis of the finally set or programmed coordinate system; the

value is in degrees and signs are determined by right-hand rule.

 ROT X Y Z: Absolute rotation, the rotation order is observed as: rotating around the fixed

X-axis on the machine first, then the fixed Y-axis and finally the fixed Z-axis.

 AROT X Y Z: Absolute rotation, the rotation order is observed as: rotating around the

fixed X-axis on the machine first, then the fixed Y-axis and finally the fixed Z-axis.

 Direction of rotation: The direction follows the right-hand rule. Presuming rotating

around Z-axis, namely pointing the thumb to the positive direction of Z-axis, the bending
124 Programming Manual of Milling Machine System
Frame
4.5 Frame deselection (G500, G53)

direction of four fingers is the positive direction of rotation, as shown in Figure 4.6.The

positive directions of rotation of X-axis and Y-axis are also determined in this way.

Figure 4.6 Direction of rotation

 Rotation order: A maximum of 3 geometry axes can be rotated at the same time in

program block. The rotation order is defined as X-axis, Y-axis and Z-axis, as shown in

Figure 4.7.If it is required to rotate according to another order, each axis must be provided

the angle required by AROT programming.

Figure 4.7 Direction of rotation

Examples:

125 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

N10 G17 G54 ;Establishing G54 coordinate systems and

assigning X and y plane.

N20 ROT Z30 ;Rotation of the coordinate system (30°)

N30 (SUB) ;Call the machining program for machining

N40 TRANS X80 Y80 ;Absolute offset

N50 AROT Z60 ;Additional rotation (60°)

N60 (SUB) ;Call the machining program for machining

N70 M30 ;End of program

4.4.3 Programmable scaling factor (SCALE/ASCALE)

Function:

SCALE/ASCALE is used to determine the scaling factors of the direction of axes for

programming coordinate axes. This helps consider the similar geometric shape or different

shrinkage when programming. As shown in Figure 4.8:

126 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

Figure 4.8 Programmable scaling factor

Command format:

SCALE XYZ ;Absolute scaling

ASCALE X Y Z ;Additional scaling

Notes:

 SCALE: absolute scaling, with the current set coordinate systems G54-G59 and G540-

G599 as the basis. Among which, the values following the X-axis, Y-axis and Z-axis are the

scaling factor values of the new coordinate system at the corresponding direction of

coordinate axes in the G54-G59 and G540-G599 coordinate systems.

 ASCALE: additional scaling, based on the finally set or programmed coordinate systems.

Among which, the values following the X-axis, Y-axis and Z-axis are the scaling factor

values of the new coordinate system at the corresponding direction of coordinate axes in the

finally set or programmed coordinate systems.

 If a work offset is programmed with the use of a ATRANS command after a scale

command SCALE, the offset value is also scaling.

 Each axis can be appointed different scaling factors; however, the scaling factor should

be the same when the circular arc command is included.

Examples:

N10 G17 G54 ;Establishing G54 coordinate systems and

assigning X and Y plane.

N20 TRANS X20 Y20 ;The shift of coordinate systems

N30 (SUB) ;Call the machining program for machining

127 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

N40 TRANS X120 Y20 ;The shift of coordinate systems

N50 ASCALE X1.5 Y1.5 ;The scaling factor for new coordinate

system along X-axis and Y-axis is 1.5.

N60 (SUB) ;Call the machining program for machining

N70 M30 ;End of program

4.4.4 Programmable mirroring (MIRROR/AMIRROR)

Function:

MIRROR/AMIRROR can be used to mirror workpiece shapes on coordinate axes, as shown

in Figure 4.14.

Figure 4.14 Programmable mirroring

Command format:

MIRROR X0 Y0 Z0 ; absolute mirroring

AMIRROR X0 Y0 Z0 ; additional mirroring

Notes:

 MIRROR: absolute mirroring, based on the current set coordinate systems G54 ~

G59 and G540 ~ G599.

 AMIRROR: additional mirroring, based on the finally set or programmed coordinate

systems.

 An axis parameter in MIRROR or AMIRROR indicates a mirroring axis around

128 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

which a mirror is generated. For example, MIRROR X0 generates a mirror around X-axis

(i.e. X = 0 plane is taken as a mirroring plane). There are two or more axis parameters

(such as: X0 Y0 Z0), to mirror according to the order of X direction, Y direction, and then

Z direction.

 The offset direction of programmed tool radius after the programmable mirroring

command will automatically reverse, for example, G41 is converted into G42, and G42 is

converted into G41. It is also applicable to circular interpolation command (G02/G03).

After continuing to program AMIRROR command, the offset direction of tool radius is

reversed again, G41/G42 will resume to be normal, as shown in Figure 4.15:

Figure 4.15 Reversion of G41/G42 and G02/G03

Examples:

N10 G17 G54

N20 (SUB) ; Call the machining program for machining

N30 MIRROR Y0 Establish a new coordinate system by

129 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

mirroring the G54 coordinate system with Y=0 plane as the mirroring

N40 (SUB) ; Call the machining program for machining

N50 AMIRROR X0 Establish anther coordinate system by

mirroring the new coordinate system with X=0 plane as the mirroring

N60 (SUB) ; Call the machining program for machining

N70 MIRROR X0 ; G54 is used to establish a new coordinate

system on X=0 plane mirroring.

N80 (SUB) ; Call the machining program for machining

N90 M30

4.5 Frame deselection (G500, G53)

Function:

After the different nature of frame has been defined, the frame can be gradually deselected,

as shown in Figure 4.16:

Figure 4.16 Frame deselected by level

Command format:

G500 ; Deselect programmable frame

G53 ; Deselect programmable frame and settable

frame

130 Programming Manual of Milling Machine System


Frame
4.5 Frame deselection (G500, G53)

Notes:

 ; G500 is used to deselect programmable frame

 ; G53 is used to deselect programmable frame and settable frame.

 G500, G53 and G54 commands are G code in the same group, and the setting is G53

by default.

131 Programming Manual of Milling Machine System


Tool function 5
5.1 Tool selection

Select tools by specifying the value closely next to the address T. A T command can be

specified in a program block. You should perform T command first and then perform

traverse command when there are T command and moving command.

Command format:

Txxx Select tool #xxx

M06 Tool change command

Note: If a tool has been activated, it will remain enabled, regardless of whether the program

is running or not, or system on/off.

5.2 Tool compensation no. D

Command format:

Dx ; The value range of tool offset No. Dx and x is from 0 to 9, in which

the tool offset is deselected for D0.

Notes:

 A defined tool can use different tool compensation program blocks, and can be

assigned up to 1 to 9 cutting edges accordingly. Therefore, the different cutting edges can

be defined in a tool, and then you can call in the program block as required.

 Command D can be called to activate the compensation of a cutting edge. If

command D0 is programmed, the compensation of tool is disabled. If command D is not

programmed, the command D1 is enabled.


Tool function
5.4 Tool compensation

5.3 Tool type

Tools are divided into several categories:

1. Milling cutters

2. Twist drills

3. Boring tool

5.4 Tool compensation

When the workpiece is programmed, it is not necessary to consider the tool length or the

cutting radius (as shown in Figure 5.1 and Figure 5.2), where the size of the workpiece can

be directly programmed according to drawing. The tool parameters are input to tool offset

table separately, and you only need to call the needed tool number and its compensation

parameters. The control system will use these parameters to perform the required path

compensation, thus to machine the required workpiece.

Figure 5.1 Different radius tools machining workpieces

133 Programming Manual of Milling Machine System


Tool function
5.4 Tool compensation

Figure 5.2 Return to workpiece position Z0 ― different length compensations

The tool offset table includes the following:

 Tool dimension: tool geometry and tool wear allowances. The control system is used

to process these components, to calculate the final sizes (such as, the total length and total

radius). If the offset memory is activated, these final sizes are enabled.

 Tool type: What geometric parameters are needed and how to calculate can be

determined by the tool type.

 Before the tool length or radius compensation is activated, the working plane is

required to select by G17, G18 or G19.

5.4.1 Tool radius compensation

Steps of tool radius compensation

134 Programming Manual of Milling Machine System


Tool function
5.4 Tool compensation

Figure 5.3 Tool radius compensation

As shown in Figure 5.3, tool radius compensation is divided into three steps:

1. Establishing tool compensation (start)

Tool from the starting point to close to the workpiece, the tool center to the left (G41) or to

the right (G42) need to offset a certain distance based on the programming path.

2. In tool compensation (in offsetting)

Compared with the programming path, tool center path offsets a certain distance.

3. Tool compensation deselection

The tool retraction helps the coincidence between tool center path end and programming

track end.

Command format

The radius compensation of tool tips is activated by G41/G42. Tool must have the

corresponding compensation D number to be enabled. The NC system automatically

calculates the tool path which is generated by the current tool movement and stays in the

same distance from the programming contour as the previous path.

135 Programming Manual of Milling Machine System


Tool function
5.4 Tool compensation

Figure 5.4 Map of tool tips radius compensation

G41 X… Z… ; The left tool compensation of workpiece

contour is enabled.

G42 X… Z… ; The right tool compensation of workpiece

contour is enabled.

G41/G42 can be selected only in linear interpolation (G00, G01).

Examples:

Figure 5.5 Start patch

N10 G00 X100

N20 G01 G41 Y100 F200

136 Programming Manual of Milling Machine System


Tool function
5.4 Tool compensation

N30 Y200

Activate radius compensation in program block N20 .

Deselect tool tips radius compensation G40.

Use G40 to deselect tool tips radius compensation only in the linear interpolation (G00, G01)

in which the deselection compensation is performed.

Examples:

Figure 5.6 Deselecting path

N10 G00 X100

N20 G01 G41 Y100 F200

N30 Y200

Deselect radius compensation in program block N20 .


Interference check of tool radius compensation
Over cutting of tool is called interference (see Figure 5.7). The offset tool center path

appears intersection in the non-adjacent block, namely, interrupting. If tool is fully in

accordance with the operation of offset path, it will cause over-cutting.

137 Programming Manual of Milling Machine System


Tool function
5.4 Tool compensation

Figure 5.7 Interference

The system has a certain fault tolerance rate. For partial interference, the system will

automatically deselect and generate a new path to continue machining. When the

interference cannot be deselected, the system will report an error and stop machining.

NOTICE

1. When tool compensation is activated, the following commands cannot be

programmed:

1) Plane selection command G17/G18/G19

2) Thread interpolate command (G33)

3) Coordinate transformation command (G53~G59 and G500/G501)

2. Left and right tool compensation cannot be transformed in the process of tool

compensation. For example, G41 mode is not allowed to switch directly to G42, in which

there must be a G40 command.

5.4.2 Tool length compensation

After the tool is called, the tool length compensation is active immediately.

138 Programming Manual of Milling Machine System


Control characteristics
6.5 Feed forward control (FFWON,FFWOF)

Control characteristics 6
6.1 Exact Stop (G60, G09, G601 and G602)

Command format:

G60 ; Exact stop, modal

G09 ; Exact stop, non-modal

G601 ; After reaching the precise exact-stop positioning

window, the program block is conversed

G602 ; After reaching the coarse exact-stop positioning

window, the program block is conversed

Function description:

 Use exact stop to stop the corner of the program block needed to be stopped.

 The exact stop is created by G09 in the current program block. The exact stop is

created by G60 in the current program block and all further program blocks.

 Except the basic function provided by G09 or G60, you can specify the following

two ways in exact stop function:

 G601: specifying to run to the precise exact-stop window, after a short pause at

the corner, then converted to the next program block.

 G602: specifying to run to the coarse exact-stop window, after a short pause at

the corner, then converted to the next program block, as shown in Figure 6.1:

139 Programming Manual of Milling Machine System


Control characteristics
6.5 Feed forward control (FFWON,FFWOF)

Figure 6.1 Precise exact stop/coarse exact stop

 If G60 or G09 is activated, and the exact stop modes of G601 and G602 are not

specified, to stop in accordance with G601, namely, G601 as the default stop mode.

 G601 and G602 take effect only when G60 or G09 is enabled.

 G601 and G602 are modal. Refer to the following examples:

N10 G60 G602 ; G602 mode is enabled

N100 G64 ; Continuous-path controls enabled

N200 G60 G602 mode stays enabled.


N300 G64 ; Continuous-path controls enabled…
N400 G09 G602 mode stays enabled.

 G60, G09 and G64 are enabled for G00, G01, G02 and G03.

 After the program execution ends, the running mode of the program stays unchanged.

Run the commands at the start of program execution or press "reset" to set the system

default G64.

140 Programming Manual of Milling Machine System


Control characteristics
6.5 Feed forward control (FFWON,FFWOF)

6.2 Continuous-path control (G64)

Function description:
When the function of continuous-path control is enabled, it is not necessary to reduce the
path speed for the exact stop when the current program block is finished and converted to
the next program block. Instead, the speed control of the program block is conducted
(predicting function automatically opens), in the case of difference allowed, as much as
possible to make the program block speed continuously.
The following can be achieved through continuous-path control:

 Radius of contour

 The required braking and acceleration processes for reaching the exact stop standard

are omitted, to shorten the processing time.

 and get gentle change speed and good cutting quality.

Command format:

G64 … ; Continuous-path operation, modal

Command description:

 G09, G60 and G64 commands are belonged to the same group, and they can deselect

each other. G64 is the default setting.

6.3 Acceleration control (BRISK, SOFT)

Command format:

BRISK ; Linear acceleration and deceleration

SOFT ; Type S acceleration

Function description:

 BRISK: The axis speeds up to the maximum feedrate at the maximum acceleration.

BRISK can minimize the machining time but may cause sudden change in acceleration.

 SOFT: The axis speeds up to the maximum feedrate at a stable acceleration. SOFT

will cause no sudden change in acceleration and can ensure high precision path and low

machine load. See Figure 6.6 for details.

141 Programming Manual of Milling Machine System


Control characteristics
6.5 Feed forward control (FFWON,FFWOF)

 After the program execution ends, the running mode of the program stays unchanged.

Run the commands at the start of program execution or press "reset" to set the system

default.

Figure 6.6 Functional comparison between BRISK and SOFT

142 Programming Manual of Milling Machine System


Appendix
B Command list

Appendix

A Typical workpiece examples

Example drawing:

Machining process:

 Milling the upper surface with Φ16 flat-bottom cutter

 Milling the Φ100 outer circle with Φ16 flat-bottom cutter

 Coarse milling the hexagon boss with Φ16 flat-bottom cutter

 Precise milling the hexagon boss with Φ16 flat-bottom cutter

 Coarse and precise milling R5 circular groove with Φ8 flat-bottom cutter

 Drilling 4XΦ8 holes with Φ8 drill bit

Machining program:

N10 T1 M06 Φ16 flat-bottom cutter

N20 M03 S1600

143 Programming Manual of Milling Machine System


Appendix
B Command list

N30 G90 G17

N40 G54

N50 G00 Z50

N60 X60 Y-50

N70 CYCLE71 (20, 0.5, 3, 0, -50, -50, 100, 100, 0, 0.5, 10, 0, 1200, 11)

N80 G00 Z50

N90 M05

N100 M03 S1800

N110 G00 X65 Y0

N120 CYCLE77 (10, 0, 5, -24, 100, 0, 0, 3, 0, 0, 1000, 600, 2, 1, 105)

N130 G00 Z50

N140 M05

N150 M03 S1600

N160 G00 X-90 Y18

N170 CYCLE72 ("hexagon", 10, 0, 5, -4, 1, 0.25, 0.1, 1000, 600, 1, 41)

N180 G00 Z50

N190 M05

N200 M03 S1600

N210 G00 X-90 Y18

N220 CYCLE72 ("hexagon", 10, 0, 5, -4, 1, 0, 0, 800, 800, 2, 41)

N230 G00 Z100

N240 M05

N250 T2 M06 Φ8 flat-bottom cutter

N260 M03 S3500

N270 G00 Z50

N280 X0 Y0

144 Programming Manual of Milling Machine System


Appendix
B Command list

N290 SLOT2 (10,0,5,-5,5,4,30,10,0,0,22.5,30,90,1000,400,0.5,3,0.2,10,1,800,3500,3000)

N300 G00 Z100

N310 M05

N320 T3 M06 ; Φ8 drill bit

N330 M03 S1800

N340 G00 X20 Y20 Z50 F270

N350 MCALL CYCLE83 (10, 0, 3, -12, 12, -4, 4, 4, 1, 1, 1, 1)

N360 X11 Y0

N370 X0 Y11

N380 X-11 Y0

N390 X0 Y-11

N400 MCALL

N410 G00 Z50

N420 M05

N430 M30

Subprogram hexagon.iso:

N10 G01 X-78.696 Y10.129

N20 X-30 Y17.321

N30 X-20 Y34.641

N40 X20

N50 X40 Y0.

N60 X20 Y-34.641

N70 X-20

N80 X-40 Y0.

N90 X-30 Y17.321

N100 X-28.5 Y19.919

N110 X-46.362 Y64.725

N120 RET

145 Programming Manual of Milling Machine System


Appendix
B Command list

146 Programming Manual of Milling Machine System


Appendix
B Command list

B Command list

Address Definition Programming


T Tool No. T…
Tool offset no.
The compensation parameters are
used for a certain tool T. D0
D D…
means not to use the tool
compensation, and a tool has not
more than 9 D numbers.
Feedrate
Tool/workpiece federate is
F corresponding to G94 or G95, and F…
units are mm/min or mm/rev
respectively.
Positioning speed of spindle and
positioning axes
FA= FA is always in G94 type, and FA=…
units are degrees/minutes or
mm/min.
S Spindle speed; unit is rev/min. S…
G00 Quick positioning G00 X… Y… Z…
G01 Linear interpolation G01 X… Y… Z… F…
Circle center and end:
G02 X… Y… Z… I… J… K… F…
Radius and circle end:
G02 X… Y… Z… CR=…F…
G02 Clockwise circular interpolation
Central angle and circle center:
G02 AR=… I… J… K… F…
Central angle and circle end:
G02 AR=… X… Y… Z… F…
Counterclockwise circular
G03 G03…;Other is the same as G02
interpolation
CIP X… Y… Z… IM=… JM=…
Circular interpolation in the KM=… F…
CIP
intermediate point IM, JM and KM are intermediate
points.
N10 …
Tangent transition circular
CT N20 CT X… Y… Z… F…
interpolation
Circular arc forming a tangent

147 Programming Manual of Milling Machine System


Appendix
B Command list

Address Definition Programming


transition with the preceding
contour segment

CIPD X… Y… Z… IM=… JM=…


KM=… F…
CIPD 3D circular interpolation
3D circular interpolation by the end
and intermediate point

Cubic polynomial interpolation.


POLY X=PM(Xe, a1, a2, a3)
Y=PM(Ye, b1, b2, b3) Z=PM(Ze,
c1, c2, c3) PT=n
POLY X=PM(Xe, a1, a2, a3)
Y=PM(Ye, b1, b2, b3) Z=PM(Ze,
c1, c2, c3) PT=n
POLY Polynomial interpolation
Quintic polynomial interpolation.
POLY X=PM(Xe, a1, a2, a3, a4,
a5) Y=PM(Ye, b1, b2, b3, b4, b5)
Z=PM(Ze, c1, c2, c3, c4, c5) PT=n
POLY X=PM(Xe, a1, a2, a3, a4,
a5) Y=PM(Ye, b1, b2, b3, b4, b5)
Z=PM(Ze, c1, c2, c3, c4, c5) PT=n
N10 AKIMA SPBN/SPBC/SPBT
SPEN/SPEC/SPET X… Y… Z…
AKIMA AKIMA spline interpolation
N20 X… Y… Z…

N10 NURBS X… Y… Z… SD=…
PW=…
N20 X… Y… Z… PW=…
NURBS NURBS spline interpolation …
B spline does not need to specify
the transition mode in start and end
position.
N10 CUBIC SPBN/SPBC/SPBT
SPEN/SPEC/SPET X… Y… Z…
CUBIC CUBIC spline interpolation
N20 X… Y… Z…

148 Programming Manual of Milling Machine System


Appendix
B Command list

Address Definition Programming


K _ 
Q _ 
 
 
G22 Clockwise helical interpolation L_
 P _ 
G17 G22 X_ Y_ I_ J_ Z_ 
F_
K _ 
Q _ 
 
Counterclockwise helical  
G23
interpolation L_
 P _ 
G17 G23 X_ Y_ I_ J_ Z_ 
F_
G04 Pause for a given time interval G04 H…, individual program block
G17 XY Plane
G18 ZX Plane
G19 YZ Plane
G40 Deselect tool radius compensation
Call tool radius compensation and
G41 tools traverse at the left side of the
contour
Call tool radius compensation and
G42 tools traverse at the right side of
the contour
G54 First settable work offset
G55 Second settable work offset
G56 Third settable work offset
G57 Fourth settable work offset
G58 Fifth settable work offset
G59 Sixth settable work offset
Seventh to 66th settable work
G540~G599
offsets
G500 Deselecting programmable frames
Deselecting settable and
G53
programmable frames
TRANS X… Y… Z…
The values of X, Y and Z are work
TRANS Programmable translation
offset values, individual program
block.
SCALE X… Y… Z…
The values of X, Y and Z are
SCALE Programmable scaling
scaling factors, individual program
block..
ROT Programmable rotation ROT X… Y… Z…

149 Programming Manual of Milling Machine System


Appendix
B Command list

Address Definition Programming


Directly define roll angle to rotate,
individual program block.
MIRROR X0 Y0 Z0
N10 G17
MIRROR Programmable mirroring N20 MIRROR X0
Set up mirroring on Y axis in G17
Plane.
Additional programmable
ATRANS ATRANS X… Y… Z…
translation
ASCALE Additional programmable scaling ASCALE X… Y… Z…
AROT Additional programmable rotation AROT X… Y… Z…
Additional programmable
AMIRROR AMIRROR X0 Y0 Z0
mirroring
Inch dimension (length), F is not
G70
affected.
Metric dimension (length), F is
G71
not affected.
G90 Absolute dimensioning
G91 Incremental dimensioning
G25 Lower limit of the working area
G26 Upper limit of the working area
WALIMON Enable working area limitation
WALIMOF Disable working area limitation
G74 X10 Y10; Returning to the
G74 Return to the reference point reference point through the
intermediate point (X10, Y10)
G75 X10 Y10; Returning to the
G75 Return to the fixed-point fixed-point through the
intermediate point (X10, Y10)
AP= Polar angle in polar coordinates
RP= Polar radius in polar coordinates
Define poles according to the last
programming point. Polar
G110
coordinates after G110 are
programmed based on the pole.
Define poles according to the zero
G111 in the current workpiece
coordinate system.
Define poles according to the last
G112
effective pole.
N10 G94 F100
G94 Linear feedrate in (mm/min)
Feedrate: 100 mm/min
G95 Rev. feedrate in (mm/rev) N10 G95 F1.5

150 Programming Manual of Milling Machine System


Appendix
B Command list

Address Definition Programming


Feedrate: 1.5 mm/r
M00 Program unconditional pause
M01 Program conditional pause
End of main program and stop of
M02
spindle.
M03 Clockwise spindle rotation
M04 Counterclockwise spindle rotation
M05 Spindle stop
M06 Tool change
M66 Virtual tool change
M17 End of subprogram
M19 Spindle positioning M19 SP, individual program block
Program stop, resetting to the start
M30
of the program
N10 SPOS=…
The spindle is positioned (unit: N10 SPOS=ACP(11.1)
SPOS
degree). N10 SPOS=ACN(11.1)
Individual program block
X Geometry axis X
Y Geometry axis Y
Z Geometry axis Z
Interpolation parameters as X-axis
I coordinate of circle center in Refer to G02 and G03.
circular interpolation
Interpolation parameters as Y-axis
J coordinate of circle center in Refer to G02 and G03.
circular interpolation
Interpolation parameters as Z-axis
K coordinate of circle center in Refer to G02 and G03.
circular interpolation
Interpolation parameters as X-axis
IM= coordinate of intermediate point Refer to CIP and CIPD.
in circular interpolation
Interpolation parameters as Y-axis
JM= coordinate of intermediate point Refer to CIP and CIPD.
in circular interpolation
Interpolation parameters as Z-axis
KM= coordinate of intermediate point Refer to CIP and CIPD.
in circular interpolation
AR= Circular interpolation angle Refer to G02 and G03.
CR= Circular interpolation radius Refer to G02 and G03.
Chamfer for general use N10 X… Y... Z… CHF=…
CHF=
Insert chamfer with given length N11 X… Y... Z…

151 Programming Manual of Milling Machine System


Appendix
B Command list

Address Definition Programming


between the two contours.
Chamfer, in defining contour.
N10 X… Y... Z… CHR=…
CHR= Insert chamfer with given side
N11 X… Y... Z…
length between the two contours.
N10 X… Y... Z… RND=…
RND= Round corner
N11 X… Y... Z…
Parameter range in polynomial It must be in the same program
PT=
interpolation block as POLY.
It must be in the same program
SD= Degree of NURBS spline
block as NURBS.
Refer to NURBS, and it must be in
PW= NURBS spindle weighting the same program block as control
point.
It must be in the same program
H Pause interval
block as G04.
The spindle of M19 positions It must be in the same program
SP=
angles. block as M19.
N10 G91 X10 Z=AC(20)
Absolute coordinates can be used
AC X is the incremental coordinate and
for rotation axis and linear axis.
Z is the absolute coordinate.
Incremental coordinates can be N10 G90 X10 Z=IC(20)
IC used for rotation axis and linear X is the absolute coordinate and Z
axis. is the incremental coordinate.
Absolute coordinates approach
DC position in the shortest path, to Refer to SPOS.
use for rotation axis.
N10 MCALL SUBPROGRAM();
modal call of subprogram.
MCALL Modal call of subprogram
......
N50 MCALL; Cancel modal call.
N10 MSG(“MESSAGE TEXT”);
MSG() Information An user-defined information is
displayed.
Exact stop is performed in
accordance with G601 default
G60 Exact stop, modal. setting.
N10 G60
N20 X… Y…Z…
Exact stop is performed in
accordance with G601 default
G09 Exact stop, non-modal. setting.
N10 G09
N20 X…Y…Z…

152 Programming Manual of Milling Machine System


Appendix
B Command list

Address Definition Programming


Specify to run to the precise
exact-stop window, after a short
After reaching the precise stop
pause at the corner, then converted
G601 positioning window, the program
to the next program block.
block is conversed.
N10 G601
N20 X… Y…Z…
Specify to run to the coarse
exact-stop window, after a short
After reaching the coarse stop
pause at the corner, then converted
G602 positioning window, the program
to the next program block.
block is conversed.
N10 G602
N20 X…Y… Z…
Use LOOKAHEAD algorithm to
G64 Continuous-path operation, modal plan speed.
N10 G64 X…Y… Z…
Linear acceleration and
Linear acceleration and deceleration
BRISK
deceleration N10 BRISK
N20 X… Y…Z
Type S acceleration and
Type S acceleration and deceleration
SOFT
deceleration N10 SOFT
N20 X… Y… Z…

153 Programming Manual of Milling Machine System


Appendix
C Classification list of G commands

C Classification list of G commands

Motion commands

Name S/N Meaning Modal

G00 1 Rapid traverse movement M

G01 2 Linear interpolation M, Def

G02 3 Clockwise circular interpolation

G03 4 Counterclockwise circular interpolation

CIP 5 Circular interpolation in the intermediate point M

CT 6 Tangent transition circular interpolation M

CIPD 7 3D circular interpolation M

POLY 8 Polynomial interpolation M

AKIMA 9 A spline interpolation M

NURBS 10 B spline interpolation M

CUBIC 11 C spline interpolation M

G22 12 Clockwise helical interpolation M

G23 13 Counterclockwise helical interpolation M

Stop Time

Name S/N Meaning Modal

G04 1 Pause for a given time interval N

Programmable frame

Name S/N Meaning Modal

TRANS 1 Translation N

ROT 2 Rotation N

SCALE 3 Scaling N

MIRROR 4 Mirroring N

154 Programming Manual of Milling Machine System


Index

Programmable frame

Name S/N Meaning Modal

ATRANS 5 Additional translation N

AROT 6 Additional rotation N

ASCALE 7 Additional scaling N

AMIRROR 8 Additional mirroring N

Plane selection

Name S/N Meaning Modal

G17 1 XY Plane M, Def

G18 2 ZX Plane M

G19 3 YZ Plane M

Tool radius compensation

Name S/N Meaning Modal

G40 1 Deselect tool radius compensation M, Def

G41 Call tool radius compensation and tools traverse M


2
at the left side of the contour

G42 Call tool radius compensation and tools traverse M


3
at the right side of the contour

Settable frame

Name S/N Meaning Modal

G54 1 First settable work offset M

G55 2 Second settable work offset M

G56 3 Third settable work offset M

G57 4 Fourth settable work offset M

G58 5 Fifth settable work offset M

155 Programming Manual of Milling Machine System


Appendix
C Classification list of G commands

Settable frame

Name S/N Meaning Modal

G59 6 Sixth settable work offset M

G540~G599 7 Seventh to 66th settable work offsets M

G500 8 Deselecting programmable frames M

G53 9 Deselecting settable and programmable frames M, Def

Accurate positioning/continuous-path machining mode

Name S/N Meaning Modal

G09 1 Accurate positioning, non-modal N

G60 2 Accurate positioning, modal M

G64 3 Continuous-path mode M, Def

Accurate mode

Name S/N Meaning Modal

G601 1 In the precise exact-positioning window, the M, Def

exact stop mode is set by default.

G602 2 Coarse exact-positioning window M

Inch/metric dimension

Name S/N Meaning Modal

G70 1 Inch dimension (length) M

G71 2 Metric dimension (length) M, Def

Absolute/incremental dimensioning

Name S/N Meaning Modal

G90 1 Absolute dimensioning M, Def

G91 2 Incremental dimensioning M

156 Programming Manual of Milling Machine System


Index

Feed type

Name S/N Meaning Modal

G94 1 Linear feedrate in (mm/min) M, Def

G95 2 Rev. feedrate in (mm/rev) M

Acceleration control

Name S/N Meaning Modal

BRISK 1 Type T acceleration and deceleration M

SOFT 2 Type S acceleration and deceleration M

Working area limitation

Name S/N Meaning Modal

G25 1 Lower limit of the working area N

G26 2 Upper limit of the working area N

Enable/disable working area limitation

Name S/N Meaning Modal

WALIMON 1 Enable working area limitation M

WALIMOF 2 Disable working area limitation M, Def

Pole definition

Name S/N Meaning Modal

G110 1 Define pole according to the last programming N


point.
G111 2 Define pole according to the zero in the current N

workpiece coordinate system.

G112 3 Define poles according to the last effective pole. N

Returning to the reference point or fixed point

Name S/N Meaning Modal

157 Programming Manual of Milling Machine System


Appendix
C Classification list of G commands

G74 1 Return to the reference point N

G75 2 Return to the fixed-point N

Note: M means modal, N means non-modal and Def means the default setting.

158 Programming Manual of Milling Machine System


Index

D Classification list of M commands

Groupin Comman Definition Type

g ds

Group M00 Program stop N

1 M01 Optional program stop N

M02 Main program stop, resetting to the start N

of the program

M17 End of subprogram N

M30 Program stop, resetting to the start of the N

program

Group M03 Clockwise spindle rotation MI

2 M04 Counterclockwise spindle rotation MI

M05 Spindle stop MRF

M19 Spindle positioning N

Group M06 Tool change NI

3 M66 Virtual tool change NI

Note: M refers to modal; R effective by default; N non-modal; I executing before block; F

executing after block.

159 Programming Manual of Milling Machine System


Index

A
AC, absolute dimensioning, P36

AKIMA, spline interpolation, P27


CYCLE87, stopping drilling 1 (boring 3), P88
AMIRROR, additional mirroring, P108
CYCLE88, stopping drilling 2 (boring 4), P90
AP, polar angle, P41
CYCLE89, reaming 2 (boring 5), P91
AROT, additional rotation, P104
CYCLE90, thread milling, P74
ASCALE, additional scaling, P107

ATRANS, additional work offset, P102 G

B G00, Quick positioning, P17

G01, linear interpolation, P18


BRISK, linear acceleration and deceleration, P120
G02, circular interpolation, P19
C
G03, circular interpolation, P19
CHF, chamfer, P34
G04, pause, P40
CHR, chamfer, P34
G09, exact stop, P118
CIPD, 3D circular interpolation, P25
G110, pole definition, P42
CUBIC, spline interpolation, P27
G111, pole definition, P42
CYCLE71, plane milling, P45
G112, pole definition, P42
CYCLE72, contour milling, P49
G17, plane command, P35
CYCLE76, rectangular journal milling, P52
G18, plane command, P35
CYCLE77, circular journal milling, P56
G19, plane command, P35
CYCLE81, centering drilling, P76
G22, helical interpolation, P32
CYCLE82, counterboring drilling, P78
G23, helical interpolation, P32
CYCLE83, deep hole drilling, P79
G25, working area limitation, P38
CYCLE84, rigid tapping, P82
G26, working area limitation, P38
CYCLE85, reaming 1 (boring 1), P84
G500, frame deselection, P110
CYCLE86, boring (boring 2), P86
G53, frame deselection, P110
Index

G60, exact stop, P118 RND, radius, P34

G601, precise exact stop, P118 ROT, rotation, P104

G602, coarse exact stop, P118 RP, polar radius, P41

G64, continuous-path control, P119 S


G70, inch dimension, P37
S, spindle speed, P94
G71, metric dimension, P37
SCALE, scaling, P107
G74, return to the reference point, P39
SLOT1, circumferential groove milling, P65
G75, return to the fixed-point, P39
SLOT2, circular groove milling, P70
G90, absolute command, P36
SOFT, type S acceleration, P120
G91, relative command, P36
SPOS, spindle positioning, P95
G94, linear feedrate, P94
T
G95, rev. feedrate, P94
TRANS, work offset, P102
I
IC, relative dimension, P36

M
M, auxiliary functions, P96

M03, clockwise spindle rotation, P94

M04, counter-clockwise spindle rotation, P94

M05, spindle stop, P94

M19, spindle positioning, P95

MIRROR, mirroring, P108

N
NURBS, spline interpolation, P27

P
POCKET1, rectangular pocket milling, P58

POCKET2, circular pocket milling, P62

POLY, polynomial interpolation, P26

161 Programming Manual of Milling Machine System

You might also like