Adtech ADTECH9 Series Owner's manual

ADTECH9 Series
CNC Programming Manual

Basic Information
This Manual is written byAdtech (Shenzhen) Technology Co., Ltd.
This Manual is mainly written by Tang Xiaobing, Yao Lei and Xu Yuwen.
This manual was typeseted on July 21, 2018, and the project number is applicable for all the machine control
projects of CNC9 series.
Copyright
Adtech (Shenzhen) Technology Co., Ltd. (Adtech hereafter) is in possession of the copyright of this manual.
Without the permission of Adtech, the imitation, copy, transcription and translation by any organization or
individual are prohibited. This manual doesn’t contain any assurance, stance or implication in any form.
Adtech and the employees are not responsible for any direct or indirect data disclosure, profits loss or cause
termination caused by this manual or any information about mentioned products in this manual. In addition,
the products and data in this manual are subject to changes without prior notice.
All rights reserved.
Adtech (Shenzhen) Technology Co., Ltd.

Precautions and Notes
※Transport and storage
Do not exceed six layers for products packing cases piling
Forbid to climb, stand, or place heavy items on products packing cases
Do not use the cable connecting with the product to drag or move products
Non-collision, non-scratching on the panel and display screen
Prevent the moisture, exposure and rain affected packing cases
※Open Package Inspection
Confirm products after opening package
Check whether damages exist during the transportation
Confirm whether parts are complete or have damages by comparison with list
Contact us promptly if products models are inconsistent, parts are missed, or damages during shipping are
found etc.
※Wiring
Professional personnel with corresponding capability is must for participation in wiring and inspection
Reliable grounding is must for products, with less than 4Ω ground resistance, and neutral wire (neutral wire) is
not allowed to substitute grounding wire
Wiring should be correct and secure, to avoid the consequences of product failure or unexpected outcome
Surge absorption diode connecting with product should be linked upon the stipulated direction; otherwise the
product may be damaged
The power supply of the product should be cut before plug-in & plug-out or opening the cabinet.
※Overhauling
Power off prior to overhauling or replacement of components
Check defects when short circuit or overload occurs, and restart it after troubleshooting
Do not connect power frequently and at least 1 minute interval after power-off for re-connection of power.
※Miscellaneous
Do not open the cabinet without permission
Disconnect the power when long term stand-by
Avoid dust and iron powder from getting into controller
If non-solid-state relay is used as output relay, freewheel diode should be connected in parallel on the relay
coil.
Check whether connected power satisfies the requirement, in order to avoid burning the controller
The life span of controller is associated with environmental temperature; install cooling fan in the over-heat
processing field.

ADTECH9 Series CNC Programming Manual
The working temperature range is between 0℃~60℃
Avoid using it in the environments with high temperature, humidity, dust, or corrosive gas.
Provide rubber rails for buffering in the place with strong vibration.
※Maintenance
The following items can be conducted for daily and regular inspection, under the general usage conditions
(environmental conditions: daily average temperature: 30℃, load-carry duty: 80%, and operational rate: 12
hours per day)
Daily inspection
Daily
Confirm environmental temperature, humidity, dust and
foreign matter;
Check whether there are abnormal vibration and sounds
Check whether vents are blocked by yarns
Regular
inspection
One year
Check whether solid components are loose
Check whether terminal blocks are damaged

