Wuhan Huazhong Numerical Control Co., Ltd HNC-18iT v4.0 Operating instructions

© 2007 Wuhan Huazhong Numerical Control Co., Ltd
Century
Century
Century
Century Star
Star
Star
Star Turning
Turning
Turning
Turning CNC
CNC
CNC
CNC System
System
System
System
Programming
Programming
Programming
Programming Guide
Guide
Guide
Guide
V
V
V
V 3.3
3.3
3.3
3.3
November,
November,
November,
November, 2007
2007
2007
2007
Wuhan
Wuhan
Wuhan
Wuhan Huazhong
Huazhong
Huazhong
Huazhong Numerical
Numerical
Numerical
Numerical Control
Control
Control
Control Co.,
Co.,
Co.,
Co., Ltd
Ltd
Ltd
Ltd

Preface
i
Preface
Preface
Preface
Preface
Organization
Organization
Organization
Organization of
of
of
of documentation
documentation
documentation
documentation
1. General
2. Preparatory Function
3. Interpolation Function
4. Feed Function
5. Coordinate System
6. Spindle Speed Function
7. Tool Function
8. Miscellaneous Function
9. Functions to Simplify Programming
10. Comprehensive Programming Example
11. Custom Macro
Applicability
Applicability
Applicability
Applicability
This Programming Guide is applicable to the following CNC system:
HNC-18iT/19iT v4.0
HNC-18xp/T
HNC-19xp/T
HNC-21TD/22TD v05.62.07.10
Internet
Internet
Internet
Internet Address
Address
Address
Address
http://www.huazhongcnc.com/

Table of Contents
ii
Table
Table
Table
Table of
of
of
of Contents
Contents
Contents
Contents
Preface ............................................................................................................................................. i
1 General ................................................................................................................................... 1
1.1 CNC Programming ..................................................................................................... 2
1.2 Interpolation ................................................................................................................ 4
1.2.1 Linear Interpolation ........................................................................................ 4
1.2.2 Circular Interpolation ...................................................................................... 5
1.2.3 Thread Cutting ................................................................................................ 5
1.3 Feed Function ............................................................................................................. 6
1.4 Coordinate System ...................................................................................................... 7
1.4.1 Reference Point ............................................................................................... 7
1.4.2 Machine Coordinate System ........................................................................... 8
1.4.3 Workpiece Coordinate System ........................................................................ 9
1.4.4 Setting Two Coordinate Systems at the Same Position ................................ 10
1.4.5 Absolute Commands ..................................................................................... 11
1.4.6 Incremental Commands ................................................................................ 12
1.4.7 Diameter/Radius Programming .................................................................... 13
1.5 Spindle Speed Function ............................................................................................ 14
1.6 Tool Function ............................................................................................................ 15
1.6.1 Tool Selection ............................................................................................... 15
1.6.2 Tool Offset .................................................................................................... 15
1.7 Miscellaneous Function ............................................................................................ 18
1.8 Program Configuration ............................................................................................. 19
1.8.1 Structure of an NC Program ......................................................................... 19
1.8.2 Main Program and Subprogram .................................................................... 20
2 Preparatory Function (G code) ............................................................................................. 21
2.1 G code List ................................................................................................................ 22
3 Interpolation Functions ......................................................................................................... 24
3.1 Positioning (G00) ..................................................................................................... 25
3.2 Linear Interpolation (G01) ........................................................................................ 26
3.3 Circulation Interpolation (G02, G03) ....................................................................... 31
3.4 Chamfering and Rounding (G01, G02, G03) ............................................................ 37
3.4.1 Chamfering (G01) ......................................................................................... 37
3.4.2 Rounding (G01) ............................................................................................ 38
3.4.3 Chamfering (G02, G03) ................................................................................ 40
3.4.4 Rounding (G02, G03) ................................................................................... 41
3.5 Thread Cutting with Constant Lead (G32) ............................................................... 43
3.6 Tapping (G34) ........................................................................................................... 46
4 Feed Function ....................................................................................................................... 49
4.1 Rapid Traverse (G00) ............................................................................................... 50
4.2 Cutting Feed (G94, G95) .......................................................................................... 51
4.3 Dwell (G04) .............................................................................................................. 52
5 Coordinate System ................................................................................................................ 53
5.1 Reference Position Return (G28) .............................................................................. 54
5.2 Auto Return from Reference Position (G29) ............................................................ 55
5.3 Setting a Workpiece Coordinate System (G92) ........................................................ 57
5.4 Selecting a Machine Cooridinate System (G53) ....................................................... 58
5.5 Selecting a Workpiece Coordinate System (G54~G59) ............................................ 59
5.6 Origin of a Workpiece Coordinate System (G51, G50) ............................................ 61
5.7 Absolute and Incremental Programming (G90, G91) ............................................... 62

