Add: F/5, Bldg/27-29, Tianxia IC Industrial Park, Yiyuan Rd, Nanshan District, Shenzhen
Postal code: 518052
Tel: 0755-26722719 Fax: 0755-26722718
Email:export@machine-controller.com
http://www.machine-controller.com
ADT-CNC4620 Programming Manual
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.
I
ADT-CNC4620 Programming Manual
Version History
Item No. First uploaded on Version No.PagesCompiled byTypeset by
XT20101227 2011-5-13 A0101 73 Yang Jipeng
XT20101227 2011-11-15 A0201 61 Shi Tingliang
Revision
Date Version/Page Result Confirmed by
Remark: above table is only for the version update of the Manual.
1. We have collated and checked this Manual strictly, but we can’t ensure that there are no error and
omission in this Manual.
2. Due to constant improvement of product functions and service quality, any products and software described
in this manual and the content of the manual are subject to changes without prior notice.
II
ADT-CNC4620 Programming Manual
Precautions
※Transportation and storage
The packaging boxes shouldn’t be stacked more than six layers
Do not climb onto, stand on or put heavy objects on the packaging box
Do not drag or convey the product with a cable connected to the product
Do not impact or scratch the panel and display
Keep the packaging box away from moisture, insulation and rain
※Unpacking and checking
Unpack and check whether the product is the one you ordered
Check whether the product is damaged during transporting
Check whether the parts are complete and intact according to the packing list
If the model doesn’t match, any accessories are missing or damaged, please contact us immediately
※Wire connection
The personnel for wire connection and checking should be qualified
The product must be grounded reliably (resistance < 4Ω) and do not use neutral wire to replace the earth wire
The wires must be connected properly and firmly to avoid failures and accidents
The surge absorption diode must be connected to the product properly, or else it will damage the product
Please cut off the power supply before inserting/removing the plug or opening the enclosure
※Checking and repairing
Please cut off the power supply before repairing or replacing the components
Check the failure if short circuit or overload occurs, and restart after eliminating all failures
Do not connect/cut off the power supply frequently; wait for at least one minute before restarting
※Others
Do not open the enclosure without permission
Please cut off the power supply if it won’t be used for a long time
Prevent dust and iron powder from entering the controller
If non-solid state relay is used for output, please connect freewheeling diode to relay coil in parallel. Check
whether the connected power supply is qualified to avoid burning out the controller
The lifetime of the controller depends on the environment temperature. If the temperature of processing field is
too high, please install cooling fan. The allowable temperature range of the controller is 0℃-60℃
Avoid using in the environment with high temperature, moisture, dust or corrosive gas
Install rubber cushion if the vibration is severe
※Maintenance
Under normal condition (environment: daily average 30, load rate 80%, running rate 12 hours every d℃ay),
please perform daily and periodic checking according to the items below.
Confirm environment temperature, humidity and
Daily checking
Periodic checking
Daily
1 year
dust
Whether there is abnormal vibration or sound
Whether the vent hole is blocked by yarn
Whether the fixed parts are loose
Whether the terminal block is damaged
electric control cabinet), etc. After CNC processing, the part program edited by the user will send
motion instructions and control instructions, while motion instructions drive the feeding of machine
tool through motor drive, and control instructions include principal axis start/stop, tool selection,
cooling, lubrication, etc. It achieves parts cutting through relative motion of tool and workpiece.
CNC programming is to write part processing program according to the dedicated programming
instructions of CNC system with the information such as part size, processing process,process
parameters, tool parameters, etc. CNC processing is that the CNC system controls the machine tool
to finish part processing according to the requirement of part processing program. The working
principle of CNC machine tool and the flow of CNC processing are shown in the figure below.
Analyze part drawing and confirm process
Write part program and enter CNC system
Check and run the program for testing
Set tool offset and coordinates
Run the processing program and process the part
Check the workpiece size, modify program or tool conpensation
Processing is finished and part is formed
Fig. 1-1 CNC Processing Flow Chart
- 1 -
ADT-CNC4620 Programming Manual
1.2. Definition of coordinate axis
CNC machine tool is shown in Fig. 1-2-1
Tailstock seat Principal axis seat Tool Too holder
Fig. 1-2-1
The system uses the right angle coordinate system constituted with X axis and Z axis. X axis is
vertical to the principal axis, and Z axis is parallel to the principal axis. The direction to the
workpiece is negative, and the direction from the workpiece is positive.
According to the relative position of the tool holder and principal axis of the machine tool, CNC
lathe has front tool holder and rear tool holder. Same programming instruction has different motion
tracks in front tool holder and rear tool holder. This system can be used in the front tool holder and
rear tool holder of the CNC lathe. Seen from the figures below, the X directions of front and rear
tool holder coordinate systems are different, while the Z direction is same. The figures and
examples in this manual use front tool holder coordinate system to describe the application of
programming.
Fig. 1-2-2 Front tool holder coordinate system Fig. 1-2-3 Rear tool holder coordinate system
1.3. Machine tool coordinate system and mechanical home
Machine tool coordinate system is the reference of CNC for coordinate calculation, and is the
intrinsic coordinate system of the machine tool. The origin of the machine tool coordinate system is
mechanical reference or mechanical home.
Mechanical home is determined by the zero switch or home switch on the machine tool, which are
usually installed at the maximum travel in positive direction of X axis and Z axis. For mechanical
home operation, the system will set current machine tool coordinates to 0 after returned to
- 2 -
ADT-CNC4620 Programming Manual
mechanical home, and create a machine tool coordinate system with current position as the
coordinate origin.
Note: If the zero switch isn’t installed on the lathe, it isn’t possible to perform home operation.
1.4. Workpiece coordinate system and program home
Workpiece coordinate system is the right angle coordinate system set on the part drawing for
programming, which is also called floating coordinate system. When the part is installed on the
machine tool, set the absolue coordinates of the current position of the tool with G50 instruction
according to the relative position of tool and workpiece, and thus create workpiece coordinate
system in the system. The current position of the tool is the program home. Generally, Z axis and
principal axis of the workpiece coordinate system coincide, and X axis is in the head or end of the
part. The workpiece coordinate is always valid once created until replaced by new workpiece
coordinate system.
Part Bar stock
Fig. 1-4
In the figure above, XOZ is machine tool coordinate system, X1O1Z1 is the workpiece coordinate
system of X axis in the head of the workpiece, X2O2Z2 is the workpiece coordinate system of X
axis in the end of the workpiece, O is the mechanical home, A is tool tip, and the coordinates of A
in above three coordinate systems are as follows:
The coordinates of point A in machine tool coordinate system (X, Z);
The coordinates of point A in X1O1Z1 coordinate system (X1, Z1);
The coordinates of point A in X2O2Z2 coordinate system (X2, Z2);
Interpolation function
Interpolation is to control two or several axes to move simultaneously. The motion track complies
with fixed mathematical relationship, constitutes two-dimensional (plane) or three-dimensional
(space) profile, and interpolation is also called profile control. During interpolating, the motion axis
is called joint axis, the movement amount, direction and speed of which are controlled
simultaneously in the entire motion process, to form desired synthetic motion track.
Only control the motion end of one axis or multi-axis, do not control the track in the motion process,
- 3 -
ADT-CNC4620 Programming Manual
and the motion control mode is called point-position control.
The X axis and Z axis of this system are linked, which is two axes linked CNC system. This system
has linear, arc and thread interpolation function.
Linear interpolation: the synthetic motion track of X axis and Z axis is the straight line from the
start point to the end point.
Arc interpolation: the synthetic motion track of X axis and Z axis is arc from the start point to the
end point, the radius is specified by R, or the circle center is specified by I, K.
Thread interpolation: X axis, Z axis or two axes motion and principal axis rotation interpolation; F
specifies the pitch of threads, which is the movement (unsigned) of the axis (X or Z) that moves
longer when the principal axis rotates for a circle in the process of thread cutting. This system can
process metric straight thread, taper thread and end thread, and the machine tool must be installed
with principal axis encoder to process threads. If the encoder isn’t installed and it is threading, the
system can’t receive signals from the encoder and can’t perform other operations. (1000 wires
encoder or above is recommended for this system)
1.5. Absolute/relative coordinate programming
Two methods are available for specify the end position of the track during programming:
1: The end position of the track is expressed in absolute coordinates and it is called absolute
coordinate programming (instruction address uses X, Z).
2: The end position of the track is expressed with the coordinate difference of end point relative to
start point and it is called relative coordinate programming (instruction address uses U, W). The
negative value of relative coordinates represents running in negative direction of the axis, while the
positive value of relative coordinates represents running in positive direction of the axis.
This system allows expressing one axis of the end position with absolute coordinates and expressing
the other axis with relative coordinates in the same block. This method is called mixed
programming.
For example: A→B linear interpolation (as in Fig. 1-5)
1.6. Conversion between imperial and metric system*
Set the unit to imperial or metric with G code (G20, G21).
System G code Minimum unit
Imperial G20 0.0001 inch
Metric G21 0.0001mm
The G code for imperial and metric switch should be placed in front of the program. Use
separate block instruction before setting the coordinate system. The unit system of the
following values changes according to the G code for imperial and metric switch.
(1) Feeding speed instruction value expressed with F.
(2) Instruction value related to position
(3) Compensation
(4) The value of one scale of the Handwheel pulse generator
(5) Movement of single step
(6) Part value of the parameter
Note:
1. When the system is electrified, the G code for imperial and metric switch is same as
before the power supply is cut off
2. In the program, do not change G20, G21
3. If the mechanical unit system is different from the input unit system, the maximum
error would be 0.5 of minimum movement unit, and the error won’t be accumulated.
4. When imperial input (G20) and metric input (21) are switched, the offset should
comply with the new setting of the input unit.
1.7. Program constitution
To complete automatic processing of the part, you need to write the part program (the program)
according to the instruction format of the CNC system, which will execute the program and
complete the controls such as machine tool feeding, principal axis start/stop, tool selection, cooling
and lubrication, and thus finish the part processing.
For example:
Fig. 1-7
- 5 -
ADT-CNC4620 Programming Manual
O0001; (program name)
G0 X100 Z50; (quickly locate point A)
M12; (clamp the workpiece)
T0101; (replace tool #1 and execute tool #1 offset)
M3 S600; (start the principal axis, and set the principal axis rotation to 600rpm)
M8 (coolant on)
G1 X50 Z0 F600; (approach point B at the speed of 600mm/min)
W-30 F200; (cut from point B to point C)
X80 W-20 F150; (cut from point C to point D)
G0 X100 Z50; (quickly back to point A)
T0100; (cancel tool offset)
M5 S0; (stop principal axis)
M9; (coolant off)
M13; (release workpiece)
M30; (program ends, principal axis/coolant off)
%
After above program, the tool will have a track of A→B→C→D→A.
1.8. General structure of program
The program consists of several block started with “OXXXX” (program name) and ended with “%”,
while block consists of several instruction words started with block number (can be omitted),
changed line with “CR” and ended with “LF”. The general structure of a program is shown in Fig.
1-3-2 below:
Instruction word Program name
Block end Block switch symbol
Block No. Block
Program end symbol
Fig. 1-8 General Program Structure
1) Program name
To identify the programs, every program has a name consists of instruction address O and
four digits later in the start of the program. This system can save up to 9999 programs,
and the program names can’t repeat.
□□□□
○
- 6 -
ADT-CNC4620 Programming Manual
Program No. (0000~9999, leading zero can’t be
omitted)
Instruction address O
2) Instruction word
Instruction word is the basic instruction unit for CNC system to complete the control
function. Instruction word consists of one English letter (instruction address) and later
digits (instruction value, signed or unsigned). Instruction address regulates the meaning of
following instruction value. In different combinations of instruction word, same
instruction address may have different meanings.
X
1000
X
-1000
Instruction address Instruction value Instruction address Instruction value
Instruction word Instruction word
3) Block switch symbol, block No. and block
A program consists of several blocks and is executed in blocks. Generally, a block is
executed only the previous block has been executed. Blocks are separated with “;” or “*”,
and “;” is used in this manual. A block consists of several instruction words, and is started
with block No. and ended with “;” or “*”.
For example: block may have “/” symbol in the front, which is called block switch symbol
4) When the program is run automatically, if the switch function is enabled, the program will
execute next block automatically when running to this block. If the switch function isn’t
enabled, this block will be executed. The option of switch function is in the auxiliary interface
of main menu. This function won’t be saved after power off, and it is disabled by default after
initialization.
N0100 G0 X200 Z300 ;
/
Block end symbol
Block No.
Block switch symbol
5) Block No.
N0000~N9999; the leading zero can be omitted. Block No. can be omitted, but the target
block for program call and switch must exist. The sequence of block No. may be random,
and the block No. in latter part doesn’t need to be larger than previous number. For the
convenience of reference, the line No. is usually arranged according to certain increment.
During manual editing, it is possible to determine whether insert line No. increment
automatically through No. 47 comprehensive parameter. The initialized value is 0, i.e. do
not insert line No. automatically.
6) Program end symbol
The program is started from program name and ended with “%”, which is the end symbol
of the program file. During communicating, “%” is the end symbol and start symbol.
- 7 -
ADT-CNC4620 Programming Manual
1.9. Main program and subroutine
To simplify the programming, if same or similar processing track and control process need to be
used for several times, the program instructions of this part can be edited to independent program
for calling. The program that calls other programs is called as main program, and the program being
called (ended with M99) is called as subroutine. Both subroutine and main program occupy system
capacity and storage space. Subroutine also must have independent program name, and can be
called by any other main proram or run independently. When subroutine ends, it returns to the main
program and continues the execution. The system supports nine layers nesting, i.e. a subroutine can
call other subroutines, as shown in Fig. 1-9 below.
Call Return
Main program Subroutine
Fig. 1-9
- 8 -
ADT-CNC4620 Programming Manual
2. M S F T Instruction
2.1. Auxiliary function (M code)
M instruction consists of instruction address M and later 1~2 digits, and is used to control the flow
of executing program or output signals to machine tool.
Instruction value (00~99, leading value can be omitted)
Instruction address
One block only contains one valid M instruction. If a block has two or more M instructions, the
last M instruction is valid.
If M instruction and the instruction word that executes moving function are in the same block, the
sequence follows:
If M instruction is M00, M30, M98 and M99, execute M instruction after moving;
When M instruction outputs signal to the machine tool, execute M instruction while moving.
M Instructions List
Instruction Function Remark
M00 Program pauses
M30 Program ends
M98 Subroutine calling
M99 Return from subroutine
M03 Principal axis forward rotation
M04 Principal axis reverse rotation
*M05 Principal axis stop
M08 Coolant on
*M09 Coolant off
M10 Tailstock forward
M11 Tailstock backward
M12 Chuck clamped
M13 Chuck released
M32 Lubricant on
*M33 Lubricant off
Functions are interlocked, and state is
Functions are interlocked, and state is
Functions are interlocked, and state is
Functions are interlocked, and state is
Functions are interlocked, and state is
State isn’t retained
maintained
maintained
maintained
maintained
maintained
- 9 -
ADT-CNC4620 Programming Manual
M40 Gear position speed setting output off
M41 First gear speed output
M42 Second gear speed output
M43 Third gear speed output
M44 Fourth gear speed output
M88 Check the signa of specified input pin Allow specifying effective input voltage level
M89 Control the switch of specified output
pin
Allow specifying output voltage level
Note: the instructions marked with “*” are valid after electrified.
After the system executed the M instruction that output signal to machine tool, delay for a period
and then execute following instruction word or block. The delay time is set by the system
parameter M code waiting time.
M code starts executing
Delay time
Start executing following instruction word or block
2.1.1. Subroutine call M98
Instruction format:
M98 P○○○
□□□□
Subroutine No. (0000~9999) being called. If
the calling time isn’t entered, the leading 0
of the subroutine No. can’t be omitted; if the
calling time is entered, the subroutine No.
must contain four digits.
If the calling time (1-999) is 1, it isn’t required to
enter
Instruction function: after other iinstructions of current block are executed, the system
won’t execute next block, but to execute the subroutine specified by P. The
subroutine can be executed for 999 times at most. In MDI mode, the
subroutine can’t be called.
2.1.2. Return from subroutine and return to main program M99
- 10 -
Instruction format: M99 P○○○ (return from subroutine)
Instruction function: when the called subroutine is finished, return to the block specified
by P in the main program and continue to execution; if P isn’t entered,
return to the next block of M98 instruction that calls current subroutine
in the main program. If M99 is used in the end of the main program (i.e.
current program isn’t called and executed by other programs), current
program will execute repeatedly. M99 iinstruction is invalid in MDI
mode.
ADT-CNC4620 Programming Manual
Call Return
Main program Subroutine
Fig. 2-1-1 Returning from Subroutine
Call Return
Main program Subroutine
Fig. 2-1-2 Returning to Main Program
- 11 -
ADT-CNC4620 Programming Manual
The system can call nine layers subroutine, i.e. a subroutine can call other subroutines (as
shown in the figure below)
Fig. 2-1-3 Program Nesting Calling
2.1.3. Principal axis control M03, M04, M05
Instruction function: M03 or M3:Principal axis forward rotation;
M04 or M4: Principal axis reverse rotation;
M05 or M5: Principal axis stop
M05 output is valid when the system is electrified, and executes M03 or M04 at this
moment. M03 or M04 output is valid and maintains, and cancels M05 output at the same
time (output is invalid); when M03 or M04 output is valid, execute M05, cancel M03 or
M04 output, M05 output is valid and maintains. The interlocking of principal axis and
chuck can be selected through #022 management parameter. The default setting is
MFUNC(L)1, i.e. not interlocked. MFUNC(L)2 is interlocked, User-Def is user-defined
M code. The parameter setting requires restarting the system.
Note: when the system is stopped in emergency, cancel M03 and M04 output, and M05
output is valid.
2.1.4. Coolant control M08, M09
Instruction function: M08 or M8: cooling pump open;
M09 or M9: cooling pump closed
After the system is electrified, M09 is valid, i.e. M08 output is invalid. Execute M08,
and M08 output is valid, cooling pump opens; execute M09, and cancel M08 output,
- 12 -
ADT-CNC4620 Programming Manual
cooling pump closes. Coolant control port is determined by #075 port parameter, and
the initialized value is OUT4.
Note 1: when the system is stopped in emergency, cancel M08 output.
Note 2: M09 doesn’t have corresponding output signal, and M08 output is canceled when
M09 is executed.
2.1.5. Tailstock control M10, M11
Instruction function: M10: tailstock forward.
M11: tailstock backward
After the system is electrified, both M11 and M10 do not have output; execute M10,
M10 output is valid, cancel M11 output, and tailstock forwards; execute M11, M11
output is valid, cancel M10 output and tailstock retreats.
M10 and M11 can’t be valid at the same time.
Note 1: when the system is reset or stopped in emergency, the output states of M10
and M11 won’t change.
2.1.6. Chuck control M12, M13
Instruction function: M12: chuck clamped;
M13: chuck released.
After the system is electrified, both M12 and M13 have no output; execute M12, M12
output is valid, and cancel M13 output; execute M13, M13 output is valid, and cancel
M12 output. M12 and M13 can’t be valid simultaneously. Chuck locking port is
OUT8 by default, and chuck release is OUT9. When chuck is locked, OUT8 output is
valid; when chuck is released, OUT9 output is valid. External input control port is
IN12. The interlocking of chuck and principal axis is selected through #022
management parameter. MFUN(L)1 is not interlocked, and MFUNC(L)2 is
interlocked. M12 and M13 are released through macro program. The user can
customize. After parameter #022 is changed to User-Def, it is realized by writing the
macro program of M code.
Note 1: When the system is reset or stopped in emergency, the output states of M12
and M13 won’t change.
Note 2: chuck can be controlled with external input signal.
2.1.7. Lubricant control M32, M33
Instruction function: M32: lubricant pump open;
M33: lubricant pump closed
After the system is electrified, M33 is valid, i.e. M32 output is invalid. Execute M32,
M32 output is valid, and lubricant pump opens; execute M33, cancel M32 output, and
lubricant pump clodes; lubricant output port is specified by #075 port parameter; the
default option is OUT5.
Note 1: when the system is stopped in emergency, M32 output is invalid;
Note 2: M33 doesn’t have corresponding output signal; cancel M32 output when M33
is executed;
- 13 -
ADT-CNC4620 Programming Manual
2.1.8. Program pause M00
Instruction format: M00 or M0
Instruction function: after other instructions of current block are executed, the program
pauses. Press the cycle start key to run next block.
2.1.9. Program running ends and return to program beginning M30
Instruction format: M30
Instruction function: after other instructions of current block are executed, the program
stops automatically, executes M05, M09, and the processing pieces increase by 1.
The cursor returns to the beginning of the program.
2.2. Programmable I/O instructions
2.2.1. Programmable input instruction M88
Instruction function: the user defines the function of standby input point.
Instruction format:M88 Pxx Lx Qxxxx
P is used to specify the value range of output port number 0-23.
L is used to specify the valid input level, “1” is high voltage level and “0” is low voltage level.
Q is used to specify the testing time in the unit of ms.
Note 1: if specified voltage level isn’t detected in the time specified by Q instruction, the alarm
prompts “abnormal program termination error”.
Note 2: if Q instruction isn’t specified, the system will always wait for input signal by default,
and won’t execute next instruction until the signal is valid.
Note 3: if the specified port isn’t in the range 0-23, the alarm prompts “specified port number
error”.
Note 4: if P instruction isn’t written, the alarm prompts “specified port number error”.
2.2.2. Programmable output instruction M89
Instruction function: the user defines the function of standby output point.
Instruction format: M89 Pxx Lx
P is used to specify the value range of output port number 0-23.
L is used to specify the valid output level, “1” is high voltage level and “0” is low voltage level.
Note 1: if the specified port isn’t in the range 0-23, the alarm prompts “specified port number
error”.
Note 2: if P instruction isn’t written, the alarm prompts “specified port number error”.
2.3. Principal axis function (S instruction)
S instruction consists of instruction address S and later digits, and is used to control the
rotation of principal axis.
- 14 -
ADT-CNC4620 Programming Manual
Gear position control: S _1~16 principal axis rotation is controlled by switching 16-gear BCD
code. In gear position control mode, #061 comprehensive parameter must be 1, and port
parameters #070~073 specify the output port of gear position.
Analog control: S _0~maximum rotation; in analog control mode, #061 comprehensive
parameter must be 0, and it is required to set the maximum principal axis rotation of parameter #20.
The controller will output 0~10V analog voltage on principal axis port XS8 according to this
parameter. If S instruction and the instruction word that executes moving function are in the same
block, motion instruction and S instruction are executed at the same time.
2.3.1. Principal axis rotation switching control
Instruction format: S_1~16.
Instruction function: 16 gear BCD coding position control.
2.3.2. Principal axis rotation analog voltage control
Instruction format: M03 (M04) S____
Instruction function: set principal axis rotation, the system outputs 0~10V analog voltage to
control principal axis servo or inverter, achieve stepless speed change, and the
value of S instruction is saved after power off.
For example:
Program:
O0001; (program name)
M3 S300; (principal axis forward rotation)
G0 X100 Z50; (quickly move to point A)
G0 X50 Z0; (quickly move to point B)
G1 W-30 F200; (cut from point B to point C)
X80 W-20 F150; (cut from point C to point D)
G0 X100 Z50; (quickly back to point A)
M30; (program ends, principal axis/coolant off)
%
2.3.3. Principal axis rate
If principal axis rotation analog voltage control mode is valid, the actual rotation of the principal axis
can be adjusted in 10%~150% instruction rotation range by 15 levels (change 10% every level) with
- 15 -
Loading...
+ 46 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.