ZHEJIANG YUHAI TSNC-YH-A1M User manual

TSNC-YH-A1M
Milling CNC System Operation
Manual
ZHEJIANG YUHAI

Preface
Dear Customer:
We are honored for your purchasing TSNC-YH-A1M Mill Machine CNC
▲To avoid accidents caused by improper operation ,Personnel must have the appropriate
qualifications to operate the CNC system.
▲Please read this manual carefully before operating!
SPECIAL NOTE:
System power supply installed in the system is special power supply for CNC system
manufactured by our company.
This power supply is not allowed for other purposes, Otherwise, it will result in great danger!
This manual is kept by the end user. All specifications and designs are subject to change without
notice.

Statement!
In this manual we have tried as much as possible to describe all the various use of this product. However, we
cannot describe all the operations which can be done ,or which cannot be done, because there are so many
possibilities .Therefore , to ensure the normal use of the product, safety of equipments and users ,operations which
are not especially described in this manual should be regarded as “not allowed”.
System damage due to earthquakes, floods, typhoons and other irresistible factors, not covered under
warranty.
Warning!
Before installation and programming operation of the product ,users must read this manual and machine
manufacturer's instructions, operations must be in strict accordance with the requirements of this manual, or it
may lead to damage to the machine and product, the workpiece scrap or even personal injury.
Note!
Product features described in this manual are only for this system. The actual function configuration and
technical performance of the CNC machine tools installed the product is determined by the machine tool
manufacturer’s design. The function configuration and technical indicators are subject to the machine
manufacturer's instructions.

Safety Instructions
To enable you to use the system safely and correctly, please read
these instructions carefully before operating the machine
1. When using the new program for the actual machining parts, do not directly processed, you should
make a trial run to verify the correctness of the mechanical movement of the machine, using single-stage feed
without tools and parts. Carrying out the program without confirming its correctness, there may be unexpected
mechanical movement, resulting in the tool, machine tool, workpiece damage and personal injury.
2. The operation should be carried out in full recognition of the correctness of the input data and then. If
the data used is not correct, there may be unexpected mechanical movement, resulting in the tool, machine tool,
workpiece damage and personal injury.
3. Confirm the setting spindle speed and feed rate appropriate. Set the maximum spindle speed and feed
rate via user parameters. If the spindle speed and feed rate setting is not appropriate. It may result in tools,
machine tool, workpiece damage and personal injury.
4. When using a tool compensation function, should be fully recognized compensation direction and
compensation amount. If the data used is not correct, there may be unexpected mechanical movement, resulting in
the tool, machine tool, workpiece damage and personal injury.
5. The system parameters should be set appropriate values. The parameter values must be modified on the
basis of fully understanding of the meaning of the parameters. If the parameter setting error, it may result in
cutting tools, machine tool, workpiece damage and personal injury.
6. Some features are in the machine tool manufacturer's requirements to achieve, when using these
functions, refer to the instructions provided by the machine manufacturer for detailed usage and understand the
function of some of the relevant considerations.。
7. Programmers should be familiar with and fully understand the contents of the operating instructions. In
setting the coordinate system, non-linear interpolation positioning, face constant speed control programming, you
must set the appropriate command values to ensure proper operation of the machine, in order to avoid cutting
tools, machine tool, workpiece damage and personal injury.
8. Manually operating the machine movement need to master position of the tool and the workpiece, to
confirm the selection movement axis, direction of movement and other aspects of the feed rate. If you make a
mistake, it is possible to make tools, machine tool, workpiece damage and personal injury.
9. For the machine requires manual machine zero, the machine must be manually returned zero after the
power is turned on. Otherwise, there will be unexpected machine operation, it is possible to make tools, machine
tool, workpiece damage and personal injury.
10. When using the manual handle feed, if select 100 magnification, tools, workstations and other
movement speed becomes faster, so special attention should be. Otherwise, it is possible to make tools, machine
tool, workpiece damage and personal injury.
11. ConFig.d parameter file should be back up for future recovery.
12. CNC system must be connected to ground.