Contents
CONTENTS ........................................................................................................................................................... - 0-
1. OVERVIEW ............................................................................................................................................. - 0 -
1.1 SPECIFICATION............................................................................................................................................. - 0-
1.1.1 Basic functions.............................................................................................................................- 0 -
1.1.2 Auxiliary functions ......................................................................................................................- 1 -
1.1.3 Spindle functions .........................................................................................................................- 1 -
1.1.4 Tool functions ..............................................................................................................................- 2 -
1.2 GCODES LIST............................................................................................................................................... - 2-
1.3 PROGRAM STRUCTURE.................................................................................................................................. - 4-
1.3.1 Program composition ..................................................................................................................- 4 -
1.3.2 Main program and subroutine ....................................................................................................- 7 -
1.3.3 Modal and non-modal function...................................................................................................- 8 -
1.4 MOTION DIRECTION NAMING OF CONTROL AXES ............................................................................................... - 9-
2. SYSTEM PROGRAMMING ..................................................................................................................... - 12 -
2.1 PREPARATION FUNCTIONS (G FUNCTION) ........................................................................................................ - 12 -
2.1.1. G90 G91 absolute and relative programming ...........................................................................- 12 -
2.1.2. Rapid positioning (G00).............................................................................................................- 13 -
2.1.3. Linear interpolation (G01) .........................................................................................................- 14 -
2.1.4. Arc interpolation (G02, G03)......................................................................................................- 15 -
2.1.5. Pause instruction (G04) .............................................................................................................- 19 -
2.1.6. Plane selection (G17-G19) .........................................................................................................- 19 -
2.1.7. Machine tool coordinate system (G53)......................................................................................- 20 -
2.1.8. Programmable workpiece coordinate system (G92)..................................................................- 21 -
2.2 GFUNCTION RELATED TO REFERENCE POINT...................................................................................................... - 22 -
2.2.1. Auto return to reference point (G28).........................................................................................- 22 -
2.2.2. Auto return from reference point (G29).....................................................................................- 24 -
2.2.3. Reference point return checking (G27) ......................................................................................- 25 -
2.2.4. Local coordinate system (G52)...................................................................................................- 26 -
2.3 TOOL COMPENSATION GFUNCTION................................................................................................................ - 28 -
2.3.1. Tool length compensation (G43, G44,G49)................................................................................- 28 -
2.3.2. Tool radius compensation (G40, G41, G42) ...............................................................................- 31 -

ADTECH9 Series CNC Programming Manual
2.3.3. G41/G42instruction and I, J, K designation ...............................................................................- 45 -
2.3.4. Notes for tool radius compensation ..........................................................................................- 53 -
2.4 HOLE PROCESSING FUNCTION........................................................................................................................ - 57 -
2.4.1. High-speed deep-hole drilling cycle (G73) .................................................................................- 62 -
2.4.2. Left-hand Thread tapping cycle (G74) .......................................................................................- 63 -
2.4.3. Fine boring cycle (G76)..............................................................................................................- 64 -
2.4.4. Drilling cycle (G81) ....................................................................................................................- 66 -
2.4.5. Drilling cycle, rough boring cycle (G82) .....................................................................................- 66 -
2.4.6. Deep-hole drilling cycle (G83)....................................................................................................- 67 -
2.4.7. Tapping cycle (G84) ...................................................................................................................- 68 -
2.4.8. Boring cycle (G85)......................................................................................................................- 70 -
2.4.9. Boring cycle (G86)......................................................................................................................- 71 -
2.4.10. Back boring cycle(G87) ..............................................................................................................- 73 -
2.4.11. Boring cycle (G88)......................................................................................................................- 74 -
2.4.12. Boring cycle (G89)......................................................................................................................- 74 -
2.5 CONVERSION OF GCOMMAND...................................................................................................................... - 78 -
2.5.1. Program coordinates rotation G68 and G69..............................................................................- 78 -
2.5.2. G51.1and G50.1 mirroring.........................................................................................................- 80 -
2.6 PROBE GCOMMAND .................................................................................................................................. - 84 -
2.6.1. G31.1 .........................................................................................................................................- 84 -
2.6.2. G31.2 .........................................................................................................................................- 84 -
2.6.3. G31.3 .........................................................................................................................................- 84 -
2.7 MACHINE COORDINATE POSITIONING COMMANDS ............................................................................................ - 85 -
2.7.1. G53 ............................................................................................................................................- 85 -
2.7.2. G53.1 .........................................................................................................................................- 85 -
3. AUXILIARYFUNCTION........................................................................................................................... - 86 -
3.1 MCODE LIST ............................................................................................................................................. - 86 -
3.1.1. M00 program pause ..................................................................................................................- 89 -
3.1.2. M03 spindle moves clockwise (CW)...........................................................................................- 89 -
3.1.3. M04 spindle moves counterclockwise (CCW) ............................................................................- 89 -
3.1.4. M05 spindle stops......................................................................................................................- 89 -
3.2 MCOMMAND FOR INPUT SIGNAL DETECTION OUTPUT ....................................................................................... - 89 -
3.2.1. M88 input port signal detection................................................................................................- 89 -

