adtech ADT-CNC4240 User Manual

ADT-CNC4240
Summary of Specification
Milling Machine Control System
User Manual
Add: 5th floor27-29th Bulding,Tianxia IC Industrial Park,MaJiaLong,Yiyuan Road, Nanshan
TEL:+86-755-2609 9116 2672 2719 FAX:+86-755-2672 2718
E-mail:export@adtechen.com
Http://www.adtechen.com
Adtech (Shenzhen) CNC Technology Co., Ltd.
District,Shenzhen City, China
.C:518052
Copyright Notice
The property rights of all the parts of the manual belong to Adtech (Shenzhen) CNC
Technology Co., Ltd. (Adtech for short), and any form of imitation, copying, transcription or
translation by any company or individual without the permission is prohibited. This manual
does not include any form of assurance, standpoint expression, or other intimations. Adtech
and the stuffs have no responsibility for any direct or indirect disclosure of the information,
benefit loss or business termination of this manual of the quoted product information. In
addition, the product and the information mentioned in this manual are for reference only,
and the content is subjected to change without notice.
ALL RIGHTS RESERVED!
Adtech (Shenzhen) CNC Technology Co., Ltd
1-2
1Summary of Specification
Version Upgrading Instruction
Version
Procedures
Number
XT-20061224 2.0 2009/4/22
Modification Date Instruction
The Fourth
Version
Remarks: the meanings of the four numbers in the version number are as follows:
Procedures for the project/Bank Main Version Number/ Bank Secondary Version Number/ Reservation
Notes: the above version table only refers to the version updating of the
modification of the instruction.
众为兴数控技术有限公司
Adtech Technology Cord
1-3
Contents
1 SUMMARY OF SPECIFICATION ........................................................................................1-3
1.1 P
1.2 W
RODUCTION SPECIFICATIONS
ORKING ENVIRONMENTS
..................................................................................................1-3
.............................................................................................1-3
2 HARDWARE INTERFACE DEFINITION AND DESCRIPTIONS OF CONNECTION2-3
2.1 O
2.2 T
2.2.1 E
2.2.2 P
2.2.3 N
2.3
2.3.1 M
2.3.2 D
2.3.3 D
2.3.4 M
2.3.5 A
2.3.6 I
2.3.7 RS232 T
2.3.8 USB M
2.3.9 PC USB C
2.4 E
2.4.1
2.4.2
2.4.3 S
2.4.4 S
2.4.5 IO E
PERATION PANEL
HE LAYOUT OF THE INSTALLATION
XTERNAL INTERFACE DRAWING LANS TO INSTALL SIZE
OTES INSTALLATION
NTERFACE DEFINITION
I
OTOR&DRIVER CONTROL INTERFACE
IGITAL INPUT INTERFACE
IGITAL OUTPUT INTERFACE
ANUAL CONTROL BOX INTERFACE
NALOG OUTPUT INTERFACE
NTERFACE OF SPINDLE ENCODER
RANSMISSION INTERFACE
EMORY INTERFACE TO CONNECT
OMMUNICATION INTERFACE
LECTRIC CONNECTION DRAWING
CHEMATIC SYMBOL
S
OWER PLANS TO CONNECT
P
ERVO DRIVER CONNECTION DIAGRAM TEPPER CONNECTION DIAGRAM
LECTRIC CONNECTION DIAGRAM
................................................................................................................2-3
...........................................................................................................2-3
..............................................................................................................2-3
........................................................................................................2-3
................................................................................................................2-3
.....................................................................................................2-3
.....................................................................................2-3
..............................................................................................2-3
.............................................................2-3
.....................................................................2-3
....................................................................2-3
XS5
XS8
XS1..XS4
........................................................................................2-3
....................................................................................2-3
XS6
XS7
.....................................................................................2-3
XS12
XS9
..........................................................................2-3
...........................................................................2-3
...........................................................................2-3
XS10
XS11
......................................................................................2-3
................................................................................2-3
..........................................................................................2-3
...................................................................................2-3
3 G CODE PROGRAM
3.1 B
3.1.1 M
3.1.2 M
3-3
3.1.3 T
3.1.4 F
3.1.5
3.2 P
3.2.1 G C
3.2.2
3.2.3 P
1-4
ASIC KNOWLEDGE OF PROGRAM
OTION DIRECTION AND NAME OF CONTROL AXIS
ACHINE TOOL COORDINATE SYSTEM AND WORKPIECE COORDINATE SYSTEM
HE MODE STATUS FUNCTION AND THE NON-MODE STATUS FUNCTION
EEDING
ROGRAM STRUCTURE
P
REPARATORY FUNCTIONS
NTERPOLATION FUNCTIONS
I
AUSE INSTRUCTION
.................................................................................................................................3-3
ODE OF LIST
......................................................................................................................3-3
...............................................................................................................3-3
........................................................................................3-3
....................................................................3-3
G53、G54~G599
......................................3-3
.............................................................................................................3-3
CODE
G04
G
G00、G01、G02、G03)....................................................3-3
................................................................................................3-3
.............................................................................3-3
1Summary of Specification
3.2.4 S
3.2.5
3.2.6 I
3.2.7 C
3.2.8 H
3.3 A
ELECT PLANE
OORDINATE INSTRUCTION
C
NSTRUCTIONS RELATED TO REFERENCE POINT
UTTER COMPENSATION
OLE MACHINING CYCLE
SSISTANT FUNCTION
3.3.1 M C
3.3.2 S C
3.3.3 T C
3.4 G
CODE TEMPLATE PROGRAMMING
G17、G18、G19
G53~G59、G591~G599、G92
G40、G41、G42、G43、G44、G49
G73~G89
(M,S,T)
ODE
.................................................................................................................................3-3
ODE
..................................................................................................................................3-3
ODE
..................................................................................................................................3-3
...................................................................................3-3
.....................................3-3
G27、G28、G29
................................................................................3-3
....................................3-3
...................................3-3
.................................................................................3-3
LEAD-IN RULE PROGRAMMING
(DXF
........................3-3
)
4 SYSTEM OPERATION INSTRUCTION
4.1
4.1.1 A
4.1.2 M
4.1.3 MDI
4.1.4 H
4.1.5 Z
4.2 S
4.2.1 P
4.2.2 P
4.2.3
4.2.4
4.2.5 S
4.2.6 C
4.2.7 M
4.3 I
5 PARAMETER
PERATION MODE
O
UTO MODE(HANDWHEEL,STARTUP AND PROGRAM INSPECTION
ANUAL MODE
................................................................................................................4-3
.......................................................................................................................4-3
.......................................................................................................................................4-3
ANDWHEEL OR SINGLE-STEP MODE
ERO MODE
YSTEM MENU
OSITION INTERFACE
ROGRAM INTERFACE
ARAMETER INTERFACE
P
UTTING TOOLS COMPENSATION PARAMETERS PICTURE(CUTTING TOOLS OFFSET
C
ETTING PICTURE OF THE WORKPIECE COORDINATE SYSTEM
ONTROLLER DIAGNOSIS INTERFACE (DIAGNOSING
ACRO VARIABLE VIEW INTERFACE (MACRO VARIABLE
NFORMATION ON INSTRUCTIONS IN CURRENT MODE STATUS
............................................................................................................................4-3
......................................................................................................................4-3
OSITION
P
ROGRAM
P
...........................................................................................................4-3
........................................................................................4-3
.......................................................................................4-3
.......................................................................................4-3
...........................................................................................................................5-3
............................................................................4-3
.............................................4-3
)
.....................4-3
)
.....................................................4-3
................................................................4-3
)
..........................................................4-3
)
........................................4-3
5.1 P
5.2 I
5.3
5.4 M
5.5 T
5.6 P
5.7 IO C
ARAMETER INDEX LIST
NTEGRATIVE
XIS PARAMETER CONFIGURATION
A
ANAGER PARAMETER OOL MAGAZINE PARAMETER ARAMETER OF SPINDLE
ONFIGURATION
PARAMETERS
P6.)................................................................................................5-3
.......................................................................................................5-3
P1.
P3.)..........................................................................................5-3
P5.).........................................................................................5-3
...................................................................................5-3
P2.)........................................................................5-3
P4.)................................................................................5-3
6 SYSTEM ALARMING.............................................................................................................6-3
6.1 NC P
6.2
众为兴数控技术有限公司
Adtech Technology Cord
ROGRAM EXECUTING ALARMING
SYSTEM ENVIRONMENT ALARMING
.................................................................................6-3
......................................................................................6-3
1-5
1Summary of Specification
1
by the economic costs, employs the standard G codes for programming and is widely used in the automatic equipment with length control in the products. The general specification and the maintenance of this product are described as follows:
Summary of Specification
ADT-CNC4240 is a standard controlling system for milling machines characterized
1.1 Production Specifications
Function Name Specification
Controllable
axes
Input
command
Controlled axis
Simultneous controllable axes number
Min setting unit
Min move unit
4axis (X,Y,Z,A )
4 axes linear interpolation 2 axes arc interpolation
0.001mm
0.001mm
Max instruction value
fast feedrate
feed per minute
Feed
Hand
Interpolation Location,Linear,Full cycle arc
range
feed per rotate
Auto acc and dec speed Yes
feed speed rate
Hand continuous feeding
Reference point for manual return
single step /handwheel function Yes
±9999.999 mm
X-axisY-axisZ-axis A-axis:9999mm/minmax
19999
1500
10150%
Yes
one or three axes return to return to reference point simultaneously
G00,G01,G02/G03
mm/min
mm/ratio
Operation
mode
Commissioning Trial running,single program,hand
众为兴数控技术有限公司
Adtech Technology Cord
MDI,automation,manual,single step,edit
Yes
Yes
1-1
function wheel
T
g
Coordinate
system and
pause
safety function
Memory
Program edit
Pause(sec/microsecond)
coordinate system setting
G04 X/P_
G92
Auto coordinate system setting Yes
software & hardware limit check Yes
sudden stop Yes
Total capacity: 256M bytes; 9999
program storage capacity and quantity
program edit
program number,sequence,address,
working areas; No processing
document limit
Insert,modification,delete,cancel
Yes
Character retrieving
decimal point programming Yes
Display
M,S
function
Compensation
Function
Others
function
320×240lattice 5.7inch LCD
Position screen/program edition
Yes
Cutter compensation/alarm display Handwheel adjusting/diagnosis screen
Parameter setting/image emulation
assistant function
spindle function
Tool function
Memory for cutter compensation
M Code
S0-S15 (level control) S15-S99999analog
T Code
18 sets of cutter len compensation.
Reverse gap compensation Yes
Auto halving Yes
th, radius
1-2
1Summary of Specification
Auto cutter calibrator
Designating arc radius R/central position
Electronic gear ratio Yes
1.2
Working environments
Working voltage
Working temperature
Best working temperature
Working humidity
Best working humidity
Tempering storage
Yes
24V DC(with filter)
0℃— 45℃
5℃— 40℃
10%——90%no condensation
20%——85%
0℃—50℃
Humidity storage
10%——90%
众为兴数控技术有限公司
Adtech Technology Cord
1-3
2
2.1 Operation panel
Hardware Interface Definition and Descriptions of Connection
2-4
2Hardware Interface Definition and Descriptions of
Connection
2.2
The layout of the installation
2.2.1 External interface drawing
1.X-axis、Y-axis、Z-axis、A-axis:
D type 15-core receptacle: connect stepper motor driver or AC digital servo driver.
2.XS5 Digital Input:
D type 25-core receptacle: shaft limitation and input signals of other switching value.
3.XS6 Digital Output:
D type 25-core receptacle: Output signal of switching value.
4.USB and serial interface: For file exchange between PC and CNC4240 controller
and for realizing other functions.
5.CNC4240 Controller: Using DC 24V, with power consumption of 5W.
6.XS7 Additional panel:
D type 15-core receptacle: connect handwheel.
7.XS8 Spindle:
D type 9-core receptacle: connect spindle transducer.
众为兴数控技术有限公司
Adtech Technology Cord
2-5
2.2.2
Plans to install size
2-6
2Hardware Interface Definition and Descriptions of
Connection
2.2.3 Notes installation
Installation conditions:
¾
The distribution cabinet must be dust proof, cooling liquid proof and organic solvent proof.
¾
In designing the distribution cabinet, a distance of not less than 20cm must be kept between the rear cover of the system and the machine box. It must be taken into consideration that the temperature difference between inside and outside of the cabinet shall not be more than 10°C when the temperature inside the cabinet rises.
¾
A fan shall be installed for the distribution cabinet so as to ensure the good ventilation inside.
¾
The display panel shall be installed to a position which can’t be spilled by the coolant.
¾
In designing the distribution cabinet, it must be taken into consideration that the external interference be lowered down as much as possible and interference be prevented to be sent to the system.
¾
Method to prevent interference:
In designing the systems, anti-interference measures such as shielding spatial EM radiation, absorbing dash current and filtering clutter wave of power have been taken, which can prevent external interferences to affect the system itself to some extent. To ensure the stable running of the system, the following measures must be taken in installing and connecting the system:
1. Keep CNC far from the equipment that can produce interferences (such as the frequency converter, AC contactor, static generator, HV generator and section devices of power line). At the same time, the switching power supply shall be separately connected to the filter so as to enhance the anti-interference capacity of CNC (see Figure 1-4).
2. The power supply to system shall be provided via the isolated transformer. The machine tool of the system must be grounded. CNC and the driver must be grounded via separate grounding wires.
¾
Method to constrain the interference:
To restrain the interference, the RC return circuit (0.01μF,100~200,figure 1-5) should be connected at the two ends of the AC coil in a parallel manner, and this RC return circuit should be installed to the position as close as possible to the inductive load (figure1-6); the freewheeling diode should be reversely connected to the two ends of the DC winding in a parallel manner; the surge absorber should be installed at the winding terminal of the AC motor.(figure1-7)
众为兴数控技术有限公司
Adtech Technology Cord
2-7
g
¾
To reduce the mutual interference between CNC signal cable and high-voltage cable, the following principles must be observed in wiring:
Set Cable type Cabling requirements
AC power line
A
B
C
Ac coil
Ac contactor
Ac coil(24VDC)
DC Relay(24VDC)
For cables between the System and
high-voltage distribution cabinet,
For cables between the System and millin
machine.
For cables between the System and Servo
motor driver.
position command cable
cable for cable enconder
Handwheel cable
Other shielded cables.
Bind the cables of Group A to Group B and C separately. The further Group B is from Group C, the better. Or, cables of Group A can be shielded to avoid EM interference.
Group B and A should be bounded separately or Group B be shielded. The further Group B is from Group C, the better.
Group C and A should be bounded separately or Group C be shielded. A distance of at least 10cm should be kept between Group C and B and twisted-pair cables be used.
2-8
2Hardware Interface Definition and Descriptions of
Connection
2.3
I
nterface definition
2.3.1 Motor&driver control interface(XS1..XS4)
There are four (XS1 X-axis、XS2 Y-axis、XS3 Z-axis、XS4 A-axis) ports for the driver,
whose definitions are identical. See the following figure.
Internal Electric Diagram for Pulse Output.
Line No. Definition Function
1 PU+ pulse signal+ 2 PU- pulse signal­3 DR+ direction signal+ 4 DR- direction signal-
5 ALM
6 OUT
7 ECZ+ 8 ECZ­9 PUCOM 10 24V+ 11 24V­12 ECA+ 13 ECA­14 ECB+ 15 ECB-
Servo alarm signal input X-axis: IN34、Y-axis: IN35 、Z-axis: IN36、A-axis: IN37 Servo signal output X-axis:OUT24 Y-axis:OUT25 Z-axis:OUT26 A-axis:OUT27 Encoder Z-phase input+
Encoder Z-phase input­used for single-end input driver. The internally provided 24V power supply has already
been connected to 24V terminal of the controller. Encoder A-phase input+
Encoder A-phase input­Encoder B-phase input+ Encoder B-phase input-
众为兴数控技术有限公司
Adtech Technology Cord
2-9
¾
Standard cable of Pulse wiring diagram
The standard wirings is suitable for CNC4340, CNC4240 and CNC4342 controller.
¾
Wiring to the driver of stepper motor with differential input
The ADTECH CNC driver should be used as the reference. As all ADTECH CNC drivers employ the differential input mode, which features its high anti-interference performance, it is recommended this mode be used. The wiring between CNC and the driver of stepping motor and the stepping motor is shown in the following figure.
¾
Wiring Diagram to the driver of stepper motor with single-end input
In the stepping drivers made by some companies, the cathodes of optical coupler are connected together, called co-cathode wiring method. However, this method is not suitable for CNC controller. The anodes of optical coupler can be connected together, called co-anode wiring method. To that effect, the following wiring diagram should be referred, in which PU+ and DR+ are not connected together. Otherwise, the pulse interface may be damaged.
2-10
2Hardware Interface Definition and Descriptions of
Connection
Wiring diagram to the driver of stepper motor with common anode input
¾
Connect to servo motor & driver diagram
As the differential wiring method is used in most cases, this method can be referred for the pulse section. For many servo drivers that need the 12-24V power supply, the 24V power supply provided by Pin 10 and 11 can be used. The actual wiring is subject to the model of the servo driver. If you are not sure about the wiring, please contact ADTECH without hesitation.
Note: Any two pins of PU+, PU-, DR+ and DR- cannot be connected together directly, otherwise, it may damage the pulse interface.
2.3.2 Digital input interface(XS5)
The numeric input port includes the limit signal of the hardware for each shaft. The definition is shown as follows:
Line no Interrupt No. Function
1 IN0
众为兴数控技术有限公司
Adtech Technology Cord
X-axis zero
2-11
2 IN1 3 IN2 4 IN3 5 IN4 6 IN5 7 IN6 8 IN7 9 IN8 10 IN9 11 IN10 12 IN11 13 IN12 14 IN13 15 IN14 16 IN15 17 IN16(XLMT-) 18 IN17(XLMT+) 19 IN18(YLMT-) 20 IN19(YLMT+) 21 IN20(ZLMT-) 22 IN21(ZLMT+) 23 IN22(ALMT-) 24 IN23(ALMT+)
25 INCOM
Y-axis zero Z-axis zero A-axis zero Cutter calibrator position check Safe signal check input System voltage alarm input spare input spare input spare input System feed alarm input spare input spare input spare input spare input spare input X-axis negative limit(standby IN32) X-axis positive limit(standby IN33) Y-axis negative limit(standby IN34) Y-axis positive limit(standby IN35) Z-axis negative limit(standby IN36) Z-axis positive limit(standby IN37) Z-axis positive limit(standby IN37) A-axis positive limit(standby IN39) INCOM(24+
provided by internal or external power supply
12V+)Input public interface access
2-12
The digital input concise internal circuit
2Hardware Interface Definition and Descriptions of
Connection
Photoelectric Switch Wiring Diagram
+Terminal is for the anode of power supply of the approaching switch, -Terminal is for the grounding wire of the approaching switch and the OUT terminal is for the output signal. For regular approaching switches, the operating voltage should be 10-30V, with NPN output. The photoelectric switch is also applicable.
众为兴数控技术有限公司
Adtech Technology Cord
2-13
2.3.3 Digital Output Interface(XS6)
The digital output interface,.wiring definition is shown as follows:
Line
No.
1 OUT0 spindle clockwise (M03) 2 OUT1 spindle full clockwise (M04) 3 OUT2 spare output (M56、M57)
4 OUT3 Output spare (M58、M59) 5 OUT4 cooling (M08、M09) 6 OUT5 lubricating (M32、M33) 7 OUT6 Output spare (M10、M11) 8 OUT7
Definition Function
System timing oil pump
2-14
2Hardware Interface Definition and Descriptions of
Connection
9 OUT8 Output spare (M12、M13) 10 OUT9 Output spare (M14、M15) 11 OUT10 Output spare (M16、M17) 12 OUT11 Output spare (M18、M19) 13 OUT12 Output spare (M40、M41) 14 OUT13 Output spare (M42、M43) 15 OUT14 Output spare (M44、M45) 16 OUT15 Output spare (M46、M47) 17 OUT16 Output spare (M48、M49) 18 OUT17 Output spare (M50、M51) 19 OUT18 warning lights
20 OUT19 running lights 21 OUT20 Frequency-converting segment rate switch 3(M66、M67) 22 OUT21 Frequency-converting segment rate switch 32(M64、M65) 23 OUT22 Frequency-converting segment rate switch 31(M62、M63) 24 OUT23 Frequency-converting segment rate switch 30(M60、M61) 25 OUTGND12V-、24V- External output of public power
Concise internal circuit(left) Wiring diagram of machine(right)(take spindle on CW)
众为兴数控技术有限公司
Adtech Technology Cord
2-15
2.3.4 Manual Control Box Interface(XS7)
1 9 2 10 3 11 4 12 5 13 6 14 7 15 8
IN24 IN25 IN26 IN27 IN28 IN29 IN30 IN31 IN32 IN33 HA HB 24V­5V­5V+
Line NO. Definite Function
1 (IN24) Stall switch 0.1 stall--- High-speed 2 (IN26) Stall switch 0.01 stall--- Middle-speed 3 (IN28) Stall switch 0.001 stall--- Low-speed 4 (IN30) button Reset circulation 5 (IN32) button Pause 7 24V- 24V provided by the internal negative power supply 9 (IN25) axis select X-axis 10 (IN27) axis select Y-axis 11 (IN29) axis select Z-axis 12 (IN31) axis select A-axis 13 (IN33)button Stop 6 HA Hand encoder A phase signal input 14 HB Hand encoder B phase signal input 15 5V- Negative pole of internal 5V power supply 8 +5V Positive pole of internal 5V power supply 7 24V- Negative pole of internal 24V power supply
2-16
2Hardware Interface Definition and Descriptions of
Connection
2.3.5 Analog output interface(XS8)
The standard diagram of Analog output interface connection:
The standard wirings is suitable for XS8 interface of CNC4340,CNC4240 and CNC4342 controller.
Line
Definition Function
No.
1 DAOUT1 2 DAOUT2
Analog voltage output(0~10)V
Analog voltage output(0~10)V 3 GND GND supply provided internally 24V 4 GND GND supply provided internally 24V 5 GND GND supply provided internally 24V
众为兴数控技术有限公司
Adtech Technology Cord
2-17
2.3.6 Interface of Spindle Encoder(XS12)
The standard wiring diagram of Spindle encoder:
The standard wirings of Spindle encoder is suitable for CNC4240 and CNC4342
controller.
Line
No.
1 ECA+ Encoder A phase input+ 2 ECA- Encoder A phase input­3 ECB+ Encoder B phase input+ 4 ECB- Encoder B phase input­5 ECZ+ Encoder Z phase input+(standby) 6 ECZ- Encoder Z phase input-(standby) 7 NC Non 8 NC Non 9 5V- Negative pole of internal 5V power supply, cannot connect to
10 5V- Negative pole of internal 5V power supply, cannot connect to
11 5V+ Positive pole of internal 5V power supply, cannot connect to
Definition Function
external power supply
external power supply
2-18
2Hardware Interface Definition and Descriptions of
Connection
external power supply
12 5V+ Positive pole of internal 5V power supply, cannot connect to
external power supply
13 5V- Negative pole of internal 5V power supply, cannot connect to
external power supply 14 NC Non 15 NC Non
¾
AB-phase decoding input has differential connection and common anode connection, depending on the type of the encoder.
¾
Encoder output has the open collector output, complementation output, voltage output and long-line driver output generally. It can use the common anode connection for the open collector output, complementation output and voltage output, and use the differential connection for the long-line driver output.
¾
As shown in the following figure, AB-phase decoding input signal uses the differential connection; if use the common anode connection, it needs to connect the positive pole of A-phase with the positive pole of B-phase together; if use the common cathode connection, it needs to connect the negative pole of A-phase with the negative pole of B-phase together.
Differential Connection (see as below):
5V power supply is provided externally.
Common Anode Connection (see as below):
众为兴数控技术有限公司
Adtech Technology Cord
2-19
The voltage of the power supply depends on the encoder, when using 5V power supply, the resistance R is not required; when using 12V power supply, it can use 1K-2K resistance for R; when using 24V power supply, it can use 2K-5K resistance for R.
It is suggested that use the encoder with the long-line driver output, as it uses the differential connection, the anti-interference performance will be better when the line is long.
2-20
2Hardware Interface Definition and Descriptions of
Connection
2.3.7 RS232 Transmission interface(XS9)
Serial Communication Interface -9-Chip Signal Socket (male)
XS9
1 6 2 7 3 8 4 9 5
NC NC TXD NC RXD NC NC NC GND
line No Definition Function
1 NC Non
2 TXD Send Data
3 RXD Receive Data
4 NC Non
5 GND GND
6 NC Non
7 NC Non
8 NC Non
9 NC Non
2.3.8 USB Memory interface to connect(XS10)
Standard USB memory interface(example of U disk
);
2.3.9 PC USB Communication interface(XS11)
Standard USB communication interface;
众为兴数控技术有限公司
Adtech Technology Cord
2-21
2.4 Electric Connection Drawing
2.4.1
Schematic symbol
2-22
2Hardware Interface Definition and Descriptions of
Connection
2.4.2
Power plans to connect
众为兴数控技术有限公司
Adtech Technology Cord
2-23
2.4.3
Servo Driver Connection Diagram
2-24
2Hardware Interface Definition and Descriptions of
Connection
2.4.4
Stepper Connection Diagram
众为兴数控技术有限公司
Adtech Technology Cord
2-25
2.4.5
IO Electric Connection Diagram
2-26
2Hardware Interface Definition and Descriptions of
Connection
众为兴数控技术有限公司
Adtech Technology Cord
2-27
2-28
3G Code Program
3 G Code Program
3.1 Basic knowledge of program
3.1.1 Motion direction and name of control axis
This system can control the fast moving for four axes. For feeding, it can control the interpolation for three axes.
The definition of the axis direction, adopt the face of machine tool):
Z:
众为兴数控技术有限公司
Adtech Technology Cord
When you face the machine tool: The upward and downward movements of the cutter relative to the workpiece is called the axis Z movement. The upward
Cartesian
coordinate system, as follows, (in
3-1
movement of the cutter is called the positive-direction movement of axis Z, whereas downward movement negative-direction movement of axis Z.
X: The leftward and rightward movements of the cutter relative to the workpieve is
called the axis X movement. The leftward movement of the cutter is called the negative -direction movement of axis X, whereas rightward movement positive-direction movement of axis X.
Y: The forward and backward movements of the cutter relative to the workpieve is
called the axis Y movement. The forward movement of the cutter is called the positive-direction movement of axis Y, whereas backward movement negative-direction movement of axis Y.
Main shaft: look down the workpiece, the clockwise rotation is the natural rotation of
the main shaft, anticlockwise is the opposite rotation.
A,B,C: the positive direction of the rotation coordinate axis is the positive directoin of
the X, Y, Z coordinate axis accordingly, according to the onward direction of the right hand whorl to confirm.
Note: In this User’s Manual, the movements described on X, Y and Z axes refer to the movement relative to the workpiece. In other words, a coordinate system is assumed for the workpiece.
3-2
3G Code Program
3.1.2
Machine tool coordinate system and workpiece coordinate
system(G53、G54~G599)
1
Machine tool coordinate system
The coordinate system of this machine tool is a fixed one on it. The establishment of
this coordinate system is based on the operation each time the system returns to the
reference point after NC is electrified. To select the coordinate system of the machine tool,
G53 instruction is used.
2)
Workpiece coordinate system
The workpiece coordinate system is used when the program is activated for machining,
for which some benchmark point is set as the origin. Normally, in the process of
programming, the programmers do not know where the workpiece is on the machine tool.
The workpieve programs they compiled often take some point on the workpieve as the
reference point. Therefore, the coordinate system set on the basis of this reference point is
called workpieve coordinate system. When the workpiece to be processed is fixed on the
machine tool, first the cutter will be moved to the designated reference point, and the
coordinate value of this point of the machine tool is set at the origin of the workpiece
coordinate system. Thus, when the system executes the machining programs, the cutter will
perform the machining actions by taking this workpiece coordinate system as its reference
object. For above reasons, the offset of the coordinate system’s origin is of great significance
for the CNC machine tools.
This System can be set with six workpieve coordinate systems (nine expansion
coordinate systems, ranging from G591 to G599, are added for the new version system). In
operation, the offset value of the coordinate system’s origin of each workpiece relative to the
origin of the machine tool’s coordinate system should be set. Then G5X (5X represents the
number of the actual workpieve coordinate system. It is same for the following part)
instruction is used to select them. G5X serves as the mode status instruction, respectively
corresponding to the pre-set workpieve coordinate systems ranging from 1#-6#.
众为兴数控技术有限公司
Adtech Technology Cord
3-3
3
Absolute coordinate program and relative coordinate program
Cutter movement instructions are classified as absolute value instruction and incremental value instruction. In the mode status of absolute value instruction, what’s designated is the coordinate value of the end point of movement in the current coordinate system; In the mode status of increment value instruction, is the designated axes relative to the movement away from the starting point.
G90………absolute value instruction
G91………incremental value instruction
For example:
G90、G91
From above introduction, we may better understand the programming with both absolute value method and increment value method.
3-4
3G Code Program
3.1.3 The mode status function and the non-mode status
function
The mode status function means that once a code is designated in the current program segment, it will be effective till another code of the same group in the program segment appears. And if this instruction is used in the next program segment again, it doesn’t need to be designated.
The non-mode status function means a code can function only in its program segment. If this instruction is used again for the next program segment, it must be re-designated.
For example:
N0 G54 G0 X0 Y0; (Select the workpiece coordinate system, fast position to X0 Y0)
N1 G01 X150. Y25. F100 ;(Linear interpolating to X150, Y25 )
N2 X50. Y75. F120; (Linear interpolating to X50, Y75. G01 is a mode status instruction and can be omitted)
N3 X0; (Linear interpolatig to X0, Y75. F120 is a mode status instruction and can be omitted)
3.1.4
cutting feed.
between fast feeding and locating in the fixed cycle are engaged. The speed of fast locating feed is determined by the machine tool’s parameters. When this mode is used, the movements of the axes engaged in the feeding are irrelevant to each other. These axes move respectively at the rate set by the parameter. Normally, the locus of the cutter is shaped as a fold line or straight line.
cycle is involved. The speed of the cutting feed is determined by the address F, with its unit as mm/min. In the machining program, F is the value of a mode status. In other words, the originally programmed F value remains effective before the new F value is given. At the beginning of time the CNC system is electrified, the F value is set by the system parameter. The interpolation relation is remained between the axes engaged in feeding. The combination of their movements become the cutting feed movement.
is greater than this value, this value will remain unchanged for the actual cutting feedrate.
control panel. The actual cutting feedrate should be the product of the given F value and feed percentage. The rate range is 10%-150%.
Feeding
The feed of CNC machine tool can be classified as two types: fast locating feed and
The fast locating feed appears when G00, fast manual move and the movement
Cutting feed is used in the case of G01, G02 and 03 and when machining feed in fixed
The max. value of F is determined by the system parameter. If the programmed F value
The cutting feedrate can also be controlled by the switch of feed percentage on the
众为兴数控技术有限公司
Adtech Technology Cord
3-5
3.1.5
that’s followed by a numeric number to form the a instruction word. One or multiple instruction word s suffixed by the mark “;” constitute one program segment. And multiple program segments form a machining program. The instruction word serves as the basic unit to constitute the program segment. Each address has different meaning, whose following numeric number has different format and value range accordingly. Please refer to the table below:
Function Add Range Meaning program name O program
segment No. Prepared to function
Size definition
feedrate F Spindle Speed S Select Cutter T 0~99 Assistant
function Cutter offset number Pause time P,X
Program structure
In the text of a machining program, one English letter is called a instruction address
N
G
X,Y,Z
R ±99999.999mm Radius, fillet radius
I,J,K
M
H,D
1~9999 1~9999
00~99
±99999.999mm Location coordinates
±9999.9999mm Coordinate of center of
1~100,000mm/m 1~4000 rotate per minute
0~99
1~200
0~65 second
program number Serial No.
NC designated function
value
circle feedrate
Spindle Speed Value Cutter No. Assistant function of M
code Designated cutter offset number Pause time(millisecond)
3-6
3G Code Program
Designated subprogram
1~9999
P
Invoke subprogram
number number The number of repeat
P,L
1~999
Invoke subprogram
number
P is 0~99999.999
Parameter P,Q,R
Q is ±99999.999 mm
fixed cycle parameter
R is ±99999.999
In addition, an optional number N × can be used at the beginning of a program segment for identifying it. It must be noted that the execution order of program segment is related only to the position in the memory where the program is saved, not to the program segment number. In other words, even if the program segment numbered as N20 is in front of the one numbered as N10, the one with the number of N20 will be executed earlier.
If the first character of some program segment is “/”, it means this is a conditional program segment. That is to say, when the jump switch is at the upper position, this program segment won’t be executed, whereas when the jump switch is at the lower position, this program segment can be executed.
1)Main program and subprogram
The machining program consists of the main program and subprogram. Basically, NC executes the instructions from the main program. When it executes a evoke instruction from the subprogram, NC will change to execute the subprogram. It will return to the main program when it executes the return instruction from the subprogram.
When the machining program needs to run the same locus for multiple times, we can program this locus into a subprogram and save it in the program memory of the machine tool. Then each time this locus is executed in the program, we can invoke the subprogram.
When a main program invokes a subprogram, this subprogram can also invoke another subprogram. This is called dual nest of subprogram. A machine tool can allow a subprogram of quadruple nest at maximum. When the subprogram instructions are invoked, the invoked subprogram can be repeatedly executed through the instruction, with a max. repetition number up to 999 times.
A subprogram should has the structure as below:
O××××; subprogram number
…………;
…………; subprogram contents
…………;
M99; Return to main program
The program should begin with a subprogram number designated by address O. At the end of the program, the instruction M99 for returning to main program must be included. M99 may not be seen in a individual program segment. As the end of the subprogram, such a program segment is acceptable:
G90 G00 X0 Y100. M99;
众为兴数控技术有限公司
Adtech Technology Cord
3-7
In the main program, the program segment that invokes the subprogram must include the contents below:
M98 PЧЧЧЧЧЧЧ;
Here, in the numbers following address P, the last four digits are used for designating the number of the subprogram to be invoked, the front three digits for designating the repeated times to be invoked.
M98 P51002; To invoke subprogram No.1002, repeat 5 times.
M98 P1002; To invoke subprogram No.1002, repeat 1 times.
M98 P50004; To invoke subprogram No.4, repeat 5 times.
The invoke instruction can appear in the same program segment as the motion instruction:
G90 G00 X−75. Y50. Z53. M98 P40035;
This program segment instructs axis X, Y and Y to move to the designated position with the speed of fast locating feed, then invoke to execute subprogram No.35 for four times.
Unlike other M codes, when M98 and M99 are executed, no signal is sent to the side of machine tool.
When NC can’t find out the program number designated by address P, the alarm will be sent out.
The invoke instruction of subprogram—M98 can’t be executed under the MDI mode. If a subprogram needs to be executed individually, you can edit the program in the programming mode as follows and execute it in the auto running mode.
O×××;
M98 P××××;
M30;
2
Program finished
When the following codes are seen at the end of the program, it means the program part is finished.
EIA ISO Define M30 CR M30 LF The end of the program and return
M99 CR M99 LF subprogram finished
In executing the program, if the abovementioned program-end code is detected, the device will finish executing the program and the system will enter the reset state. In the case of M30, CR or M30 LF, the system will return to the beginning of the program (in an auto way). In the case of end of subprogram, the system will return to the program which invokes the subprogram.
to the beginning of the program
3)File finished
EIA ISO Define ER % program finished
Remark: If ER(EIA) or %(ISO) is executed without M30 at the end of the program, CNC will change to the reset state.
3-8
3G Code Program
3.2
3.2.1
G00 G01 G02 G03 G04 00 G17 G18 G19 G20 G21 G28 G29 *G40 G41 G42 G43 G44 *G49 *G54 G55 G56 G57 G58 G59 G591 G592 G593 G594 G595 G596 G597 G598 G599
G65 00
G73 G74
Preparatory Functions(G Code
G Code of list
G Code Set Function
Locate(fast move)
01
02
06
00
07
08
05
09
Linear interpolation (cut feed) Arc-circle interpolation CW Arc-circle interpolation CCW Pause, Stop XY plane selection ZX plane selection YZ plane selection Input data of British system Input data of metric system Return to reference point Return from reference point Write-off of cutter radius compensation Compensation of left cutter radius Compensation of right cutter radius Length of positive-direction cutter Length of negative-direction cutter Write-off of cutter length offset Workpiece coordinate system 1 Workpiece coordinate system 2 Workpiece coordinate system 3 Workpiece coordinate system 4 Workpiece coordinate system 5 Workpiece coordinate system 6 Coordinate system of expansion workpiece 7 Coordinate system of expansion workpiece 8 Coordinate system of expansion workpiece 9 Coordinate system of expansion workpiece 10 Coordinate system of expansion workpiece 11 Coordinate system of expansion workpiece 12 Coordinate system of expansion workpiece 13 Coordinate system of expansion workpiece 14 Coordinate system of expansion workpiece 15 Macro program command (not developed for
4340, test version) Fixed cycle for drilling and cutting deep holes Fixed cycle for reverse-thread tapping
众为兴数控技术有限公司
Adtech Technology Cord
3-9
G76 *G80 G81 G82 G83 G84 G85 G86 G87 G88 G89 *G90 G91 G98 G99
Note: Items with “ * ” are the defaulted values of mode status for G codes of groups in the system.
03
10
Fixed cycle for fine boring Cancel fixed cycle Fixed cycle for drilling and cutting Fixed cycle for drilling and cutting Fixed cycle for drilling and cutting deep holes Fixed cycle for tapping Fixed cycle for boring and cutting Fixed cycle for boring and cutting Fixed cycle for reverse boring and cutting Fixed cycle for boring and cutting Fixed cycle for boring and cutting Absolute value program Incremental value program Return to initial plane in fixed cycle Return to R point plane in fixed cycle
3.2.2
1
fast speed. The instructed shafts are irrelevant to each other. In other words, the locus of the cutter is a straight line or fold line. The moving speed of each shaft under the instruction G00: at axis X, Y and Z, the shaft will move according to the set parameter, and this speed is not controlled by the current F value. When all shafts reach the end points, CNC will consider that this program segment is finished and the system will change to execute the next program segment.
as shown in the figure below.
Interpolation Functions
Fast locating
Format:
G00 X_Y_Z_;
X_Y_Z_:
value will be determined by the mode status value of G90 or G91.
The instruction G00 allows each shaft to move to the designated position with the set
Example of G00 programming:
The starting point is set as X and instruction as Y. The cutter will move to form the locus
G00
coordinate value, whether it is a absolute position value or incremental position
G00、G01、G02、G03)
3-10
3G Code Program
2)Linear interpolation(G01)
Format:
G01 X_Y_Z_F_;
X_Y_Z_ :It refers to the coordinate value. It can be absolute or incremental value according to the current state of G90 or G91.
F :It refers to the speed.
The instruction G01 allows the current interpolation mode status to be changed to linear interpolation mode status. The cutter will move from the current position to IP designated position, whose locus is a straight line. F- designates the speed with which the cutter moves along the line, with its unit as mm/min.
G01 for example:
Suppose the current cutter is at the point X-50. Y-75., the program segment is as follows:
N1 G01 X150. Y25. F100 ;
N2 X50. Y75.;
Out of the tool will track as follows.
3)Arc-circle interpolation(G02/G03)
The instructions listed below can enable the cutter to move along the arc locus:
In X-Y plane
G17 { G02 / G03 } X__ Y__ { ( I__ J__ ) / R__ } F__ ;
In X-Z plane
众为兴数控技术有限公司
Adtech Technology Cord
3-11
G18 { G02 / G03 } X__ Z__ { ( I__ K__ ) / R__ } F__ ;
In Y-Zplane
G19 { G02 / G03 } Y__ Z__ { ( J__ K__ ) / R__ } F__ ;
No. Content Command Define
1
2
3
select plane
Arc direction
End position
Distance between the start point and
4
5
origin
Arc radius R
Feed rate F
G17
G18
G19
G02
G03
G90 mode Two-axes instruction in
X, Y and Z
G91 mode Two-axes instruction in
X, Y and Z
Two-axes instruction in X, Y and Z
Designate the arc interpolation on X-Y plane Designate the arc interpolation on Z-X plane Designate the arc interpolation on Y-Z plane Arc interpolation of clockwise direction Arc interpolation of counter-clockwise direction Coordinate value of end position in the current workpiece coordinate system Distance between the start point and origin (with direction) Distance between the start point and origin (with direction)
Arc radius speed of along-the-arc movement
The arc direction mentioned here refers to the direction for which the XY plane is viewed from the positive direction of Z axis to its negative direction. Similarly, for XY or YZ plane, the observing direction should be from the positive direction of Y axis or X axis to its negative direction (this is applicable for right-hand coordinate system, as shown below).
The end point of the arc is determined by the address X, Y and Z. In G90 mode status, which is the absolute mode status, the address X, Y and Z tell the coordinate value of the arc’s end point in the current coordinate system. In G91 mode status, which is the incremental mode status, what X, Y and Z tell are the distances between the current point of the cutter and the end point along the coordinate axes.
To X direction, the address I tells the distance between the point of current cutter and the center of circle. To X and Y direction, the distance between the point of current cutter and the center of circle is given the address J and K. The symbol of I, J and K are determined by the respective movement direction.
3-12
3G Code Program
To program a segment of arc, in addition to the method of given end point position and circle center position, we can also use the given radius and end point position, and use address R to tell the radius and replace the address of given circle center. The R value can be positive and negative. Normally, a positive R value is used for programming a segment of arc which is less than 180°, whereas a negative R value is used for programming a segment of arc which is more than 180°. To program a whole circle, we have to use the method of given center of the circle.
Use absolute value method and incremental value method respectively to program the locus in the diagram.
(1) absolute value method
G00 X200.0 Y40.0 Z0 ;
G90 G03 X140.0 Y100.0 I-60.0 F300.0 ;
G02 X120.0 Y60.0 I-50.0 ;
or
G00 X200.0 Y40.0 Z0 ;
G90 G03 X140.0 Y100.0 R60.0 F300.0 ;
G02 X120.0 Y60.0 R50.0 ;
(2) incremental value method
G91 G03 X-60.0 Y60.0 I-60.0 F300.0 ;
G02 X-20.0 Y-40.0 I-50.0 ;
or
G91 G03 X-60.0 Y60.0 R60.0 F300.0 ;
G02 X-20.0 Y-40.0 R50.0 ;
Use F to designate the feedrate of arc interpolation, which is the cutter’s speed along the tangent direction of the arc.
众为兴数控技术有限公司
Adtech Technology Cord
3-13
3.2.3
instruction is 0.001 second.
instruction is 1 second.
3.2.4
cutter radius compensation. The method is shown below:
unchanged.
following instruction, Z axis is not on XY plane, and the movement of Z axis is irrelevant to XY plane.
circular interpolation and the cutter compensation.
Pause Instruction(G04)
Function: To cause a pause between two program segments.
Format: G04 P-
G04 X-
Address P tells the time of pause. When there is no decimal, the min. value of the
Address X tells the time of pause. When there is no decimal, the min. value of the
Example:G04 P 1000 : Pause 1000millisecond,as 1second.
G04 X 1 : Pause 1 second.
Select Plane(G17、G18、G19)
This group of instructions are used for the plane of selected arc interpolation and of
G17………Select XY plane
G18………Select ZX plane
G19………Select YZ plane
G17, G18 and G19 are in the program segment without instruction, the plane remains
For example:
G18 X_ Z_ ;ZX plane
X_ Y_ ;No change plane (ZX plane)
In addition, the move instruction is irrelevant to the plane. For example, under the
G17 Z_ ;
For relevant instructions of the plan selection, please refer to the instructions of the
3.2.5
1
IP-designated coordinate position in the machine tool coordinate system at the fast feedrate. When this instruction is executed under G91 mode status, the cutter moves at the incremental value of the selected coordinate system. G53 is a non-mode status instruction. That is to say, it can only function in the current program segment.
The distance between the zero of machine tool coordinate system and the reference point is set bythe parameter. Unless otherwise stipulated, the reference point of each axis coincides with the zero of the machine tool coordinate system.
3-14
Coordinate Instruction(G53~G59、G591~G599、G92
Selecting coordinate of machine tool(G53
Format: G53 X_Y_Z_;
X_Y_Z_:The absolute coordinate value or relative position in the coordinate system When this instruction is executed under G90 mode status, the cutter moves to the
3G Code Program
2)
Use presetting workpiece coordinate system(G54~G59,G591~G599
Based on the mounted position of workpiece on the machine tool, this System can provide six workpiece coordinate systems via presetting (the new version is expanded to 9 coordinate systems). Through the operations via the LCD panel, the offset of the origin of each workpiece coordinate system relative to the origin of that for machine tool can be set. Then the instruction G is used to select them. G is a mode status instruction, which corresponds to the preset workpiece coordinate systems ranging from 1
#~15#
. See the
example below:
Preset the offset of 1# workpiece coordinate system:X-150.000 Y-210.000 Z-90.000。
Preset the offset of 4# workpiece coordinate system:X-430.000 Y-330.000 Z-120.000。
Coordinates value of
Program segment
end point in the machine tool coordinate
Define
system
N1 G90 G54 G00 X50. Y50.;
X-100, Y-160 Select 1# coordinate system, fast
locating N2 Z-70.; N3 G01 Z-72.5 F100; N4 X37.4; N5 G00 Z0; N6 X0 Y0 A0; N7 G53 X0 Y0 Z0;
Z-160 Z-160.5 X-112.6 Z-90 X-150, Y-210
Linear interpolating, F value is 100
(Linear interpolating)
Fast locating
X0, Y0, Z0 Select to use machine tool
coordinate system N8 G57 X50. Y50. ; N9 Z-70.; N10 G01 Z-72.5;
X-380, Y-280 Z-190
Select 4# coordinate system
Z-192.5 Linear interpolating, F value is 100
(mode status value) N11 X37.4; N12 G00 Z0; N13 G00 X0 Y0 ;
X392.6 Z-120 X-430, Y-330
From above example, we can see that the role of G54-G59 is to move the origin of the
coordinate system NC uses to the point with the preset coordinate value in the machine tool coordinate system. For the presetting method, please refer to the part describing operations in this Manual.
Once the system returns to zero after started up, the workpiece coordinate systems
ranging from 1-6 will be established. G54 is the initial mode status at the time of electrifying. The absolute position of the position image is the coordinate value of the current coordinate system.
In the numeric control programming for the machine tools, the interpolation instruction and other instructions related to the coordinate value refer to the coordinates in the current coordinate system (the system when the instruction is executed), unless otherwise stipulated. In most cases, the current coordinate system is the one from G54-G59. It is a rare case that the machine tool coordinate system be used directly.
众为兴数控技术有限公司
Adtech Technology Cord
3-15
3)
Programmable workpiece coordinate system
Format
:(
G90)G92 X_Y_Z_;
G92)
This instruction help establish a new workpiece coordinate system, in which the coordinate of the current cutter’s point is the IP-designated value. G92 is non-mode status instruction. However, the workpiece coordinate system established on the basis of this instruction is of mode status nature. In reality, this instruction also gives a offset in a indirect manner, which is the coordinate value of the origin of the new workpiece coordinate system in the original coordinate system. From the performance of G92, we can see that this offset is the difference between the coordinate value in the original system and the IP-designated value. If G92 is used for many times, the offset provided each time G92 is used will be added up. For each preset workpiece coordinate system (G54-G59), this added offset is effective.
The new coordinate system of the part is therefore established by using the abovementioned instructions. For example, the coordinate value of the cutter tip can be IP-. Once the coordinate is determined, the position of the absolute value instruction is the coordinated value in this coordinate system.
Use G92 X600.0 Z1200.0 ; Use instruction for setting the coordinate system (some benchmark point on the hilt as the cutter start point)
Note: a. If G2 is used for setting the coordinate system in cutter offset, the coordinate system set by G92 will be employed for the compensation of cutter length.
3-16
3G Code Program
b. For compensation of cutter radius, cutter offset should be cancelled when G92 is used.
For example:
Preset the offset of 1# workpiece coordinate system:X-150.000 Y-210.000 Z-90.000。
Preset the offset of 4# workpiece coordinate system:X-430.000 Y-330.000 Z-120.000。
In the end of the
Program segment content
coordinate system of coordinates
Define
machine tool
Select 1# coordinate system and
N1 G90 G54 G00 X0 Y0 Z0; X-150, Y-210, Z-90
fast position to origin of coordinate system. Don’t move the cutter, and establish the new coordinate system, in which the current
N2 G92 X70. Y100. Z50.; X-150, Y-210, Z-90
point has the following coordinate values: X70, Y100, Z50. Fast position to new origin of coordinate system.
N3 G00 X0 Y0 Z0; X-220, Y-310, Z-140
fast position to new origin of coordinate system.
Select 4# coordinate system and fast position to origin of
N4 G57 X0 Y0 Z0; X-500, Y-430, Z-170
coordinate system. (already offset)
N5 X70. Y100. Z50.; X-430, Y-330, Z-120
fast position to primary origin of coordinate system.
4
Local coordinate system(G52
G52 can establish a local coordinate system, which equals to the sub-coordinate system in G54-G59 system.
Format:G52 X_Y_Z_;
In this instruction, IP-gives an offset which equals to the current G54-G59 coordinate systems. In other words, IP-gives the origin of the local coordinate system the position coordinate in the current G54-G59 coordinate systems, even if a local coordinate system is established by a G52 instruction before the instruction G52 is executed. To cancel the local coordinate system, you can simply use G52 IP0.
众为兴数控技术有限公司
Adtech Technology Cord
3-17
3.2.6 Instructions related to reference point(G27、G28、G29)
The coordinate system of the machine tool is established by returning to the reference point each time NC is electrified. The reference point is fixed on the machine tool, whose position is determined by the installation place of baffle switch of each shaft and the zero position of each shaft’s servo motor. In this machine tool, the coordinates of the reference point in the machine tool coordinate system are X0, Y0 and Z0.
Auto return to reference point(G28)
Format:G28 IP_;
This instruction enables the instruction shaft to return to the reference point of the machine tool via IP-designated middle point at the fast feedrate. The middle point can be designated by either the absolute value or incremental value, depending on the current mode status. Basically, this instruction is used to enable the workpiece to move out of the processing area after the machining program is finished so that the finished parts can be removed and the parts to be machined can be loaded.
When instruction G28 is executed before the system manually returns to the reference point, the movement direction of each shaft from the middle point is positive, like the movement for manually returning to the reference point.
The coordinate value of instruction G28 will be saved by NC as the middle point. On the other hand, if one shaft is not included within instruction G28, the coordinate value of the middle point of this shaft saved by NC will the previous value given by instruction G28.
For example:
N0010 X20.0 Y54.0;
N0020 G28 X-40.0 Y-25.0; the coordinate value of the middle poin(-40.0,-25.0)
N0030 G28 Z31.0; the coordinate value of the middle poin(-40.0,-25.0,31.0)
The coordinate value of this middle point is mainly used by instruction G29.
)
Notes:
Under the mode status of cutter offset, the cutter offset is also effective to instruction G27. Therefore, for the sake of safety, the cutter offset (radius offset and length offset) should be cancelled before instruction G28 is executed.
3-18
3G Code Program
Auto return from reference point(G29)
Format:G29 IP-;
This instruction enables the instruction shaft to move to the instruction position from the reference point through the middle point at the fast feedrate. The position of the middle point is determined by the previous instruction G28. Normally, this instruction is used behind G28 when the instructed shaft is located at the reference point or the second reference point.
Under mode status of incremental value, the instruction value is the distance between the middle point and the end point (instruction position).
Application examples for G28 and G29.
G28 X1300.0 Y700.0 ; (program from A to B)
………………………
G29 X1800.0 Y300.0 ; (program from B to C)
From the above example, we can see that it is unnecessary to calculate the actual movement from the middle point to the reference point .
Note: After the middle point is passed to reach the reference point when instruction G28 is used, the middle point will also be moved to the new coordinate system once the coordinate system is changed for the part. After that, when instruction G29 is executed, it is will be located at the designated place via the middle point.
Return for inspection from reference point (G27)
Format:G27 IP_;
This instruction enables the instruction shaft to move to the IP-designated position at the fast feedrate, then check whether this point is the reference point. If so, the system will send out the completion signal that this shaft returns to the reference point (the indicator for reaching the reference point by this shaft will be illuminated). If not, an alarm will be sent out and the running of the program will be stopped.
众为兴数控技术有限公司
Adtech Technology Cord
3-19
3.2.7
Cutter Compensation(G40、G41、G42、G43、G44
G49)
1)Cutter radius compensation
The cutter has a certain size (length and diameter). When the part with some shape is machined, the locus by which the cutter moves along will be subject to the nature of the cutter itself. If the data of the cutter’s size are set in CNC in advance, the locus of the cutter will be automatically generated by CNC when the same program is used, even if cutters of different specification are employed. The data concerning the cutter size are called compensation amount (or offset).
As shown in the following figure, the cutter with radius R is used to cut the workpiece A, the central path of cutter is B, the distance between path B and A is R. The process that the cutter leaves the workpiece A for some distance is called “compensation”. Programmers use the radius compensation mode to produce the machining programs. In actual machining, the radius of cutter will be measured and entered into CNC. The cutter path becomes the compensation path B.
3-20
3G Code Program
2)Compensation value (D Code)
Maximally, eighteen D00-D18 compensation values can be set in this System. In the program, the two numeric values after instruction D are the compensation amount. They must be set via the menu Cutter Compensation.
Set the amount of compensation are as follows:
Mm input Inch input
compensation value
0-±999.999mm 0-±999.999inch
3
Compensation vector
The compensation vector is of 2D nature, which equals the compensation value designated by code D. The calculation of compensation vector is accomplished within the control unit. In each program segment, its direction is modified according to the path of the cutter. This compensation vector is accomplished within the control unit so that how much compensation is needed for the cutter’s move can be calculated. The compensation path (the central locus of cutter) equals the programming path plus or minus (subject to the compensation direction) the cutter radius.
Vector compensation is always concerned with cutting tools, in the preparation process, to understand the state vector is very important.
4
Plane selection and vector
The calculation for compensation can be executed within the plane selected by G17, G18 and G19. This plane is called compensation plane. For example, when XY plane is selected, (X,Y)or(I,J)will be used to execute the compensation and vector calculations in the program. The shaft which is not within the compensation plane will not be affected.
In the case of running three-shaft controller, only the cutter path projected onto the compensation plane can be compensated.
The compensation plane can be modified only after the compensation mode is cancelled. If it is modified in the compensation mode, the system will send out alarm signal and the running of the machine will be stopped.
G Code compensation plane G17 X-Y plane G18 Z-X plane G19 Y-Z plane
5)G40,G41 and G42
Use instruction G40, G41 and G42 to cancel and activate the compensation vector of the cutter radius. They are combined with instruction G00, G01, G02 and G03 to determine the value and direction of the compensation vector and moving direction of the cutter by defining a mode.
G Code Function G40 cancle the compensation of the cutter radius. G41 left compensation of the cutter radius. G42 right compensation of the cutter radius.
众为兴数控技术有限公司
Adtech Technology Cord
3-21
G41 or G42 allows the System to enter the compensation mode, whereas G40 allows the System to cancel that mode.
For example of compensation program:
6
5
7
30
0
.
4
40.0
0
4
R
Y
3
2
1
40
10
20
20
11
9
R20
8
X
O0007 ; G0G40G49G80G90; G0 X0 Y0; N1 G91 G17 G00 G41 Y20.00 D07 ; N2 G01 Y40.00 F25.00:
N3 X40.00 Y30.00: N4 G02 X40.00 Y-40.00 R40.00: N5 X-20.00 Y-20.00 R20.00: N6 G01 X-60.00: N7 G40 Y-20.00: N8 M30 %
Program segment (1) is used for start-up. In this program segment, instruction G41 changes the compensation canceling mode to compensating mode. At the end of this segment, the cutter center makes compensations by allowing the cutter radius to be vertical to the path direction of next program. The compensation value of cutter is designated by D07. That is to say, the compensation number is set as 7. G41 refers to the left compensation of cutter path.
3-22
3G Code Program
6
Details of cutter radius compensation C
This part provides details of cutter radius compensation C.
a.Cancel mode
When the System is electrified/reset/executes instruction M02 and M30, the System will be in the cutter compensation mode. The vector must be 0 in compensation mode, and the path of cutter center is consistent with programming path. The compensation mode G40 must be designated before the program is finished.
b. Compensation Start
In cancel mode, the System will enter the compensation mode when the program segment that satisfies the following conditions is executed:
¾
Containing instruction G41 or G42, or the control section enters G41 or G42 mode.
¾
Offset number of cutter compensation is not zero.
¾
For movement of any axis (except I, J and K) on the instruction compensation plane, the movement value can’t be zero.
The program segment of compensation start should not have the arc instruction G02 and G03. Otherwise, the alarm (P/S34) will be activated. In compensation start segment, two program segments will be read. One is read and executed and the other enters the cutter compensation buffering area.
Under single program segment method, the second program segment is read and the first program segment is executed, and then stopped.
In continuous execution, normally two program segments are read in advance. Therefore, three program segments are available within CNC. One is the program segment being executed, and the next two program segments enter the buffering area
Note: In the descriptions below, the frequently seen terms, “inner side” and “outer side”, are defined as: when the inclination of intersection of two moving program segments equals or greater than 180°, it is called “inner side”, whereas the inclination is 0-180°, it is called “outer side” (see the following figures):
众为兴数控技术有限公司
Adtech Technology Cord
3-23
3-24
3G Code Program
C. Compensation mode
In compensation mode, if two or over two non-moving instructions are not consecutively designated (auxiliary function, pause, etc.), the compensation mode will be executed correctly. Otherwise, the part may be excessively cut or insufficiently cut. In executing the compensation mode, the compensation plane should not be modified. Otherwise, the alarm signal will be sent out and cutter stopped.
众为兴数控技术有限公司
Adtech Technology Cord
3-25
3-26
3G Code Program
众为兴数控技术有限公司
Adtech Technology Cord
3-27
3-28
3G Code Program
d. Compensation Mode
In compensation mode, when the program segment satisfying any of the following conditions, the System will enter the compensation cancel mode. The action of this program segment is called “compensation cancel”.
¾
Instruction G40
¾
The number of cutter radius compensation is 0.
When the compensation cancel mode is executed, the instructions for arc (G03 and G02) can’t be used. Otherwise, the instruction arc will generate alarm (P/S34) and cutter will be stopped.
众为兴数控技术有限公司
Adtech Technology Cord
3-29
e. Change the compensation direction in the compensation mode
The G code (G41 and G42) for cutter radius compensation determines the
compensation direction. The symbols of compensation are described as follows:
compensation symbol
G Code
G41 left side compensation right side compensation
G42 right side compensation left side compensation
3-30
3G Code Program
In special cases, the compensation direction can be modified in the compensation mode. However, such modification should not be executed in the start-up program segment and its follow-up program segments. Once the compensation direction is changed, the concept of inner and outer sides becomes ineffective. It is assumed the following compensation are positive values.
¾
When the compensation is carried out normally and there is no intersection
When G41 and G42 are used for changing the offset direction from program segment A to B, if the intersection of the compensation path is not needed, the vector can be made to be vertical to the program segment B from B’s start point.
linear----linear
众为兴数控技术有限公司
Adtech Technology Cord
3-31
linear----arc
arc----arc
¾
When the cutter center path for cutter radius compensation is more than one circle in length
3-32
3G Code Program
Normally, this phenomenon won’t occur. However, when G41 and G42 are modified, or I, J and K are used to instruct G40, the above situation may appear.
f. Temporary compensation cancel
In compensation mode, if the following instructions are executed, the compensation will be temporarily cancelled. After that, the System will automatically resume the compensation mode. For details of this operation, please refer to descriptions on compensation cancel and compensation start.
¾
G28 automatically returns to reference point
In compensation mode, if the instruction G28 is executed, the compensation will be cancelled at the middle point. The compensation mode will be automatically resumed after returning to the reference point.
¾
G29 automatically returns from the reference origin
In compensation mode, if the instruction G29 is executed, the compensation will be cancelled at the middle point. The compensation mode will be automatically resumed in the next program segment.
When instruction is immediately executed after G28.
众为兴数控技术有限公司
Adtech Technology Cord
3-33
When instruction is not immediately executed after G28.
g. G code for cutter radius compensation in compensation mode
In compensation mode, when the G code (G41 and G42) for cutter radius compensation
is designated, there will be a vector vertical to the previous program segment and relative to
the moving direction. This vector is irrelevant to the machining inner and outer sides.
However, if this G code is designated in the arc instructions, the correct arc can’t be
obtained.
If the cutter radius compensation G (G41 and G42) changes its compensation direction,
please refer to (5).
3-34
3G Code Program
h. Instruction temporarily cancelling compensation vector
In compensation mode, if G92 (absolute coordinate programming) is designated, the compensation vector will be temporarily cancelled. After that, this vector will be automatically resumed.
At the time, unlike the compensation mode, the cutter will move from the intersection to the point which cancels the compensation vector. Once the compensation mode is resumed, the cutter will directly move to the intersection.
众为兴数控技术有限公司
Adtech Technology Cord
3-35
i. Program segment where cuter doesn’t move
In the following program segments, the cutter won’t move. In these segments, the cutter won’t move even if there is an intersection for cutter radius compensation mode.
(1)M05:………………… M Code input
(2)S21:………………… S Code input
(3)G04 X10000:……… pause
(4)(G17)Z100:no movement instruction on the compensation plane Not move.
(5)G90:………………… Only G code is available.
(6)G01 G91 X0:…………Movement is zero.
¾
Instruction for compensation start
If the instruction for compensation start is executed without the movement of cutter, no compensation vector will be generated.
¾
Instruction for compensation mode
In compensation mode, if only the instruction for the program segment, which does not move the cutter, is executed, the vector and the cutter center path will remain unchanged as the time without this program segment. (Please refer to (3) for compensation mode) at the time, the program segment for cutter moving is executed at the stop point of single program segment.
However, when the movement of the program segment is zero, even if only one program segment is designated, the cutter will move like the time there is no movement instruction. For details, please refer the following descriptions.
3-36
3G Code Program
Two program segments without cutter movement can’t be executed consecutively. If executed in that way, a vector, which takes the length as the compensation value and whose direction is vertical to the movement direction of the previous program segment, will be generated. This will lead to over-cutting.
Note: SSS indicates the program segments are used for operating the cutter thrice.
¾
Instruction at the same time as compensation cancel When the program segment is executed at the same time as compensation cancel but without cutter movement, a vector, which takes the length as the compensation value and whose direction is vertical to the movement direction of the previous program segment, will be generated. This vector will be cancelled at the next movement instruction.
j. On the compensation plane, this program segment include G40 and I—J—K instructions.
¾
Previous program segment as G41 or G42
众为兴数控技术有限公司
Adtech Technology Cord
3-37
At the time, suppose that CNC sends out the instruction that a movement along the
direction of I, J or K is made from the previous program segment.
Note: The obtaining of cutter intersection by CNC is irrelevant to the inner and outer sides of the designated machining.
When the intersection can’t be obtained, the end point cutter of the previous program
segment moves to the position vertical to the previous program segment.
¾
Cutter center path is longer than a circle.
3-38
3G Code Program
In above figure, the cutter center path doesn’t move along the circle, but along the arc
from P1 to P2.
In some cases, the alarm signal (P/S41)may be sent out because of the interference inspection. The related explanation will be followed up. (If it is expected to move along the circle, the arc instructions must be executed segment by segment.)
k. Corner Movement
If more than two vectors are generated at the end of the program segment, in other words, the cutter moves from one vector to another, this movement is called corner movement.
If these vectors almost have the same value, the corner movement will not be executed. The latter vector can be ignored.
If △VX△V limit and △VZ△V limit, the latter vector will be ignored. △V limit uses the parameter.
If these vectors are inconsistent, a movement along the corner will be generated. This
movement belongs the latter program segment.
众为兴数控技术有限公司
Adtech Technology Cord
3-39
However, if the path of the next program segment exceeds the length of a half circle, the abovementioned process will not be carried out. The reasons can be seen as follows:
If the vector is not ignored, the cutter path can be described as follows:
→P4→P5→P6→
P0→P1→P2→P3(arc-circle
However, if the distance between P2 and P3 is ignored, P3 will be ignored. The cutter path can be described as follows:
P0→P1→P2→P4→P5→P6→P7 The arc cutting of program segment N6 is ignored.
l. Interference inspection
The excessive cutting of cutter is called “interference”. The interference mode can examine the whether the cutter cut excessively. However, this function can’t inspect all the interferences. The interference inspection mode can be activated even if there is no excessive cutting.
¾
Preconditions of interference:
The direction of cutter path differs from that of program path. (The inclination is between 90° and 270°).
When the arc machining is being carried out, there should a substantial difference between the inclination of the start point and end point of cutter center path and that of the start point and end point of the program path.
P7
3-40
3G Code Program
(G41)
N5 G01 G91 X8000 Y2000 D01; N6 G02 Y-1600 X3200 12000 J-8000 D02; N7 G01 X2000 Y-5000:
H01 Tool radius compensation amount r1=2000)
H02 Tool radius compensation amount r2=6000)
In above examples, the arc of program segment N6 is within the first quadrant. But
after cutter compensation, the arc is located in the fourth quadrant.
¾
Pretreatment of interference
Interference caused by the movement of vetor
众为兴数控技术有限公司
Adtech Technology Cord
3-41
When the program segment A, B and C for cutter compensation are executed, vector V1, V2, V3 and V4 will be generated between A and B, and vector V5, V6, V7 and V8 will generated between B and C. The closest vector should be inspected. If there is an interference, it will be automatically eliminated. If the vector to be ignored is located at the last part of the corner, the interferences can’t be eliminated.
Interference inspection:
Between V4 and V5—interference—V4, V5 eliminated
Between V3 and V6—interference—V3, V6 eliminated
Between V2 and V7—interference—V2, V7 eliminated
Between V1 and V8—interference—V1, V8 can’t be eliminated
In inspecting, if some vector has no interference, the follow-up vectors won’t be inspected. If the program segment B is of arc movement, the vector interference will cause linear movement.
(Example 1) Cutter’s linear movement from V1 to V8
(Example 2) Cutter’s linear movement is send as follows:
Cutter path: V1→V2→VY→V8
3-42
3G Code Program
If the interference still happens after the treatment (1), the cutter will be stopped and the alarm will be generated. If the interference happens after the treatment (1) or there is only one group of vector after inspection starts, and this vector has interference, the cutter will be stopped immediately after the previous program segment is executed, and the alarm information will be displayed (P/S41)
(If the single program segment is used for execution, the cutter will be stopped when the program segment is finished.)
The interference ignores the vector V2 and V5. But interference will happen between the vector V1 and V6. The alarm information will be displayed and cutter stopped immediately.
¾
No interference actually happens., but interference inspection is performed.
众为兴数控技术有限公司
Adtech Technology Cord
3-43
See the following example:
The depth of the concave is less than the compensation value.
No interference actually happens. However, as it is the program segment B, the direction of program is opposite to the path of the radius compensation. The cutter will be stopped and alarm information displayed.
The depth of groove is less than the compensation value
Like the example (1), the direction of cutter path is opposite to that of program path
m.Compensation can’t be conducted by entering instruction from MDI
During the automatic running of the NC program made by absolute instructions, when the single segment is used for temporary stop, after the MDI operation is interpolated and the auto running is started again, the cutter path can be described as follows:
At the time, the vector of the next program segment is transmitted, and other vectors will be generated according to the next two program segments. Therefore, compensation after point Pc can be performed correctly.
3-44
3G Code Program
When point Pa, Pb and Pc are programmed with absolute instructions, the single segment will be used for stopping after the program segment is executed from Pa to Pb. The cutter is moved by inserting MDI. The vector Vb1 and Vb2 are transmitted to V‵b1 and V‵b2, and the vector Vc1 and Vc2 between program segment Pb→Pc and Pc→Pd will be re-calculated.
However, as vector Vb2 is not calculate again, the compensation after point Pc can be executed correctly.
n. Manual operation
For the manual operation in cutter tip radius compensation, please refer to the manual part in the Operation chapter.
o. If the compensation for cutter length is executed in the cutter radius compensation, the compensation for cutter radius is considered as the compensation change.
p. Precautions on compensation
Instruction compensation
D code is used for designating the number of compensation value. Once designated, H code will remain effective till another H code is designated or compensation is cancelled. In addition to designating compensation value for cutter radius, H code is also used for the value of cutter offset.
Modifying compensation
Normally, when the cutter is changed, the compensation value must be modified in the cancel mode. If the compensation value is modified in the compensation mode, the new compensation value will be calculated at the end of the program segment.
众为兴数控技术有限公司
Adtech Technology Cord
3-45
¾
Positive and negative compensations and cutter center path
If the compensation is a negative value (-), G41 and G42 in the program will be exchanged mutually. If the cutter center moves along the outer side of the workpiece, it will move along the inner side. Vice versa.
As shown in the following example, the compensation is normally set as positive in preparing the program. When the cutter path is programmed as Figure (a), if the compensation value is negative (-), the cutter center will move in a path shown in Figure (b). Vice versa. Therefore, the part can be cut into a male or female shape in the same program, and the gaps between them can be adjusted by the selecting the compensation. (Suitable for compensation start and the type A canceling. )
¾
Using cutter radius to compensate excessive cutting
Machining with arc’s inner side of small cutter radius
When the radius of corner is smaller than the cutter radius, the inner side compensation of cutter will cause over cutting, and the system will alarm. CNC will stop at the start position of the single-segment program.
3-46
3G Code Program
Groove machining with size smaller than cutter radius
As the cutter center path is forced to move reversely to the program path due to the cutter radius compensation, over-cutting will occur.
Segment-difference machining with size smaller than cutter radius
If there is segment difference smaller than the cutter radius in the program, and this segment difference is machined by the arc instruction, the cutter center path as normally compensated will have the direction opposite to that of the program. At the time, the compensated vector is ignored and the cutter moves to the second vector in a linear fashion. The execution of single-segment program stops here. If the machining is not conducted under the single-segment mode, the auto running will continue. If the segment difference is a straight line, no alarm signal will be sent out and the cutting be correct. However, the uncut part will remain.
众为兴数控技术有限公司
Adtech Technology Cord
3-47
If the initial vector of cutter is not ignored, over-cutting will occur.
Normally, when the machining process begins, the cutter will move along axis Z some distance away from the workpiece after the cutter radius is effectively compensated. In aforesaid case, you should refer to the procedure below if the movement along axis Z is divided into fast feed and cutting feed:
3-48
3G Code Program
If the selected plane doesn’t include the two program segments with movement instruction, N6 can’t enter the buffering area, and the cutter center path will be calculated by N1, as shown in above drawing. If the compensation vector is not calculated at compensation start, over-cutting will consequently occur. Thus the abovementioned example must be modified as follows:
When N1 is executed, program N2 and N3 will enter the buffering area. Use the relationship between N1 and N2 to execute the correct compensation.
Length Compensation G43 G44 G49
众为兴数控技术有限公司
Adtech Technology Cord
3-49
G43 G43
Z_H_ or H_
G44 G44
According to above instruction, move the end position of axis Z instruction for one more offset, and set the difference of the assumed cutter length and the actual value in machining to the offset memory. Therefore, the program doesn’t need to be modified. To use cutters with different lengths, you only need to change the compensation value of the cutter.
G43, G44 designate a different direction of migration, The offset number is designated
by H code.
¾
Migrate direction
G43:Positive offset G44:Negative offset
No matter it is a absolute instruction or incremental instruction, when at G43, you should add the offset designated by H code (set in the offset memory) to coordinate value of the end point of the axis Z’s movement instruction; when at G44, you should deduct the offset designated by H code. Then use the coordinate value of the calculated results as that of the end point.
When the movement of axis Z is omitted, it can be considered as the following instruction. If the offset is a positive value, instruction G43 serves as an offset moving positively, whereas instruction G44 serves as an offset moving negatively.
G43 G91 H_ G44
When the offset is a negative value, the movement is reverse.
G43 and G44 are of mode status G code, which remain effective before they meet other G code in the same group.
¾
Designation of offset
The offset number is designated by H code. The offset corresponding to the offset number is added to or deducted by the value of movement instruction at axis Z to produce the new movement instruction at axis Z. The offset number can be designated from H00-H18.
Enter cutter compensation menu, and preset the offset onto the corresponding offset
number in the offset memory.
Mm input Inch input Offset 0~±999.999 0~±99.9999
The offset number 00 means the corresponding offset of H00 is 0. The offset H00
corresponds can’t be set.
3-50
3G Code Program
¾
Cancel the cutter length compensation; Use G49 or H00 to cancel the cutter compensation. Once the instruction G49 or H00 is executed, the compensation will be cancelled immediately.
¾
Examples of cutter length compensation.
¾
Cutter length compensation (machining hole #1, #2 and #3 ).
N1 G91 G00 X120.0 Y80.0:…………………(1) N2 G43 Z-32.0 H01:……………………… (2) N3 G01 Z-21.0:…………………………… (3) N4 G04 P2000:…………………………… (4) N5 G00 Z21.0:…………………………… (5) N6 X30.0 Y-50.0:………………………… (6) N7 G01 Z-41.0:…………………………… (7) N8 G00 Z41.0:…………………………… (8) N9 X50.0 Y30.0:………………………… (9) N10 G01 Z-25.0:………………………… (10) N11 G04 P2000:………………………… (11) N12 G00 Z57.0 H00:……………………… (12) N13 X-200.0 Y-60.0:……………………… (13) N14 M30:
Note: When the offset number is changed to modify the offset, it only means the offset becomes a new one. It does not mean that the new offset is added to the old one.
H01………………………
H02………………………
Offset Offset
G90 G43 Z100 0 H01………Z
20.0
30.0
Moves to
120.0
众为兴数控技术有限公司
Adtech Technology Cord
3-51
G90 G43 Z100 0 H02………Z
3.2.8
accomplished by several program segments if other methods are involved, can be performed within one program segment. The Table 7.1 provides all fixed cycles for hole machining. Basically, to accomplish one fixed hole machining cycle, the following six procedures should be performed:
Hole machining cycle(G73~G89)
If the fixed cycle function for hole machining is used, the functions, which are
1. Fast locating of axis X and Y.
2. Fast locating axis Z to point R.
3. Hole machining.
4. Action at hole bottom.
5. Axis Z returns to point R.
6. Axis Z fast returns to initial point.
Moves to
130.0
Table 7.1 Fixed Hole Machining Cycle
Machining
G Code
G73 Time by time,
G80
G81 cutting feed
G82 cutting feed Pause Fast locating
G83 Time by time,
G84 cutting feed Pause—Spindle on
G85 cutting feed G86 cutting feed Spindle off Fast locating
G88 cutting feed Pause—Spindle off Manual Boring cycle G89 cutting feed Pause cutting feed Boring cycle
(negative direction at axis Z)
cutting feed
cutting feed
Action at hole bottom
CCW
Returning (positive direction at axis Z) Fast locating feed
Fast locating feed
feed Fast locating feed cutting feed Right-thread
cutting feed Boring cycle
feed
Application
High-speed deep hole drilling Canceling fixed cycle Regular drilling cycle Drilling or coarse boring Deep-hole drilling cycle
tapping
Boring cycle
3-52
3G Code Program
he instruction G90/G91 and G98/G99 can affect the execution of the instruction for fixed hole machining cycle. Figure 7.2(a) and Figure 7.2(b) shows the influence posed by G90/G91 to the instruction for fixed hole machining cycle.
G98/G99 determines whether the cutter returns to point R or the initial point after the hole machining is finished in the fixed cycle. Under G98 mode status, axis Z will return to the initial point after hole machining. Under G99 mode status, it will return to point R.
Normally, if the hole being machined is on a perfectly flat plane, we can use the instruction G99. This is because the system will position the next hole after returning to point R under G99 mode status. As in the regular programs point R is very close to the surface of the workpiece, G99 will save the time of machining the parts. However, if there is protruded areas or bars on the surface of workpiece, the cutter may collide with the workpiece when G99 is used. In this case, G98 should be used, by which the next hole will be located after axis Z returns to the initial point. Thus this practice could be safer. Please refer to Figure
7.3(a) and Figure 7.3(b).
众为兴数控技术有限公司
Adtech Technology Cord
3-53
The parameters of hole to be machined are provided after G73/G74/G76/G81~G89, with format as follows:
G××X___ Y___ Z___ R___ Q___ P___ F___ K___;
G×× : Hole machining method
X___ Y___ Z___ :Parameters for position of the hole to be machined
R___ Q___ P___ F___ : Machining parameter of the hole
K___ : Repeat times
Hole machining method: G See Table 7.1
Parameters for position of the hole to be machined: X, Y
Parameters for position of the hole to be machined: Z
Machining parameter of the hole: R
Machining parameter of the hole: Q
Machining parameter of the hole: P
Machining parameter of the hole: F
When the position of the hole to be machined is designated by incremental or absolute value method, the locus by which the cutter moves along the hole and cutter’s speed are the same as G00.
The position of the hole bottom along axis Z is designated by absolute value method, whereas the distance between point R and the hole bottom is designated by incremental value method.
The position of point R along axis Z is designated by absolute value method, whereas the distance between the initial point and point R is designated by incremental value method.
Used for designating the feed of each time in the deep-hole drilling cycle G73 and G83, and the offset in fine boring cycle G76 and reverse boring cycle G87 (always incremental instruction, regardless of G90 or G91 mode status)
Used for designating the pause time in the fixed cycle where the hole bottom has pause, with unit as second.
Used for designating the cutting feedrate in the fixed cycle. In the fixed cycle, the movement from the initial point to point R and point R to initial point is carried out at the fast feedrate, and movement from point R to point Z is carried out at the cutting feedrate designated by F. However, the movement from point Z to point Z can be carried out either at the rate designated by F or
3-54
3G Code Program
at the fast feedrate, depending on the nature of the fixed cycle.
Used for designating the repeat times of the fixed cycled at
Repeat times: K
the current locating point. If K is not executed, NC will consider K=1. If K=0, there will be no execution at the current point in the fixed cycle.
As the hole machining designated by G×× is of the mode status, the current mode status will remain unchanged if it not is modified or the fixed cycle is not cancelled. The fixed cycle can be canceled by using G80 or instruction G of group 01. The machining parameter of the hoe is of the mode status too, and it will also remain unchanged before it is modified or the fixed cycle is canceled, even if the mode status for hole machining is changed. Any machining parameter of the hole can be designated or modified when a fixed cycle is instructed or at any time the fixed cycle is executed. The repeat times are not a value of mode status, and it is only provided when repetition is needed. The feedrate is a value of mode status, which will exist even if the fixed cycle is canceled. If NC system is reset in the process of executing a fixed cycle, the mode status of hole machining, machining parameter of the hole and repeat times will all be canceled.
The following example will help you better understand the aforesaid contents:
Item
Program content Notes
No.
1
2
S____ M03 Provide the rotation speed and instruct the spindle to
rotate in positive direction. G81X__Y__Z__R__F __K__
Fast position to the designated points of X and Y, and machine the part according to the parameters provided by Z, R and F and with the method provided by G81. Then repeat the process for K times. At the beginning of executing the fixed cycle, Z, R and F are the necessary machining parameters of the hole.
Y__ Axis X remains unmoved, and axis Y is fast located to
3
instructed point for machining. The hole machining parameter and method the keep the mode status value as 2. K value of 2 is ineffective here.
G82X__P__K__ Hole machining method is modified, and hole machining
4
parameter Z, R and F keep their respective mode status values. Provide the value of hole machining parameter P and designate to repeat K times.
5
6
G80X__Y__ Fixed cycle is canceled, and all hole machining
parameters are canceled except F.
G85X__Y__Z__R__P __
As the fixed cycle is canceled when 5 is executed, the necessary hole machining parameters, except F, must be provided again, even if these parameters are unchanged when compared to the original values.
X__Z__ Axis X is located to the instructed point for machining the
7
hole. The hole machining parameter Z is modified in this program segment.
众为兴数控技术有限公司
Adtech Technology Cord
3-55
G89X__Y__ Position to XY’s instructed point for hole machining. The
8
9
below:
¾
G01X__Y__ The mode status of fixed cycle is canceled. All hole
The following methods are used for indicating the feed of each segment in the figures
To indicate the movement with the fast feerate: ――→ To indicate the movement with the cutting feerate: → To indicate the manual feed:
G73(High-speed drilling cycle)
Format:G73 X_ Y_ Z_ R_ Q_ F_
hole machining method is modified as G98. R and P are designated by 6 and Z by 7.
machining parameters, except F, are canceled.
In the high-speed drilling cycle for deep holes, the feed from R to Z is accomplished section by section. After each section of cutting feed is finished, axis Z will lift upward for some distance, then the cutting feed of the next section will be performed. The distance d, by which the axis Z lifts upward, is provided by 531# parameter. The depth of feed is provided by the hole machining parameter Q each time. This fixed cycle is mainly used for machining holes with small radius-depth ratio (likeΦ5, depth of 70). The action that axis Z lifts upward each time the cutting feed of each section is finished plays a role of breaking chips.
G74(Back whorl tapping cycle)
¾
Format G74 X_ Y_ Z_ R_ F_(D_)
X_Y_: whorl position
Z_: whorl depth
R_: initial point of the feed and feed withdrawal
3-56
3G Code Program
F_(D_): calculate the feed speed according to the pitch, or give the pitch
distance with D_ directly.
Notice: in the cycle of G74 and G84, the function of the feed rate switch and feed holding switch will be neglected, namely the feed rate will be keep at 100%, and it can not stop before a fixed cycle has been executed, the main shaft should be ordered to to rotate around the tapping direction before the cycle.
G80(Cancel the fixed cycle)
¾
After instruction G80 is executed, the fixed cycle will be canceled by this instruction, and all hole machining parameters of R and Z, except F, will be canceled. G code of another group 01 can play the same role.
G81(Drilling Cycle)
¾
Format G81 X_ Y_ Z_ R_ F_
众为兴数控技术有限公司
Adtech Technology Cord
3-57
G81 is the simplest fixed cycle, whose execution process can be described as: after X, Y locating, axis Z fast moves to R, and moves to Z with F rate, then fast returns to initial point (G98) or R (G99). There is no action at the hole bottom.
G82(Drilling cycle,Boring cycle)
¾
Format G82 X_ Y_ Z_ R_ P_F_
The fixed cycle of G82 has an action of pause at the hole bottom. Other procedures are
the same as G81. The pause at the hole bottom can improve the precision on hole’s depth.
G83(Deep-hole Drilling Cycle)
¾
Format G83 X_ Y_ Z_ R_ Q_ F_
Similar to G73, under instruction G83, the feed from R to Z is also accomplished section by section. Unlike G73, axis Z returns to R after the feed of one section is finished. Then it moves at fast feedrate to the position, which keeps a distance of d to the start point of the next feed section, and starts the movement for the feed of next section. The feed distance for each section is given by the machining parameter Q, which is a positive value permanently. The vale of d is provided by the parameters of 532#machine tool. Please refer to Figure 8.9:
3-58
3G Code Program
G84(Tapping Cycle)
¾
Format G84 X_ Y_ Z_ R_ F_(D_)
X_Y_: whorl position
Z_: whorl depth
R_: initial point of the feed and feed withdrawal
F_(D_): calculate the feed speed according to the pitch, or give the pitch distance with D_ directly.
Notice: In the cycle of G74, G84, the function of feed rate switch and feed holding switch will be ignored, namely feed rate is kept at 100%, it can not stop before a fixed cycle is finished, you should command main shaft to rotate along the tapping direction before the cycle.
众为兴数控技术有限公司
Adtech Technology Cord
3-59
7)G85(Boring Cycle)
Format G85 X_ Y_ Z_ R_ F_
This is a very simple fixed cycle, whose execution process can be described as: after X, Y locating, axis Z fast moves to R, and moves to point Z with rate designated by F, then fast returns to R. If it is under G98 mode status, it will fast return to the initial point after returning to R.
G86(Boring Cycle)
¾
Format G86 X_ Y_ Z_ R_ F_
The execution process of this fixed cycle is similar with G81. The difference between them is that in G86 the spindle will be stopped after the cutter moves to the hole bottom. It will make the spindle rotate with the original direction and speed after the cutter returns to R and the initial point.
3-60
3G Code Program
G88(Boring Cycle)
¾
Manual return is available in fixed cycle G88, which is used for boring in the cycle (see the Figure below):
G89(Boring Cycle)
¾
In this fixed cycle, the pause of hole bottom is added on the basis of G85. Please refer to Figure 8.15:
Precautions on fixed cycle for hole machining
¾
a. In programming, it should be noted that the spindle must be instructed to rotate by using S and M code before the instruction for fixed cycle is executed.
M03 ; spindle on CW
.
.
G□□…… ; correct
.
.
众为兴数控技术有限公司
Adtech Technology Cord
3-61
M05 ; Spindle off
G□□……;Incorrect (instruction M03 or M04 is needed before this program segment)
b. Under the mode status of fixed cycle, the program segment including X, Y, Z and R will execute the fixed cycle. If a program segment doesn’t include any of the aforesaid addresses, this program will not execute the fixed cycle, except the address X in G04. Besides, the address P in G04 will not change the P value in the hole machining parameters.
(hole not machined) F__; (hole not machined, F value upgraded) M__; (hole not machined, only execute auxiliary functions) G04 P__;(hole not machined, use G04 P_ to change the hole machining parameter P)
c. The hole machining parameter Q and P must be designated in the executed program
segment in the fixed cycle. Otherwise, the instructed Q and P values will be ineffective.
d. In executing the fixed cycle with spindle control (such as G76 and G84), the spindle
may have not reached the instructed speed when the cutter starts cutting. In this case, the pause instruction G04 should be added between the operations for hole machining.
e. As we have discussed, the G code in group 01 can also play a role of cancelling the
fixed cycle. Therefore, the instruction for fixed cycle and the G code of group 01 should not be written in the same program.
f. If an M code is instructed in the program for executing the fixed cycle, this M code will
simultaneously executed as the fixed cycle. The signal that indicates that the instruction M has been executed will be sent out after axis Z returns to R or the initial point. When parameter K is used for repeatedly executing the fixed cycle, the M code will be executed at the first time the fixed cycle is executed.
g. Under the fixed cycle mode, the instruction G45-G48 for cutter offset will be ignored
(not executed).
h. When the switch for single program segment is set at the upper position, the fixed
cycle will stop after axis X and Y locating, fast feeding to R and returning from hole bottom (to R or initial point). In other words, to complete the machining on one hole, the start-up button for cycle needs to pressed thrice. In these three stops, the first two keep the system to be in feed hold state, and the last one make the system to be in stop state.
i.
In executing G74 and G84 cycles, if the button for feed hold is pressed between the two steps, namely axis Z moves from point R to point Z and moves from point Z to point R, the indicator for feed hold will be illuminated immediately. However, the action of the machine tool won’t be stopped immediately, and only when axis Z returns to R can the system enter the feed hold state. In addition, in the G74 and G84 cycles, the switch for feed percentage is ineffective and it remains 100%.
3-62
3G Code Program
Example for cutter length compensation and fixed cycle
¾
众为兴数控技术有限公司
Adtech Technology Cord
3-63
The value of offset number 11 is 200.0, of 15 is 190.0 and of 31 is 150.0. The offsets
are set respectively. The program is shown as follows:
N001 G92 X0 Y0 Z0 ; set the reference point of coordinate system. N002 G90 G00 Z250.0 T11 M6; change cutter. N003 G43 Z0 H11 ; At the initial point, cutter length compensation oF plane. N004 S30 M3 ; Spindle starts up. N005 G99 G81 X400.0 Y-350.0 Z-153.0 R-97.0 F120.0 ; Machine hole #1 after locating. N006 Y-550.0 ; Machine hole #2 after locating, return to plane of R. N007 G98 Y-750.0 ; Machine hole #3 after locating, return to plane of initial point.
N008 G99 X1200.0 ; Machine hole #4 after locating, return to plane of R. N009 Y-550.0 ; Machine hole #5 after locating, return to plane of R. N010 G98 Y-350.0 ; Machine hole #6 after locating, return to plane of initial point.
N011 G00 X0 Y0 M5 ; Return to reference point, spindle off. N012 G49 Z250.0 T15 M6 ; Cancel cutter length compensation, change cutter. N013 G43 Z0 H15 ; On the plane of initial point, cutter length compensation.
N014 S20 M3 ; Spindle starts up. N015 G99 G82 X550.0 Y-450.0 ; Z-130.0 R-97.0 P30 F70; Machine hole #7 after locating, return to plane of R. N016 G98 Y-650.0 ; Machine hole #8 after locating, return to plane of initial point.
N017 G99 X1050.0 ; Machine hole #9 after locating, return to plane of R. N018 G98 Y-450.0 ; Machine hole #10 after locating, return to plane of initial point.
N019 G00 X0 Y0 M5 ; Return to reference point, spindle off. N020 G49 Z250.0 T31 M6 ; Cancel cutter length compensation, change cutter. N021 G43 Z0 H31 ; Cutter length compensation at the plane of initial point. N022 S10 M3 ; Spindle starts up. N023 G85 G99 X800.0 Y-350.0 ;
Z-153.0 R47.0 F50 N024 G91 Y-200.0 ; Machine hole #12 and #13 after locating, return to plane of R. Y-200.0 ; N025 G00 G90 X0 Y0 M5 ; Return to reference point, spindle off. N026 G49 Z0 ; Cancel cutter length compensation. N027 M30 ;% Program stop.
Machine hole #11 after locating, return to plane of R.
3.3
selection, and other programmable miscellaneous functions are realized via M code.
3-64
Assistant Function
In this System, S code is used for programming the spindle speed, T code for cutter
(M,S,T)
3G Code Program
3.3.1 M Code
M Code List:
M Code Function
M01 Program stop M03 Spindle on CW M04 Spindle on CCW M05 Spindle stop M06 Change cutter command M08 Open cooling M09 Close cooling
M32 lubrication open M33 lubrication close
M30 Program finished and return to program header M98 Invoke subprogram M99 Subprogram finished and return/repeated execution M56 Output NO.2 interrupt port is high electric level M57 Output NO.2 interrupt port is low electric level M58 Output NO.3 interrupt port is high electric level M59 Output NO.3 interrupt port is low electric level M10 Output NO.6 interrupt port is high electric level M11 Output NO.6 interrupt port is high electric level M20 Output NO.7 interrupt port is high electric level M21 Output NO.7 interrupt port is low electric level M12 Output NO.8 interrupt port is high electric level M13 Output NO.8 interrupt port is low electric level M14 Output NO.9 interrupt port is high electric level M15 Output NO.9 interrupt port is low electric level M16 Output NO.10 interrupt port is high electric level M17 Output NO.10 interrupt port is low electric level M18 Output NO.11 interrupt port is high electric level M19 Output NO.11 interrupt port is low electric level M40 Output NO.12 interrupt port is high electric level M41 Output NO.12 interrupt port is low electric level M42 Output NO.13 interrupt port is high electric level M43 Output NO.13 interrupt port is low electric level M44 Output NO.14 interrupt port is high electric level M45 Output NO.14 interrupt port is low electric level M46 Output NO.15 interrupt port is high electric level M47 Output NO.15 interrupt port is low electric level M48 Output NO.16 interrupt port is high electric level M49 Output NO.16interrupt port is low electric level M50 Output NO.17 interrupt port is high electric level M51 Output NO.17 interrupt port is low electric level M66 Output NO.20 interrupt port is high electric level M67 Output NO.20 interrupt port is low electric level
众为兴数控技术有限公司
Adtech Technology Cord
3-65
M64 Output NO.21 interrupt port is high electric level M65 Output NO.21 interrupt port is low electric level M62 Output NO.22 interrupt port is high electric level M63 Output NO.22 interrupt port is low electric level M60 Output NO.23 interrupt port is high electric level M61 Output NO.23 interrupt port is low electric level M88 Pn Lm
Inspect waiting input IO(IN n)whether the level signal m(high or low)
M89 Pn Lm Qt
Output OUT n, level is m,t millisecond delay to output
In machine tools, the roles of M code can be classified as two types: One is used for
controlling the execution of the program and the other is used for controlling the action execution of the spindle, ATC device, cooling system and other auxiliary equipment.
Used M codes for program control
The M codes for program control include M00, M30, M98 and M99, whose functions are
respectively described as follows:
M00………Program stop. When NC receives M100, the program execution will be interrupted. The program execution will be resumed after resetting and pressing start-up button.
M30………Program end, and return to program header.
M98………Invoke subprogram.
M99………Subprogram end, and return to main program.
Other M Code
M03………spindle on cw. Use this instruction to allow the spindle to rotate counter-clockwise at the current designated speed (CWW).
M04………Spindle on cww. Use this instruction to allow the spindle to rotate clockwise at
the current designated speed (CW).
M05………spindle stop.
M06………Change cutter. M06 T02 is used for changing to cutter 2#.
M08………open cooling.
M09………close cooling.
M32………lubrication open.
M33………lubrication close.
M88………specified input IO to carry out level judgement, continue carrying out if it is the same or wait always. If the level signal is not specified, then default it as low level signal. For instance, M88 P0 L1 waiting INO is high level, of wait always.
M89………specify output IO as the specified level judgement, if there is no specified
level signal, default is as the low level, if the Q value is specified, then this operation should has Q millisecond delay before output the IO signal. For instance, M89 P5 L0, specify OUT5 output low level.
Notice:
z
when the move instruction and M is in the same programm segment, then the M instruction will be carried out
preferentially.
z
If there are more than one M code in the program, then there is only one is in effect, that is the last defined M code is
in effect.
3-66
Loading...