Preface......................................................................................................................................................................... 2
Safety Instructions......................................................................................................................................................4
PartⅠGENERAL.....................................................................................................................................................11
1. General.................................................................................................................................................................. 11
Part ⅡPROGRAMMING...................................................................................................................................... 12
1. Programming Overview.......................................................................................................................................12
1.1 Interpolation......................................................................................................................................... 12
1.2 Feed Function....................................................................................................................................... 13
1.3 Spindle Function...................................................................................................................................13
1.4 Tool Function........................................................................................................................................14
1.5 Accessibility......................................................................................................................................... 14
2 The Basic Structure of Program.......................................................................................................................... 14
2.1 Program................................................................................................................................................ 14
2.2 Words and Address............................................................................................................................... 15
2.3 Basic Range of Address and Command...............................................................................................16
2.4 Program Number and Block.................................................................................................................17
2.5 Main Program and Subprogram........................................................................................................... 17
2.6 End of Program.....................................................................................................................................18
3 Programming Basics............................................................................................................................................. 18
3.1 Control Shaft........................................................................................................................................ 18
3.1.1 Number of Control Shaft...........................................................................................................18
3.1.2 Axis Name................................................................................................................................. 18
3.2 Setting Unit...........................................................................................................................................19
3.2.1 Minimum Setting Unit and Minimum Travel Unit...................................................................19
3.3 Coordinate System............................................................................................................................... 19
3.3.1 Reference Point......................................................................................................................... 19
3.3.2 Machine Coordinate System..................................................................................................... 19
3.3.3 Workpiece Coordinate System.................................................................................................. 19
3.4 Maximum Stroke..................................................................................................................................20
3.5 Coordinate Value and Size................................................................................................................... 20
3.5.1 Absolute / Incremental Programming (G90 / G91).................................................................. 20
3.5.2 Polar Coordinate Command (G15, G16).................................................................................. 21
3.6 Decimal Point Programming................................................................................................................22
4 Preparatory Function (G Code)...........................................................................................................................22
4.1 Fast Positioning.................................................................................................................................... 24
4.2 The linear interpolation........................................................................................................................ 24
4.3 Circular Interpolation (G02,G03)......................................................................................................24
4.4 Helical Interpolation (G02, G03)......................................................................................................... 26
4.5 Feed per Minute / Feed Per Revolution (G94 / G95)...........................................................................27
4.6 Pause (G04).......................................................................................................................................... 27
5 Feed Function Code...............................................................................................................................................27
5.1 Rapid Traverse......................................................................................................................................27
5.2 Cutting Feed......................................................................................................................................... 28
5.3 Automatic Deceleration Control.......................................................................................................... 28

6 Tool Function (T Function).................................................................................................................................. 28
7 Reference Point......................................................................................................................................................28
7.1 Reference Point.................................................................................................................................... 28
7.2 Reference Position (G28)..................................................................................................................... 29
7.3 Setting Returning Reference Point Speed............................................................................................29
8 Coordinate System................................................................................................................................................ 30
8.1 Machine Coordinate System................................................................................................................ 30
8.2 Workpiece Coordinate System............................................................................................................. 30
8.2.1 Setting a Workpiece Coordinate System...................................................................................30
8.2.2 Selecting a Workpiece Coordinate System............................................................................... 31
8.2.3 Changing Workpiece Coordinate System................................................................................. 31
8.3 Local Coordinate System..................................................................................................................... 31
8.4 Plane Selection..................................................................................................................................... 32
9 Spindle Speed Function (S Function).................................................................................................................. 32
9.1 Spindle Speed Specified.......................................................................................................................32
9.2 Constant Surface Speed Control (G96, G97).......................................................................................32
10 The Function M Code......................................................................................................................................... 32
10.1 The Program Control M Codes.......................................................................................................... 33
10.2 Auxiliary Function M code................................................................................................................ 33
11 Tool Compensation..............................................................................................................................................34
11.1 Tool Length Compensation (G43, G44, G49)....................................................................................34
11.2 Tool Radius Compensation (G41, G42, G40)....................................................................................35
12. Macro Instruction...............................................................................................................................................36
12.1 Macro Variable................................................................................................................................... 36
12.1.1 Variable Represent...................................................................................................................36
12.1.2 Type of Variable...................................................................................................................... 36
12.1.3 Use of Variable........................................................................................................................ 37
12.2 Call the Macro Program..................................................................................................................... 37
12.2.1 Simple Call G65...................................................................................................................... 37
12.2.2 Modal Call G66.......................................................................................................................37
12.2.3 Cancel the Modal Call G67.....................................................................................................38
12.2.4 Arithmetic and Logic Operations............................................................................................38
12.3 Control Directive................................................................................................................................38
12.3.1 Unconditional Transfer GOTO Statement.............................................................................. 38
12.3.2 Conditional Branch IF Statements.......................................................................................... 39
12.3.3 Loop (WHILE statement)....................................................................................................... 39
12.3.4 User Macro.............................................................................................................................. 39
12.4 Variables............................................................................................................................................. 40
12.4.1 System Variables..................................................................................................................... 40
12.4.2 Arithmetic and Logic Operations............................................................................................41
12.4.3 NC Statements and Macro Statements....................................................................................41
12.4.4 Transfer and Recycling........................................................................................................... 41
12.4.5 Macro Call...............................................................................................................................41
13 Fixed Cycle Function...........................................................................................................................................42
13.1 Fixed Loop Hole Processing.............................................................................................................. 42
13.2 The Main Instruction Affecting the Machining Cycle.......................................................................43
13.2.1 Coordinate Programming Instructions (G90/G91)................................................................. 43