ADTECH9 Series CNC Programming Manual
3.2.2. M89 specifies output port control .............................................................................................- 89 -
3.3 SPINDLE SPEED FUNCTION S ......................................................................................................................... - 90 -
3.4 TOOL FUNCTION......................................................................................................................................... - 90 -
4. CATEGORY B MACRO FUNCTION .......................................................................................................... - 91 -
4.1 VARIABLE INSTRUCTION ............................................................................................................................... - 91 -
4.2 MACRO PROGRAM CALL .............................................................................................................................. - 93 -
4.3 MACRO PROGRAM CALLING COMMAND .......................................................................................................... - 93 -
4.4 VARIABLE.................................................................................................................................................. - 97 -
4.5 TYPES OF VARIABLES.................................................................................................................................... - 99 -
4.6 CALCULUS INSTRUCTION ............................................................................................................................ - 101 -
4.7 CONTROL INSTRUCTION ............................................................................................................................. - 105 -
4.8 NOTES OF USING MACRO ........................................................................................................................... - 109 -
4.9 MACRO VARIABLE USER PARAMETERS SYSTEM CONFIGURATION.......................................................................... - 109 -
4.10 EXTENDED SPECIAL MACRO FUNCTIONS......................................................................................................... - 111 -
4.10.1. RCOOR read workpiece coordinates ........................................................................................- 111 -
4.10.2. RMACPOS read machine tool coordinates...............................................................................- 111 -
4.10.3. WMACPOS write machine tool coordinates ............................................................................- 111 -
4.10.4. SPEEDS set interpolation speed ...............................................................................................- 111 -
4.10.5. SPEEDA set positioning speed..................................................................................................- 112 -
4.10.6. MOVEABS single axis moves to the machine’s position...........................................................- 112 -
4.10.7. MOVEREL relative moved position of single axis .....................................................................- 112 -
4.10.8. MOVEASA two axes move to the machine’s position (positioning or interpolation) ...............- 112 -
4.10.9. MOVERSA relative moved position of two axes (positioning or interpolation)........................- 113 -
4.10.10. MOVEASB three axes move to the machine’s position (positioning or interpolation) .............- 113 -
4.10.11. MOVERSB Relative Position of Motion of Three axes ..............................................................- 113 -
4.10.12. MOVEASC absolute position of motion of multiple axes (positioning or interpolation) ..........- 114 -
4.10.13. MOVERSC relative position of motion of multiple axes (positioning or interpolation) ............- 114 -
4.10.14. WRITEOUT Write Physical Output ...........................................................................................- 115 -
4.10.15. WRITELED Write Physical LED..................................................................................................- 115 -
4.10.16. READOUT Read Physical Output..............................................................................................- 115 -
4.10.17. READIN Read Physical Input ....................................................................................................- 115 -
4.10.18. READLED Read Physical LED ....................................................................................................- 115 -
4.10.19. MOVEWAITIN Search and Wait for the Input Signals in Motion..............................................- 116 -

ADTECH9 Series CNC Programming Manual
4.10.20. WAITMOVE Wait for the End of the Motion of All Axes...........................................................- 116 -
4.10.21. WAITMOVED Wait for the End of Motion of All Axes ..............................................................- 116 -
4.10.22. WRITEPLC Write Physical or Auxiliary Output Point ................................................................- 117 -
4.10.23. READPLC Read Physical or Auxiliary Output Point ...................................................................- 117 -
4.10.24. WAITPLC Timeout Waiting for Read of Physical or Auxiliary Input Point ................................- 117 -
4.11 SPECIAL MCODE ..................................................................................................................................... - 117 -
4.11.1. Cancel the synchronization of all axis or switch function (M10002)........................................- 118 -
4.11.2. Process after switching Axis X to Axis A (M10003) ..................................................................- 118 -
4.11.3. Process Axis X and Axis A synchronously (M10004) ................................................................- 118 -
4.11.4. Process after switching Axis Y to Axis A (M10005) ..................................................................- 118 -
4.11.5. Process Axis Y and Axis A synchronously (M10006).................................................................- 118 -
4.11.6. Process after switching Axis Z to Axis A (M10000) ..................................................................- 118 -
4.11.7. Process Axis Z and Axis A synchronously (M10001).................................................................- 118 -
4.11.8. Process after switching Axis X to Axis B (M10007) ..................................................................- 118 -
4.11.9. M10008 Process Axis X and Axis B synchronously (M10008) ..................................................- 118 -
4.11.10. Process after switching Axis X to Axis C (M10009) ..................................................................- 118 -
4.11.11. Process Axis X and Axis C synchronously (M10010).................................................................- 118 -
4.11.12. Process after switching Axis Y to Axis B (M10011) ..................................................................- 118 -
4.11.13. Process Axis Y and Axis B synchronously (M10012).................................................................- 118 -
4.11.14. Process after switching Axis Y to Axis C (M10013) ..................................................................- 118 -
4.11.15. M10014 Process Axis Y and Axis C synchronously (M10014) ..................................................- 118 -
4.11.16. Process after switching Axis Z to Axis B (M10015) ..................................................................- 119 -
4.11.17. Process Axis Z and Axis B synchronously (M10016).................................................................- 119 -
4.11.18. Process Axis A, Axis B and Axis C synchronously (M10017) .....................................................- 119 -
4.12 SPECIAL PROGRAM SEGMENT ..................................................................................................................... - 119 -
4.12.1. M2000 .....................................................................................................................................- 119 -
4.12.2. M2203 .....................................................................................................................................- 119 -
4.12.3. M2201 .....................................................................................................................................- 119 -
4.12.4. M2202 .....................................................................................................................................- 119 -
4.12.5. M2200 .....................................................................................................................................- 119 -
4.12.6. M2205 .....................................................................................................................................- 119 -
4.12.7. M2206 .....................................................................................................................................- 119 -
4.12.8. M2207 .....................................................................................................................................- 120 -
4.12.9. M2208 .....................................................................................................................................- 120 -