Table of Contents
iii
5.8 Diameter and Radius Programming (G36, G37) ...................................................... 64
5.9 Inch/Metric Conversion (G20, G21) ......................................................................... 66
6 Spindle Speed Function ........................................................................................................ 67
6.1 Limit of Spindle Speed (G46) ................................................................................... 68
6.2 Constant Surface Speed Control (G96, G97) ............................................................ 69
7 Tool Function ........................................................................................................................ 71
7.1 Tool Selection and Tool Offset (T code) ................................................................... 72
7.2 Tool Radius Compensation (G40, G41, G42) ........................................................... 74
8 Miscellaneous Function ........................................................................................................ 76
8.1 M code List ............................................................................................................... 77
8.2 CNC M-Function ...................................................................................................... 78
8.2.1 Program Stop (M00) ..................................................................................... 78
8.2.2 Optional Stop (M01) ..................................................................................... 78
8.2.3 End of Program (M02) .................................................................................. 78
8.2.4 End of Program with return to the beginning of program (M30) ................. 78
8.2.5 Subprogram Control (M98, M99) ................................................................. 79
8.3 PLC M Function ....................................................................................................... 81
8.3.1 Spindle Control (M03, M04, M05) ............................................................... 81
8.3.2 Coolant Control (M07, M08, M09) .............................................................. 81
9 Functions to Simplify Programming .................................................................................... 82
9.1 Canned Cycles .......................................................................................................... 83
9.1.1 Internal Diameter/Outer Diameter Cutting Cycle (G80) .............................. 83
9.1.2 End Face Turning Cycle (G81) ..................................................................... 88
9.1.3 Thread Cutting Cycle (G82) ......................................................................... 91
9.1.4 End Face Peck Drilling Cycle (G74) ............................................................ 94
9.1.5 Outer Diameter Grooving Cycle (G75) ........................................................ 96
9.2 Multiple Repetitive Cycle ......................................................................................... 98
9.2.1 Stock Removal in Turning (G71) .................................................................. 98
9.2.2 Stock Removal in Facing (G72) ................................................................. 104
9.2.3 Pattern Repeating (G73) ............................................................................. 108
9.2.4 Multiple Thread Cutting Cycle (G76) ......................................................... 111
10 Comprehensive Programming .................................................................................... 114
10.1 Example 1 ............................................................................................................... 114
10.2 Example 2 ............................................................................................................... 116
10.3 Example 3 ............................................................................................................... 118
10.4 Example 4 ............................................................................................................... 119
11 Custom Macro .................................................................................................................... 120
11.1 Variables ................................................................................................................. 121
11.1.1 Type of Variables ........................................................................................ 121
11.1.2 System Variables ........................................................................................ 122
11.2 Constant .................................................................................................................. 129
11.3 Operators and Expression ....................................................................................... 130
11.4 Assignment ............................................................................................................. 131
11.5 Selection statement
IF,
ELSE,ENDIF ..................................................................... 132
11.6 Repetition Statement WHILE, ENDW ................................................................... 133
11.7 Macro Call .............................................................................................................. 134
11.8 Example .................................................................................................................. 136

1. General
1
1
1
1
1 General
General
General
General
This chapter is to introduce the basic concepts in Computerized Numerical Control (CNC)
system: HNC-21T /22
T,
HNC-18iT/19iT, HNC-18xp/
T
, HNC-19xp/
T
.

1. General
2
1.1
1.1
1.1
1.1 CNC
CNC
CNC
CNC Programming
Programming
Programming
Programming
To
operate CNC machine tool, the first step is to understand the part drawing and produce a
program manual script. The procedure for machining a part is as follows (Figure 1.1):
1) Read drawing
2) Produce the program manual script
3) Input the program manual script by using the machine control panel
4) Manufacture a part