13.2.2 Return Plane Selection (G98,G99).......................................................................................44
13.3 Cycle Mode of Hole Machining.........................................................................................................44
13.3.1 High-speed Chip Drilling Cycle (G73)...................................................................................45
13.3.2 Fine Boring Cycle(G76).................................................................................................... 46
13.3.3 Ordinary Drilling Cycle (G81)................................................................................................48
13.3.4 Ordinary Drilling Cycle (G82)................................................................................................49
13.3.5 Chip Removal Drilling Cycle (G83).......................................................................................50
13.3.6 Boring Loop (G85)..................................................................................................................52
13.3.7 Boring Loop (G86)..................................................................................................................53
13.3.8 Back Boring Cycle (G87)........................................................................................................54
13.3.9 Boring Cycle (G89).................................................................................................................56
13.4 Tapping Cycle.....................................................................................................................................57
13.4.1 Left-handed Tapping Cycle (G74).......................................................................................... 57
13.4.2 Tapping Cycle (G84)...............................................................................................................58
13.4.3 L Rigid Tapping Cycle (G74)..................................................................................................59
13.4.4 Rigid tapping cycle (G84).......................................................................................................61
13.4.5 Chip rigid tapping cycle (G74, G84)...................................................................................... 63
13.5 Cancel fixed cycle (G80)....................................................................................................................65
Part III OPERATION..............................................................................................................................................65
1. Operation Panel....................................................................................................................................................65
1.1 Panel Layout.........................................................................................................................................65
1.2 Panel Functional Division.................................................................................................................... 65
1.2.1 LCD Display Area.....................................................................................................................65
1.2.2 MDI Panel Area.........................................................................................................................66
1.2.3 Soft Key Area............................................................................................................................ 67
1.2.4 Operation Panel Area................................................................................................................ 67
2. Power ON/OFF and Safety Functions................................................................................................................ 68
2.1 Power ON............................................................................................................................................. 68
2.2 Power OFF............................................................................................................................................68
2.3 Safety Functions................................................................................................................................... 69
2.3.1 Reset.......................................................................................................................................... 69
2.3.2 Emergency Stop........................................................................................................................ 69
2.3.3 Cycle Hold.................................................................................................................................70
2.4 Cycle Start and Cycle Hold..................................................................................................................70
2.5 Overtravel Protection........................................................................................................................... 70
2.5.1 Hard Overtravel Protection....................................................................................................... 70
2.5.2 Soft Overtravel Protection.........................................................................................................70
2.5.3 Releasing Overtravel................................................................................................................. 70
3. Interface Display and Setting and Displaying Data.......................................................................................... 70
3.1 Boot Interface Display..........................................................................................................................70
3.1.1 Status Display............................................................................................................................71
3.1.2 Modal Code Display..................................................................................................................71
3.1.3 Input Data Display.................................................................................................................... 71
3.1.4 Program Number and Sequence Number Display....................................................................71
3.1.5 Rate, Actual Speed, Workpiece Count and Cycle Time Display.............................................. 71
3.2 Position Interface..................................................................................................................................72
3.2.1 Absolute Coordinate Display.................................................................................................... 72