ADTECH9 Series CNC Programming Manual
4.12.10. M2209 .....................................................................................................................................- 120 -
4.12.11. M2212 .....................................................................................................................................- 120 -
4.12.12. M2213 .....................................................................................................................................- 120 -
4.12.13. M2214 .....................................................................................................................................- 120 -
4.12.14. M2216 .....................................................................................................................................- 120 -
4.12.15. M2217 .....................................................................................................................................- 120 -
4.12.16. M2218 .....................................................................................................................................- 120 -
4.12.17. M2219 .....................................................................................................................................- 120 -
4.12.18. M2220 .....................................................................................................................................- 120 -
4.12.19. M2221 .....................................................................................................................................- 120 -
4.12.20. M2222 .....................................................................................................................................- 120 -
4.13 MCODE SEGMENT ACTIVATED BY EXTERNAL INPUT POINT............................................................................... - 121 -
4.14 AUXILIARY CHANNEL GRUN 4, 5, 6AND 7 ................................................................................................... - 121 -
5. INSTRUCTION ON CUSTOM CAM.........................................................................................................- 122 -
5.1 OVERVIEW .............................................................................................................................................. - 122 -
5.2 INTRODUCTION OF CAM INSTRUCTION INTERFACE.......................................................................................... - 122 -
5.3 CAM INSTRUCTION MENU FUNCTIONS ......................................................................................................... - 123 -
5.4 CAM INSTRUCTION CONFIGURATION FILE..................................................................................................... - 124 -
5.5 SCHEMATIC DIAGRAM OF CAM INSTRUCTION................................................................................................ - 131 -
5.6 GENERATION OF PROCESSING PROGRAMS ..................................................................................................... - 135 -
6. CAD DXF CONVERSION........................................................................................................................- 139 -
6.1 FUNCTION .............................................................................................................................................. - 139 -
6.2 KEYWORDS DESCRIPTION ........................................................................................................................... - 140 -
6.3 EXAMPLE................................................................................................................................................ - 141 -
6.4 DXF FILE MANUAL PATH PROCESSING............................................................................................................ - 144 -
7. AUTOMATIC TOOL CHANGE (ATC) .......................................................................................................- 147 -
SPINDLE........................................................................................................................................................... - 147 -
SPINDLE CABINET ............................................................................................................................................ - 147 -

1. Overview
1.1Specification
Pulse equivalent: (electronic gear ratio: 1:1) 0.001MM
Linkage/control axis: CNC9640 4-axis, CNC9650 6-axis, CNC9960 6-axis, CNC9810 6-axis, CNC9810E
6-axis/supporting two channels.
Program capacity: The electronic disk capacity is 4GB, and is divided into 2 zones: 2G each for Disk D and C.
RAM: 512M
Display: CNC9640, CNC9650 7” LCD 800 * 480 pixels; CNC9810, CNC9810E 8” LCD 800 * 600 pixels
CNC9960 10.4” LCD 800*600 pixels
1.1.1 Basic functions
Name
Specification
Data input method
(1) NC keyboard input
(2) U disk import
(3) Network and serial port download and upload
Edit
(1) New program
(2) Teach program
(3) Save file
(4) Programmed search
(5)Search, search row, copy row, paste row, delete row, copy segment,
delete segment
(7) Replace
File management
(1) Browse
(2)Copy
(3)Paste
(4)Cut
(5)Delete
Authority
management
(1) Superuser
(2) Operator
(3) Guest
System data
management
(1) Parameter backup
(2) Parameter recovery