1. General
3
1. Read drawing
4 0
ΖΦ60
Φ40
1 50
X
2. Produce the program manual script
N1 T0106
N2 M03 S460
N3 G00 X90Z20
N4 G00 X31Z3
N5 G01 Z-50 F100
N6 G00 X36
N7 Z3
…
3. Input the program manual script
4. Manufacture a part
X
Z
Figure 1 . 1 The workflow of operation of CNC machine tool

1. General
4
1.2
1.2
1.2
1.2 Interpolation
Interpolation
Interpolation
Interpolation
Interpolation refers to an operation in which the machine tool moves along the workpiece
parts. There are five methods of interpolation: linear, circular, helical, parabolic, and cubic.
Most CNC machine can provide linear interpolation and circular interpolation. The other
three methods of interpolation (helical, parabolic, and cubic interpolation) are usually used
to manufacture the complex shapes, such as aerospace parts. In this manual, linear and
circular interpolation are introduced.
1.2.1
1.2.1
1.2.1
1.2.1 L
L
L
L inear
inear
inear
inear Interpolation
Interpolation
Interpolation
Interpolation
There are two kinds of linear interpolation:
1) Tool movement along a straight line (Figure 1.2).
X
Z
Figure 1 . 2 Linear Interpolation (1)
2) Tool movement along the taper line
X
Z
Figure 1 . 3 Linear Interpolation (2)

1. General
5
1.2.2
1.2.2
1.2.2
1.2.2 Circular
Circular
Circular
Circular Interpolation
Interpolation
Interpolation
Interpolation
Figure 1.4 shows a tool movement along an arc.
X
Z
Figure 1 . 4 Circular Interpolation
Note:
Note:
Note:
Note:
In this manual, it is assumed that tools are moved against workpieces.
1.2.3
1.2.3
1.2.3
1.2.3 Thread
Thread
Thread
Thread Cutting
Cutting
Cutting
Cutting
There are several kinds of threads: c ylindrical, taper or face threads .
To
cut threads on a
workpiece, the tool is moved with spindle rotation synchronously .
Figure 1 . 5 Thread Cutting

1. General
6
1.3
1.3
1.3
1.3 Feed
Feed
Feed
Feed Function
Function
Function
Function
- Feed refers to an operation in which the tool moves at a specified speed to cut a
workpiece.
- Feedrate refers to a specified speed, and numeric is used to specified the fe e drate .
- Feed function refers to an operation to control the fe e drate .
Tool
Chuck
Figure 1 . 6 Feed Function
For example:
F2.0 //feed the tool 2mm, while the workpiece makes one turn

1. General
7
1.4
1.4
1.4
1.4 Coordinate
Coordinate
Coordinate
Coordinate System
System
System
System
1.4.1
1.4.1
1.4.1
1.4.1 Reference
Reference
Reference
Reference Point
Point
Point
Point
Reference point is a fixed position on CNC machine tool, which is determined by cams and
measuring system. Generally, it is used when the tool is required to exchange or the
coordinate system is required to set.
Reference
position
Tool post
Chuck
Figure 1 . 7 Reference Point
There are two ways to move to the reference point:
- Manual reference position return: The tool is moved to the reference point by operating
the button on the machine control panel. It is only used when the machine is turned on.
- Automatic reference position return: It is used after the manual reference position return
has been used. In this manual, this would be introduced.

1. General
8
1.4.2
1.4.2
1.4.2
1.4.2 Machine
Machine
Machine
Machine Coordinate
Coordinate
Coordinate
Coordinate System
System
System
System
The coordinate system is set on a CNC machine tool. Figure 1.8 is a machine coordinate
system of turning machine, and shows the direction of axes:
Figure 1 . 8 Machine Coordinate System
In general , three basic linear coordinate axes of motion are X,
Y,
Z. Moreover, X,
Y,
Z axis
of rotation is named as A, B, C cor respond ently. Due to different types of turning machine,
the axis direction can be decided by following the rule – “ three finger rule ” of the right
hand.
+
X
+
X
+
Y
'
+
Z
+
Y
+
Z
+
Y
+
C
+
Z
'
+
A
+
B
+
C
+ X +
Y
+
Z
+
A
+
B
+
X
'
Figure 1 . 9 “ three finger rule ”
- The thumb points the X axis. X axis controls the cross motion of the cutting tool.
“ +X ” means that the tool is away from the spindle centerline
- T he index points the Y axis. Y axis is usually a virtual axis.
- T he middle finger points the Z axis. Z axis controls the motion of the cutting tool.
“ +Z ” means that the tool is away from the spindle.