3.2.2 Relative Coordinate Display..................................................................................................... 72
3.2.2 Integrated Coordinate Display.................................................................................................. 74
3.3 Program List Display............................................................................................................................75
3.4 Command Value Display......................................................................................................................76
3.5 The system Alarm Display................................................................................................................... 77
3.6 Help Interface Display..........................................................................................................................77
3.7 Tool Compensation Display................................................................................................................. 77
3.7.1 Tool Compensation Display...................................................................................................... 77
3.7.2 Tool Compensation Amount Modification............................................................................... 78
3.8 Coordinate System Display..................................................................................................................79
3.9 Setting Screen Display......................................................................................................................... 79
3.10 Password Settings Interface............................................................................................................... 80
3.11 Time Setting Interface........................................................................................................................ 80
3.12 Macro Variable Display......................................................................................................................81
3.12.1 Macro Variable Display...........................................................................................................81
3.12.2 Modify Macro Variables Setting............................................................................................. 81
3.13 Parameter Display.............................................................................................................................. 82
3.13.2 Parametric Modification..........................................................................................................82
3.14 Pitch Error Compensation Display and Setting................................................................................. 83
3.14.1 Pitch Error Compensation Screen........................................................................................... 83
3.14.2 Pitch Error Compensation Setting...........................................................................................83
3.15 Ladder Diagram Display Screen........................................................................................................ 83
3.16 PLC Signal Screen..............................................................................................................................84
3.17 System Information Screen................................................................................................................ 85
3.18 Graphic Display Function.................................................................................................................. 85
3.18.1 Graph Simulation.................................................................................................................... 85
3.18.2 Graph Parameters Setting Screen............................................................................................86
4. Manual Operation................................................................................................................................................ 86
4.1 FEED AXIS CONTROL......................................................................................................................87
4.1.1 Manual Feed.............................................................................................................................. 87
4.1.2 Manual Rapid Traverse............................................................................................................. 87
4.1.3 Manual Feed and Manual Rapid Traverse Rate Select.............................................................87
4.2 Spindle Control.....................................................................................................................................87
4.3 Other Manual Operation.......................................................................................................................87
4.3.1 Coolant Control......................................................................................................................... 87
4.3.2 Work light Control.....................................................................................................................87
4.4 Tool Setting...........................................................................................................................................88
4.4.1 Halve by Trial cut......................................................................................................................88
4.4.2 Halve with Optical Edge Finder................................................................................................88
4.4.3 Setting Tool by Reference Cutter..............................................................................................88
4.4.4 Setting Tool by Non Reference Cutter...................................................................................... 88
5. Handle and Incremental Operation....................................................................................................................88
5.1 Handle Feed..........................................................................................................................................89
5.1.1 Select the Amount of Movement.............................................................................................. 89
5.1.2 Select Axis and Move Direction............................................................................................... 89
5.2 Incremental Feed.................................................................................................................................. 89
6. Automatic Operation........................................................................................................................................... 89