ADTECH9 Series CNC Programming Manual
Name
Specification
(3) Factory reset of parameters
Auxiliary function
control
(1)M_FUNC.NC M code control macro program
(2)T_FUNC.NC T code control macro program
User configurable
items
(1) Axis (number of axis, characteristic linear rotation, return-to-zero
sequence)
(2) IO port configuration
(3) Variable name customize "SYSTABLE.csv" import
Language
(1) Simplified Chinese
(2) Traditional Chinese
(3) English: users can translate it into other languages through the
"ZIDIAN.ZD" file.
Diagnosis
(1) Input point status
(2) Output point status, and manual control
(3)Alarm information
(4) Auxiliary channel operation information
(5)System information
1.1.2 Auxiliary functions
Name
Specification
Common functions
(1) M03,M04,M05
(2) M08and M09 coolant switches
(3)M10and M11 chuck control
(4)M06 tool change command
Special auxiliary
function
(1)GRUN4, GRUN5, GRUN6, GUR7
(2)M2000, M2201 ……
(3)M10003 ……Axis dynamic switching and synchronization
(4) Input point triggered segments M2001 IN1 M2002 IN2
1.1.3 Spindle functions
Name
Specification
M03
(1) Spindle forward

ADTECH9 Series CNC Programming Manual
Name
Specification
M04
(2) Spindle reversal
M05
(3)Spindle stop
S
(1) Spindle rotating speed
1.1.4 Tool functions
Name
Specification
M06
(1)M06 Txx, two-digit tool number
1.2G codes list
G code
Group
Function
*G00
01
Positioning (rapid traverse)
G01
Linear interpolation (cutting feeding)
G02
Arc interpolation CW (clockwise)
G03
Arc interpolation CCW(counterclockwise)
G04
00
Pause, accurate stop
*G17
02
XY plane selection
G18
ZX plane selection
G19
YZ plane selection
G20
06
Imperial data entry
*G21
Metric data entry
G27
00
Return to and check reference point
G28
Return to reference point
G29
Return from reference point
*G40
07
Tool radius compensation cancel
G41
Left tool radius compensation
G42
Right tool radius compensation
G43
08
Positive tool length offset
G44
Negative tool length offset
*G49
Tool length offset cancel
G52
00
Local coordinate system setting
G53
Select machine tool coordinate system
*G54
05
Workpiece coordinate system 1
G55
Workpiece coordinate system 2

ADTECH9 Series CNC Programming Manual
G code
Group
Function
G56
Workpiece coordinate system 3
G57
Workpiece coordinate system 4
G58
Workpiece coordinate system 5
G59
Workpiece coordinate system 6
G591
Extended workpiece coordinate system 7
G592
Extended workpiece coordinate system 8
G593
Extended workpiece coordinate system 9
G594
Extended workpiece coordinate system 10
G595
Extended workpiece coordinate system 11
G596
Extended workpiece coordinate system 12
G597
Extended workpiece coordinate system 13
G598
Extended workpiece coordinate system 14
G599
Extended workpiece coordinate system 15
G65
00
Macro program command
G73
09
Deep hole drilling fixed cycle
G74
Reverse threading fixed cycle
G76
Boring fixed cycle
*G80
Cancel fixed cycle
G81
Drilling fixed cycle
G82
Drilling fixed cycle
G83
Deep hole drilling fixed cycle
G84
Taping fixed cycle
G85
Boring fixed cycle
G86
Boring fixed cycle
G87
Reverse boring fixed cycle
G88
Boring fixed cycle
G89
Boring fixed cycle
*G90
03
Absolute value programming
G91
Increment value programming
G92
01
Programmable workpiece coordinate system setting
*G98
10
Return to initial plane in fixed cycle
G99
Return to point R plane in fixed cycle