1. General
9
1.4.3
1.4.3
1.4.3
1.4.3 Workpiece
Workpiece
Workpiece
Workpiece Coordinate
Coordinate
Coordinate
Coordinate System
System
System
System
The coordinate system is set on a workpiece. The data in the NC program is from the
workpiece coordinate system.
90 °
Y+
W
W
W
W
Z+X-
X+
Y-
Z-
90 °
90 °
Figure 1 . 10 Workpiece Coordinate System
Example: Those four points can be defined on workpiece coordinate system:
P1 corresponds to X25 Z-7.5
P2 corresponds to X40 Z-15
P3 corresponds to X40 Z-25
P4 corresponds to X60 Z-35
P4
P3
P2
P1
Z
X
Φ60
Φ40
Φ25
35
25
15
7.5
Figure 1 .
11
Example of defining points on workpiece coordinate system

1. General
10
1.4.4
1.4.4
1.4.4
1.4.4 Setting
Setting
Setting
Setting Two
Two
Two
Two Coordinate
Coordinate
Coordinate
Coordinate Systems
Systems
Systems
Systems at
at
at
at the
the
the
the Same
Same
Same
Same Position
Position
Position
Position
There are two methods used to define two coordinate systems at the same position.
1) The coordinate zero point is set at chuck face
40
Ζ
Φ60
Φ40
1 50
X
Ζ
X
Figure 1 . 12 The coordinate zero point set at chuck face
2) The coordinate zero point is set at the end face of workpiece
30
Ζ
Φ60
Φ30
80
X
10 0
Ζ
X
Figure 1 . 13 The coordinate zero point set at the end face of workpiece

1. General
11
1.4.5
1.4.5
1.4.5
1.4.5 Absolute
Absolute
Absolute
Absolute Commands
Commands
Commands
Commands
The absolute dimension describes a point at “ the distance from zero point of the coordinate
system ” .
E xample: These four point in absolute dimensions are the following:
P1 corresponds to X25 Z-7.5
P2 corresponds to X40 Z-15
P3 corresponds to X40 Z-25
P4 corresponds to X60 Z-35
P4
P3
P2
P1
Z
X
Φ60
Φ40
Φ25
35
25
15
7.5
Figure 1 . 14 Absolute Dimension

1. General
12
1.4.6
1.4.6
1.4.6
1.4.6 Incremental
Incremental
Incremental
Incremental Commands
Commands
Commands
Commands
The incremental dimension describes a distance from the previous tool position to the next
tool position.
Example: These four point in incremental dimensions are the following:
P1 corresponds to X25 Z-7.5 //with reference to the zero point
P2 corresponds to X15 Z-7.5 //with reference to P1
P3 corresponds to Z-10 //with reference to P2
P4 corresponds to X20 Z-10 //with reference to P3
10
7.5
P4
P3
P2
P1
Z
X
Φ60
Φ40
Φ25
7.510
Figure 1 . 15 Incremental Dimension

1. General
13
1.4.7
1.4.7
1.4.7
1.4.7 Diameter/Radius
Diameter/Radius
Diameter/Radius
Diameter/Radius Programming
Programming
Programming
Programming
The coordinate dimension on X axis can be set in diameter or radius. It should be noted that
diameter programming or radius programming should be applied independently on each
machine.
Example: Describe the points by diameter programming.
A
corresponds to X30 Z80
B corresponds to X40 Z60
8
8
8
8 0
0
0
0
6
6
6
6 0
0
0
0
B
B
B
B
A
A
A
A
Φ40
X
X
X
X
Z
Z
Z
Z
Φ30
Figure 1 . 16 Diameter Programming
Example: Describe the points by radius programming.
A
corresponds to X15 Z80
B corresponds to X20 Z60
8
8
8
8 0
0
0
0
6
6
6
6 0
0
0
0
B
B
B
B
A
A
A
A
20
X
X
X
X
Z
Z
Z
Z
15
Figure 1 . 17 Radius Programming