6.1 Types of Automatic Operation............................................................................................................. 89
6.1.1 Automatic Operation/Memory Operation................................................................................. 89
6.1.3 DNC Operation..........................................................................................................................90
6.2 Start of Automatically Operation......................................................................................................... 90
6.3 Execution of Automatically Operation.................................................................................................91
6.4 Stop Automatic Operation....................................................................................................................92
6.4.1 Program Stop M00.................................................................................................................... 92
6.4.2 Program End M30..................................................................................................................... 92
6.4.3 Feed Hold.................................................................................................................................. 92
6.4.4 Reset.......................................................................................................................................... 92
6.5 Control of Cooling Fluid in the Automatic Operation.........................................................................92
6.6 Machine Tools, Auxiliary Function to Lock Operation....................................................................... 92
6.7 Adjustment of Traverse and Rapid Traverse in the Automatic Operation...........................................93
6.8 Adjustment of Spindle Speed In The Automatic Operation.................................................................93
6.9 Dry Run................................................................................................................................................ 93
6.10 Single Run.......................................................................................................................................... 93
6.11 Switch of All Kinds Of Operation......................................................................................................93
7 Back to Origin Operation..................................................................................................................................... 93
7.1 Mechanical Origin................................................................................................................................93
7.2 Reference Position Return Process...................................................................................................... 94
7.3 Program Command to Reference Position Return...............................................................................94
8 Program Storage and Edit....................................................................................................................................94
8.1 Save Program into the System Memory.............................................................................................. 94
8.1.1 Type with the MDI Keyboard................................................................................................... 94
8.1.2 Input with the USB Interface.................................................................................................... 95
8.2 Program Number Retrieval.................................................................................................................. 95
8.2.1 Retrieval Method.......................................................................................................................95
8.2.2 Scanning Method.......................................................................................................................96
8.3 Program Deletion................................................................................................................................. 96
8.3.1 The Deletion Of The Programs In Memory..............................................................................96
8.3.2 The Deletion of the Programs in the U Disk.............................................................................96
8.4 The Output of the Programs................................................................................................................. 97
8.5 The Copy and Paste of the Program Segment......................................................................................97
8.6 The Insertion, Revisement and Deletion of the Letters....................................................................... 97
8.6.1 Retrieval of the Word................................................................................................................ 97
8.6.2 Insertion of the Word.................................................................................................................99
8.6.3 Change of the Word...................................................................................................................99
8.6.4 Deletion of the Word................................................................................................................. 99
9 Operation of the U Disk...................................................................................................................................... 100
9.1 System Update....................................................................................................................................100
9.2 Program Input.....................................................................................................................................100
9.3 Program Output.................................................................................................................................. 100
PartⅣDEVICE ATTACHMENT.......................................................................................................................100
1 System Installation Diagram.............................................................................................................................. 101
2 Interface Layout.................................................................................................................................................. 101
2.1 The Feed Motor Interface...................................................................................................................101
2.2 Machine Tool Dedicated Input Signal................................................................................................103

2.3 Main Spindle Interface....................................................................................................................... 104
2.4 General Output Interface....................................................................................................................105
2.5 General Input Interface.......................................................................................................................106
2.6 The Encoder Input.............................................................................................................................. 108
2.7 CAN Interface.................................................................................................................................... 109
2.8 RS232 interface.................................................................................................................................. 110
2.9 RS485 interface.................................................................................................................................. 110
3. Connection between the Equipment................................................................................................................. 111
3.1 The System External Connection Diagram........................................................................................ 111
3.2 The Connection of System and Driver Unit.......................................................................................111
3.2.1 Interface Signal Table..............................................................................................................111
3.2.2 Signal Description................................................................................................................... 112
3.2.3 Common Servo Drive Connection Diagram...........................................................................113
3.3The connection of System and encoder...............................................................................................116
3.3.1 Interface Signal Table..............................................................................................................116
3.3.2 Signal Description................................................................................................................... 116
3.4 The Main Shaft Interface of System...................................................................................................117
3.4.1 Interface Signal Table..............................................................................................................117
3.4.2 Signal Description................................................................................................................... 117
3.5 RS232 Serial Communication Interface.............................................................................................117
3.6 CAN bus communication interface.................................................................................................... 118
3.7 RS485 serial communication interface.............................................................................................. 118
4 Machine Control I/O Interface.............................................................................................................. 118
4.1 Input Interface.....................................................................................................................................118
4.1.1 Signal Table of Input Interface................................................................................................118
4.1.2 Wiring Principle of Input Interface................................................................................................. 119
4.2 Output Interface..................................................................................................................................120
4.2.1Signal Table of Output Interface.............................................................................................. 120
4.2.2 Wiring Principle of Output Interface...................................................................................... 121
ⅣAPPENDIX....................................................................................................................................................... 121
User Parameter.......................................................................................................................................................121