ADTECH9 Series CNC Programming Manual
Notice:
The items marked with * are the default modal values of G codes of the system;
1.3Program structure
1.3.1 Program composition
CNC processing program consists of the following parts:
Fig. 1.3.1 CNC Program Structure Diagram
Program name:
Used to mark different programs, and consists of O and four digits.
➢If the start of the program doesn’t have program name, the program segment No. of the program start
will be considered as the program name by default;
➢If the program segment No. contains five digits, the latter four digits will be used as the program
name;
➢If the latter four digits are 0, add 1 automatically to use as the program name;
➢N0 can’t be used as program name;
➢When saving the program, if both program name and program segment No. don’t exist, it is necessary
to make a program name through MDI panel.
Note:
The content in the parentheses, in which the user can specify notes, guide, etc.:

ADTECH9 Series CNC Programming Manual
➢The note doesn’t have limit on length; if the program has a long note, the axis motion will pause for a
while; therefore, if a long note is required, please put it at the place that motion pauses or without
motion;
➢If there is only one “)” without “(”, “)” will be ignored;
➢The note may have multiple lines and are separated with space;
➢During processing, the note can’t be executed.
Instruction address:
One English letter in the text of the processing program (“Address” hereinafter)
Instruction word:
Adding a number after the instruction address will constitute an instruction word.
Program segment No.:
Consist of letter N and number (≤5 digits), and can be randomly arranged.
➢The sequence of executing program segments only related to the storage position rather than program
segment No.;
➢If program segment N20 appears before program segment N10, N20 shall be executed first.
Program segment:
A program segment consists of one or several instruction word and ends with “;”;
N_ G_ X_Z_ F_ S_ T_
M_ ;
Program segment No. Preparation Size definition Feeding speed Spindle rotation Tool
change Auxiliary function
Skip symbol:
If the first character of a program segment is “/”, this program segment is conditional, i.e. skip switch. In upper
position, this program segment isn’t executed; when the skip switch is in lower position, this program segment
is executed.
Program end:
Generally, the following codes are used when program ends:
Code
Action
M30
End main program
M99
End subroutine

ADTECH9 Series CNC Programming Manual
Note:
After M30 is executed, CNC stops executing and returns to program start;
After M99 is executed, CNC returns to the program that calls this subroutine and continues executing.
File end:
If the program end doesn’t have %, CNC is reset.
Instruction word is the basic unit of program segment. Every address has unique meaning, and the following
values also have different formats and ranges, as in the Table below:
Table 4.1 Instruction Address and Range of Command Value
Function
Address
Range
Meaning
Program name
O
1~9999
Program No.
Program
segment No.
N
1~9999
Sequence No.
Preparation
function
G
00~99
Specify motion mode (linear,
arc…)
Size definition
X, Y, Z
±99999.999 mm
Coordinate position value
R
±99999.999 mm
Arc radius, corner radius
I, J, K
±9999.9999 mm
Arc center coordinate position
value
Feeding rate
F
1~100,000 mm/min
Feeding rate
Spindle rotation
S
1~4000 rpm
Spindle rotation
Select tool
T
0~99
Tool No.
Auxiliary
function
M
0~99
Auxiliary function M code No.
Tool offset No.
H, D
1~200
Specify tool offset No.
Pause time
P, X
0~65 sec
Pause time (ms)
Specify
subroutine No.
P
1~9999
To call subroutine
Repeat times
P, L
1~999
To call subroutine
Parameter
P, Q, R
P is 0~99999.999
Q is ±99999.999 mm
R is ±99999.999
Fixed cycle parameters

ADTECH9 Series CNC Programming Manual
1.3.2 Main program and subroutine
The processing programs include main programs and subroutines. Generally, NC executes the instructions of
main program; however, NC will turn to execute subroutine when executes a subroutine calling instruction,
and will return to the main program when executes the return instruction in subroutine.
When the processing program needs to run same track for several times, edit this track into the subroutine and
save in the program memory of the machine tool, and this subroutine can be called when this track should be
executed in the program.
When the main program calls a subroutine, this subroutine can call another subroutine, which is called double
nesting. Generally, the machine tool allows up to quadruple subroutine nesting. In calling subroutine
instruction, the subroutine can be repeated for 999 times.
Fig. 1.3.2 Main Program and Subroutine
Subroutine format:
OXXXX ; Subroutine name
………… ;
………… ; Subroutine content
………… ;
M99 ; Subroutine ends, and returns to previous program
Example: X100.0 Y100.0 M99;
Note:

ADTECH9 Series CNC Programming Manual
Program start should have a subroutine name specified by address O
M99 doesn’t need to appear in a program segment separately.
Subroutine call format:
M98P XXX XXXX
Note:
In the number following address P, the latter four digits are used to specify the program No. of called
subroutine, and the former three digits are used to specify the repeat times of calling.
Example:
M98 P41005; call subroutine 1005, repeat four times
G90 G00 X-75. Y50. Z53. M98 P40035; this program segment specifies the X, Y, Z axis to fast locate the
instruction position, and then call subroutine 0035 for four times.
Note:
➢If the calling time isn’t specified, the subroutine will be called only once;
➢M98 doesn’t need to appear in a program segment separately;
➢Different from other M codes, M98 and M99 won’t send signal to the machine tool when executing;
➢NC gives an alarm if can’t find the program No. specified by address P;
➢Subroutine call instruction M98 can’t be executed in MDI mode; to execute a subroutine separately,
please edit the following program in the editing mode, and execute in automatic running mode.
O×××;
M98 P××××;
M30;
1.3.3 Modal and non-modal function
G code determines the function of the command and can be classified into two types:
Non-modal G code:
G code is only valid in defined program segment
Modal G code:
G code is always valid, until next G code of same group appears.
Example: G01 and G00 are modal G codes

ADTECH9 Series CNC Programming Manual
G01X_;
Y_; G01 is valid in this range
Z_;
G00X_;
1.4Motion direction naming of control axes
This system can control the rapid traverse, feeding and interpolation of four axes. The axis direction is defined
in Cartesian coordinate system, as shown below (facing to the machine tool):
Z axis: The up and down movement of the tool relative to the workpiece is Z axis motion, with the upward
movement the positive motion and the downward movement the negative motion.
X axis: The left and right movement of the tool relative to the workpiece is X axis motion, with the rightward
movement the positive motion and the leftward movement the negative motion.
Y axis: The forward and backward movement of the tool relative to the workpiece is Y axis motion, with the
forward movement the positive motion and the backward movement the negative motion.
Spindle:
Look down to the workpiece, the clockwise rotation is spindle positive rotation and the counterclockwise
rotation is negative rotation.
A, B, C axes:

ADTECH9 Series CNC Programming Manual
The positive directions of rotation axes correspond to the positive directions of X, Y, Z axis, which are
determined according to the forward direction of right hand screw.
Notice:
The X, Y, Z, A, B, C axis motion described in this manual is the tool’s motion relative to the workpiece, i.e. it
is assumed that the workpiece coordinate system has been set.
Coordinate systems of machine tool and workpiece
Machine tool coordinate system:
The coordinate system fixed on the machine tool is created through returning to reference point after NC is
electrified every time. To select machine tool coordinate system, use G53 instruction.
Workpiece coordinate system:
When start programming, the programmer doesn’t know the position of the workpiece on the machine tool,
and usually uses a point on the workpiece as the reference point to write processing program. The coordinate
system created with this reference point is the workpiece coordinate system. When the workpiece is fixed on
the worktable of the machine tool, move the tool to specified workpiece reference point and set the coordinate
value of this point as the origin of workpiece coordinate system, and the tool will use this workpiece
coordinate system as the reference system and process according to program instruction when the system
executes the machining program. Therefore, the origin offset function of coordinate system is very important
to CNC machine tool.
This system can preset six workpiece coordinate systems (nine extended coordinate systems G591-G599 are
added in new version). Set the offset of every workpiece coordinate system origin relative to machine tool
coordinate system origin, and then use G5X (5X is the specific workpiece coordinate system number, the same
below) instruction to select. G5X are nodal instructions, corresponding to 1#~6# preset workpiece coordinate
system respectively.
This manual suits for next models
6
Table of contents
Other Adtech Controllers manuals
Popular Controllers manuals by other brands

Honeywell
Honeywell L7224A installation instructions

Burkert
Burkert 8681 operating instructions

Siemens
Siemens SIMATIC S7-1200 Getting started

NDS
NDS Dometic EM12-150 Installation and operating manual

Carrier
Carrier 40VM Series Installation and operating instructions

Linear Technology
Linear Technology LTC2950-2 manual

Plasmatronics
Plasmatronics DINGO D8040N user guide

ALLEN & HEATH
ALLEN & HEATH iDR-4 Service information

Eaton
Eaton SVX9000 Series manual

Ametek
Ametek SHZF2 SCR Series Instruction, Operation and Maintenance Manual

Tecnologic
Tecnologic Tecnologic quick start guide

Festo
Festo SPC200 Series Electronic manual