1. General
14
1.5
1.5
1.5
1.5 Spindle
Spindle
Spindle
Spindle Speed
Speed
Speed
Speed Function
Function
Function
Function
The cutting speed (v) refers to the speed of the tool with respect to the workpiece when the
workpiece is cut. The unit of the cutting speed is m/min. As for the CNC, the cutting speed
can be specified by the spindle speed (N) in min
-1
.
N
·
min
-
1
Chuck
V: Cutting speed
v m/min
Figure 1 . 18 Cutting Speed and Spindle Speed
The formula to get the spindle speed is:
D
vN
π
∗=
1000
N: the spindle speed
v: cutting speed
D: diameter value of the workpiece
Example: When the diameter of workpiece is 200mm, and the cutting speed is 300m/min,
then the spindle speed:
mr
D
vN
/478200
30010001000
≈∗
∗=∗=
ππ
The constant surface speed refers to the cutting speed even when the workpiece diameter is
changed, and the CNC changes the spindle speed.

1. General
15
1.6
1.6
1.6
1.6 Tool
Tool
Tool
Tool Function
Function
Function
Function
1.6.1
1.6.1
1.6.1
1.6.1 Tool
Tool
Tool
Tool Selection
Selection
Selection
Selection
It is necessary to select a suitable tool when drilling, tapping, boring or the like is performed.
As it is shown in Figure 1.19, a number is assigned to each tool. Then this number is used in
the program to specify that the corresponding tool is selected.
01
02
03
04
05
06
Tool
Tool
Tool
Tool post
post
post
post
Tool
Tool
Tool
Tool number
number
number
number
Figure 1 . 19
Tool
Selection
1.6.2
1.6.2
1.6.2
1.6.2 Tool
Tool
Tool
Tool Offset
Offset
Offset
Offset
When writing a program, the operator just use the workpiece dimensions according to the
dimensions in the part drawing. The tool nose radius center , the tool direction of the turning
tool, and the tool length are not taken into account. However, when machining a workpiece,
the tool path is affected by the tool geometry.
Thread
cutting
tool
Grooving
tool
Finishing
tool
Rough
cutting
tool
Standard
tool
workpiece
workpiece
workpiece
workpiece
Figure 1 . 20
Tool
Offset

1. General
16
�Tool Length Compensation
There are two kind of ways to specify the value of tool length compensation.
- Absolute value of tool length compensation (the distance between tool tip and
machine reference point)
- Incremental value of tool length compensation (the distance between tool tip and
the standard tool)
As it is shown in Figure 1.21, L1 is the tool length on X axis. L2 is the tool length on Z axis.
It should be noted that the tool wear values on X axis or Z axis are also contained in the tool
length compensation.
P=Tool
P=Tool
P=Tool
P=Tool tip
tip
tip
tip
R=Radius
R=Radius
R=Radius
R=Radius
S=Cutting
S=Cutting
S=Cutting
S=Cutting edge
edge
edge
edge center
center
center
center
R
S
L2
L1P
Figure 1 . 21
Tool
Length Compensation
�Tool Radius Compensation
Figure 1.22 shows the imaginary tool nose as a start position when writing a program.
T
ool nose radius center
P
Imaginary tool
nose
Figure 1 . 22 The imaginary tool nose
This manual suits for next models
11
Table of contents
Popular Control System manuals by other brands

Next Wave CNC
Next Wave CNC SHARK installation manual

SENSTAR
SENSTAR MX-7000 Series Installation & operation manual

BM PRO
BM PRO MiniBoostPRO owner's manual

HydroQuip
HydroQuip BALBOA CS6000B Series Operation manual

VALCOBABY
VALCOBABY MELTON CP-40 instructions

Power Drive
Power Drive P1000FC Quick start instructions

C.P. Electronics
C.P. Electronics DD-LCDHS Product guide

smart home
smart home Securelinc Programming guide

Fly Sky
Fly Sky FS-MG4 user manual

Fly Sky
Fly Sky HRZ00020 user manual

Signature Control Systems
Signature Control Systems EZ Indoor 8124US Installation and programming guide

Fly Sky
Fly Sky Paladin PL18 user manual