1
PartⅠGENERAL
1. General
TSNC-YH-A1M is our self-developed CNC milling system。TS1NC-YH-A1M has the following technical
characteristics:
1. 32-bit CPU, FPGA and hardware interpolation technology, high-speed μm level control.
2. Using eight circuit boards, high integration, reasonable structure of the whole process, strong
anti-interference ability, high reliability.
3. 8.4-inch LCD color display with 800 × 600 screen resolution Chinese display, friendly interface, easy to
operate.
4. Adjustable acceleration and deceleration, can be equipped with stepper drives or servo drives.
5. System front panel has a U disk interface and UART serial ports. Programs, parameters, data storage and
system software upgrades can be achieved by using U disk .
6. Improved self-diagnostic function; Internal and external real-time status display; Immediately abnormal
alarm.
7. Tool path graphic display, full Chinese user interface, Completed help information, more convenient
operation.
8. Convenient variable electronic gear ratio.
9. Open PLC, provides debugging software to meet the requirements of the secondary development of
machine tool manufacturers.

2
Part ⅡPROGRAMMING
1. Programming Overview
1.1 Interpolation
Interpolation: When machining, the tool along a straight line or circular arc shape of the workpiece
constitution and Movement position calculation function
Linear interpolation: the tool along a straight line, as shown in Fig.1-1:
Fig. 1-1
Circular interpolation: Tool movement along an arc, Fig. 1-2:
Fig. 1-2
Helical interpolation: a non-circular interpolation axis circular interpolation with other axes move
synchronously by specifying the form helical path, as shown in Fig. 1-3:

3
Fig. 1-3
Where in the instructions G01, G02, G03 called preparation function for which interpolated motion control
machine tool and control the machine by location coordinates specified in the program complete interpolated
motion.
NOTE:
Some machines are mobile workstations instead of tool movement. This specification are assumed to move
the tool relative to the workpiece.
1.2 Feed Function
Specify the feed rate for the feed functions, including rapid traverse and cutting feed. You can use the actual
value of the specified feed rate represented by F.
Format:
F○○○○;
Units generally "mm / min" or "mm / r". If you specify the tool to 150mm / min speed feed movement, the
programming format is: F150.0.
When an instruction to quickly locate G00, the system quickly moving at the speed parameter settings. F
instruction is invalid. As shown in Fig. 1-4:
Fig. 1-4
1.3 Spindle Function
When cutting the workpiece relative to the workpiece speed tool called cutting, CNC machine tool spindle
speed to instruction cutting. The relevant feature called the spindle speed spindle function.
Format:
S ○○○○;

4
Spindle speed is generally selected based on cutting speed, the formula is:
Where: D is the tool diameter, Vc is the cutting speed.
The spindle speed override (override) switch on the CNC operator panel, It can be in the process of the
spindle speed to be adjusted. As shown in Fig. 1-5:
Fig. 1-5
1.4 Tool Function
When drilling, boring, milling and other processing, you must select the appropriate tool. To assign a number
to each tool, command different numbers in a program, you select the appropriate tool.
In the machining center T code is typically used in conjunction with the MO6. When the 1st bit when
specified as:
Position the tool magazine 01 positions, the T01 can be selected by an instruction that the tool, which is
called the tool function.
Format:
T ○○;
1.5 Accessibility
Start command machine components and stop operations function is called auxiliary functions.
Typically, the function specified by M codes. Sports instruction and auxiliary function commands can be
executed simultaneously in the same block.
For example: When the instruction M03, the spindle speed specified spindle clockwise.
2 The Basic Structure of Program
Program is a set of instructions which is sent to CNC for running. Program guides tool moving along
straight or circular at a certain speed, and spindle motor rotate or stop according the command.
2.1 Program
Program is made of multiple blocks which is a set of single step instructions, and block is the basic unit of
processing program. Block is composed of one or more words and is end by end mark (EOB,ISO code is LF,
ELA code is CR, screen displays. The basic structure of program is as follows.
Chart 2-1 Program for Example

5
O0001;
Program number
N01 G91 G28 Z0;
Relative way Z axis to return
reference
N02 G28 X0 Y0;
Relative way X 、Y return to
reference position
N03 T01 M06;
Change tool 01
N04 G90 G54 G00 X0 Y0 S1000 M03;
Absolute programmatically,G54
coordinate origin is programming
origin,quick positioning to X0 Y0,the
speed of the spindle at 1000r/min
clockwise
N05 G43 Z100.0 H01 M08;
Establish tool length
compensation,coolant on
N06 G98 G81 X0 Y0 Z-5.0 R3.0 F120;
Establish fixed drilling cycle,
depth of hole 5 mm
N07 X12.5 Y-12.5;
Drill the second hole
N08 G80;
Cancel fixed cycle
N09 M05 ;
Stop spindle,coolant off
N10 M05 ;
coolant off
N11 M30;
End of program,return the origin
of program
2.2 Words and Address
Word is the basic constitute element of block. It is composed of address character and the number behind
(sometime has +, - in the front of number).
Address is one of A~Z, and it rules the meaning of number on the behind.
Chart 2-2 Basic Address

6
function
address
meaning
Program
number
O
Program number
Sequence
number
N
Sequence number
Prepare
function
G
Assign operation conditions(line
circular)
Size word
X,Z,U,W
Axis movement orders
R
Circular arc radius
I,J,K
Arc center coordinates
Feedrate
F
Feedrate assign
Spindle
function
S
Spindle speedassign
Tool function
T
Tool number assign
Auxiliary
function
M
Control of machine tool in
ON/OFF assign
pause
P,U,X
Time of pause assign
Tool offset
H,D
Number of tool offset assign
Program
number assign
P
Subprogram number assign
Times of repeat
P
Repeat times of subprogram
parameters
P,Q,R
Sequence number specified
repeat part
2.3 Basic Range of Address and Command
Basic range of address and command are as follows.
Chart 2-3 Basic Range of Address and Command
function
address
Input (mm)
Program number
O
1~9999
Sequence number
N
1~9999
Prepare function
G
0~99
Size words
X,Z,U,W,I,
J,K,R
±9999.999 mm
Feed every minute
F
1~15.000
mm/min
Spindle function
S
0~9999
Tool function
T
0~9932
Auxiliary function
M
0~99

7
pause
X,U,P
0~9999.999 sec.
Program number
assign,times of repeat
P
1~9999
Tool offset
H,D
9999.999
Sequence number
P,Q
1~9999
2.4 Program Number and Block
Sequence number is used for distinguishing number of every blocks. Program number is used for
distinguishing the number of every program. Sequence number is represented for Nxx, and is composed of O and
following four numbers.
Program is begin with program number and is end of M30 or M99. Basic structure of block is as follows:
Table 2-4
1
2
3
4
5
6
7
8
9
10
1
1
N
G_
X
_
Y
_
Z
_
I
_ J_
K_
S_
F_
T
_
M_
;
Seq
uence
number
Prep
are
funct
ion
Size word
Spind
le
functi
on
Feed
funct
ion
To
ol
fu
nction
Auxi
liary
funct
ion
E
nd
m
ark
2.5 Main Program and Subprogram
When the same operation mode appears many times in a program, you can put this same mode into a
program which is regarded as a subprogram. The original program is the main program. Under normal
circumstances, the machine tool run according to the instruction from the main program. But when encountered
command about calling subprogram in main program, system will run the subprogram. When encountered
command about returning to the main program, system will return to the main program.
format:
O0000;subprogram number
……
……
M99; end of subprogram
call subprogram format:
M98 P □□□ OOOO;

8
M30;
"□□□" means times of calling subprogram, "OOOO" means program number. Subprogram is called only one
time when you do not rule times. The subprogram which is called by main program is the first subprogram. The
structure is as follows.
Fig.2-1
2.6 End of Program
If system detects the end of the program code: M02, M30 or M99, program will over in the process of
running program.
If M02 code, the program ends but not return to the beginning. If M30, the program will return the beginning
(automatic mode).
If M99, M02 and M30 are at the end of the subprogram, system will returned to the program which calls
subprogram and continue running the next block. If at the end of the subroutine, system will returned to the
calling subprogram in the program.
In order to meet the requirements of processing, we can inserts pause in the block. When running M00 code,
program will pause, and press cycle start to continue the next line. M01 for selecting stop, the function the same
as the M00, but only M01 is effective when the switch on the operation panel is fully open.
3 Programming Basics
3.1 Control Shaft
3.1.1 Number of Control Shaft
Table 3-1 Axis Milling Machine Control System
Basic controlled axes
3-axis(X、Y、Z)
Substantially simultaneously controlled axes
6-axis(X、Y、Z)
3.1.2 Axis Name
Name three basic axes X, Y, and Z. Provisions parallel to the spindle (transfer cutting forces) of the tool axis
as the Z axis motion, take the tool away from the workpiece in the direction is positive (+ Z). X-axis is horizontal
and perpendicular to the Z axis and parallel to the clamping surface of the workpiece. When the Z-axis is
horizontal, the workpiece viewed in the direction along the rear end of the tool spindle, the right direction is
positive X's. The positive direction of the tool relative to the workpiece movement is concerned. In determining
the X, Z-axis positive direction, the right-handed rectangular Cartesian coordinate system can determine the
positive direction of Y-axis, That is in the ZX plane, from the + Z to + X, the right screw should move forward
along the + Y direction. Right-handed Cartesian coordinate system shown in Fig. 3-1:

9
Fig. 3-1
3.2 Setting Unit
3.2.1 Minimum Setting Unit and Minimum Travel Unit
1) Minimum setting unit
2) Minimum setting minimum unit by the amount of movement of the tool command input, these minimum
unit in millimeters (mm), inches (inch) are given.
3) The minimum mobile unit
4) Enter the smallest mobile unit to the machine in millimeters, inches or degrees, may be any one of the
following combinations.
Table 3-2
Input / Output
Minimum setting
unit
Smallest mobile
unit
Feed
shaft
Mm input, mm output
0.001mm
0.001mm
Inch input, mm output
0.0001inch
0.001mm
Mm input inch output
0.001mm
0.0001inch
Inch input, inch output
0.0001inch
0.0001inch
NOTE:
The rotary axis unit is not in English / metric to convert.
3.3 Coordinate System
3.3.1 Reference Point
On CNC machine tools, there is a special place, usually the tool change or set the coordinates in this position,
this position is called the reference point. Reference point is a fixed point of the machine by the machine tool
factory setting coordinate system. Reference point return, the tool can easily be moved to that location. Reference
point under normal circumstances CNC milling system coincides with the machine zero.
3.3.2 Machine Coordinate System
A specific point on the machine as a machining datum is called the machine zero (machine zero point for
each machine is set up by the machine manufacturer). Set with machine zero as the origin of the coordinate
system is called the machine coordinate system, it is usually on each axis at the maximum limit. After the power,
perform manual reference position return to set up the machine coordinate system. Machine coordinate system,
once set, will remain unchanged until the power is turned off so far.
3.3.3 Workpiece Coordinate System
Work coordinate system is a coordinate system programmers used in programming process, it is the
program's reference coordinate system, location work coordinate system is the machine coordinate system as a

10
reference point, usually in a machine it can be set in six work coordinate system. In a point pattern on a workpiece
coordinate system as the origin of the work, said the work origin. When machining, the workpiece with the fixture
installed on the machine, then measure the distance between the origin and the machine origin work, and this
distance is called work origin offset, shown in Fig. 3-2:
Fig. 3-2
3.4 Maximum Stroke
At both ends of each axis of the machine is equipped with a limit switch to prevent removal of the tool end
point outside. Movable range of the tool is called the stroke. As shown in Fig. 3-3:
Fig. 3-3
In addition to travel outside the limit switch setting, it also can be set for each axis of maximum travel
through the soft limit parameters (1062-1064, 1068-1070).
3.5 Coordinate Value and Size
3.5.1 Absolute / Incremental Programming (G90 / G91)
There are two ways to move the tool of instruction; Absolute command and incremental command. In the
absolute command of, X_Y_ Z is programmed end point coordinate values;
Format:
G90 X_ Y_ Z_;Absolute command
Table of contents
Popular Control System manuals by other brands

Reliance Foundry
Reliance Foundry R-1009-12 Installation

Alber
Alber E-Motion ECS Instructions for use

Rockwell Automation
Rockwell Automation Allen-Bradley CENTERLINE 2500 installation instructions

GRASS VALLEY
GRASS VALLEY Creative Grading user guide

VALTIR
VALTIR Triton Barrier TL-2 Assembly manual

Siemens
Siemens Synco living operating instructions