adtech ADT-CNC4640 Programming Manual

ADT-CNC4640
CNC4640M Milling Machine Control System
Programming Manual
Adtech (Shenzhen) Technology Co., Ltd.
Add: F/5, Bldg/27-29, Tianxia IC Industrial Park, Yiyuan Rd, Nanshan District,
Tel: 0755-26722719 Fax: 0755-26722718
E-mail:
adtcnc@machine-controller.com http://www.machine-controller.com
CNC4640 Programming Manual
Copyright
Adtech (Shenzhen) Technology Co., Ltd. (Adtech hereafter) is in possession of the copyright of this manual. Without the permission of Adtech, the imitation, copy, transcription and translation by any organization or individual are prohibited. This manual doesn’t contain any assurance, stance or implication in any form. Adtech and the employees are not responsible for any direct or indirect data disclosure, profits loss or cause termination caused by this manual or any information about mentioned products in this manual. In addition, the products and data in this manual are subject to changes without prior notice.
All rights reserved.
Adtech (Shenzhen) Technology Co., Ltd.
II
Version History
Item No. First uploaded on Version No. Pages Compiled by Typeset by
XT20100819 2011-3-01 A0101 81 Yang Jipeng Yang Jipeng
XT20100819 2011-10-12 A0201 91 Yang Jipeng Yang Jipeng
Revision
Date Version/Page Result Confirmed by
III
CNC4640 Programming Manual
Remark:
We have collated and checked this Manual strictly, but we can’t ensure that there are no error and omission in this Manual. Due to constant improvement of product functions and service quality, any products and software described in this manual and the content of the manual are subject to changes without prior notice.
IV
Adtech (Shenzhen) Technology Co., Ltd. Contents
Contents
1. Operating procedures of CNC machine tool ....................................................................1-1
2. Identifying the machine tool...............................................................................................2-2
2.1 Motion direction naming of control axes......................................................................................................................... 2-2
2.2 Coordinate systems of machine tool and workpiece........................................................................................................ 2-3
3. Preparation functions..........................................................................................................3-4
3.1 Modal and non-modal function ....................................................................................................................................... 3-4
3.2 Standard G codes list....................................................................................................................................................... 3-4
4. CNC program structure .....................................................................................................4-1
4.1 Program structure ............................................................................................................................................................ 4-1
4.2 Main program and subroutine.......................................................................................................................................... 4-3
5. Position instructions............................................................................................................5-1
5.1 Programming mode instruction ....................................................................................................................................... 5-1
6. Feeding, rapid traverse, interpolation function (G00-G03, G17-G19)...........................6-2
6.1 Feeding............................................................................................................................................................................ 6-2
6.2 Rapid positioning (G00).................................................................................................................................................. 6-2
6.3 Linear interpolation (G01)............................................................................................................................................... 6-3
6.4 Plane selection (G17-G19) .............................................................................................................................................. 6-3
6.5 Arc interpolation (G02, G03)........................................................................................................................................... 6-4
7. Pause instruction (G04) ......................................................................................................7-7
8. Coordinate system setting function (G52-G59, G591-G599, G92)..................................8-2
8.1 Machine tool coordinate system (G53)............................................................................................................................ 8-2
8.2 Workpiece coordinate system.......................................................................................................................................... 8-2
8.2.1 Programmable workpiece coordinate system (G92) ............................................................................................. 8-3
8.2.2 Using preset workpiece coordinate system (G54~G59, G591~G599).................................................................. 8-3
8.3 Local coordinate system (G52)........................................................................................................................................ 8-4
8.4 Operation related to reference point ................................................................................................................................ 8-5
8.4.1 Auto return to reference point (G28) .................................................................................................................... 8-5
8.4.2 Auto return from reference point (G29)................................................................................................................ 8-6
8.4.3 Reference point return checking (G27)................................................................................................................. 8-7
9. Tool compensation function................................................................................................9-1
9.1 Tool compensation........................................................................................................................................................... 9-1
9.2 Tool length compensation................................................................................................................................................ 9-1
9.3 Tool radius compensation................................................................................................................................................ 9-2
9.3.1 Tool radius compensation action .......................................................................................................................... 9-3
9.3.2 Other instructions and actions during tool radius compensation........................................................................... 9-8
9.3.3 G41/G42 instruction and I, J, K designation....................................................................................................... 9-14
9.3.4 Insertion treatment during tool radius compensation.......................................................................................... 9-18
9.3.5 Notes for tool radius compensation.................................................................................................................... 9-20
9.3.6 Compensation number change in compensation mode....................................................................................... 9-21
9.3.7 Tool radius compensation start and axis Z cut-in action ..................................................................................... 9-22
10. Hole processing function...................................................................................................10-1
10.1 Standard fixed cycle .................................................................................................................................................... 10-1
10.2 High-speed deep-hole drilling cycle (G73).................................................................................................................. 10-3
10.3 Reverse-threading cycle (G74).................................................................................................................................... 10-5
10.4 Cancel fixed cycle (G80)............................................................................................................................................. 10-5
10.5 Drilling cycle (G81) .................................................................................................................................................... 10-5
10.6 Drilling cycle, rough boring cycle (G82)..................................................................................................................... 10-6
10.7 Deep-hole drilling cycle (G83).................................................................................................................................... 10-7
10.8 Tapping cycle (G84).................................................................................................................................................... 10-7
10.9 Boring cycle (G85)...................................................................................................................................................... 10-8
10.10 Boring cycle (G86).................................................................................................................................................... 10-9
10.11 Boring cycle (G88).................................................................................................................................................... 10-9
10.12 Boring cycle (G89).................................................................................................................................................... 10-9
10.13 Notes for using hole processing fixed cycle ............................................................................................................ 10-10
10.14 Examples of using tool length compensation and fixed cycle ................................................................................. 10-11
11. Auxiliary function .............................................................................................................11-1
11.1 M code......................................................................................................................................................................... 11-1
11.2 Principal axis speed function....................................................................................................................................... 11-2
11.3 Tool function................................................................................................................................................................ 11-3
12. Category B macro function..............................................................................................12-1
12.1 Variable instruction...................................................................................................................................................... 12-1
12.2 Macro program call ..................................................................................................................................................... 12-2
12.2.1 Using macro calling function............................................................................................................................ 12-2
12.2.2 Macro program calling command............................................................................................................................. 12-2
I
Contents Adtech (Shenzhen) Technology Co., Ltd.
12.3 Variable........................................................................................................................................................................ 12-6
12.4 Types of variables........................................................................................................................................................ 12-6
12.5 Calculus instruction ..................................................................................................................................................... 12-8
12.6 Control instruction..................................................................................................................................................... 12-12
12.6.1 Conditional instruction ...................................................................................................................................12-12
12.6.2 Cycle conditional instruction.......................................................................................................................... 12-12
12.7 Notes of using macro................................................................................................................................................. 12-14
12.8 Macro variable user parameters system configuration............................................................................................... 12-14
13. CAD function...................................................................................................................13-16
13.1 Function..................................................................................................................................................................... 13-16
13.2 Keywords description................................................................................................................................................ 13-17
13.3 Example..................................................................................................................................................................... 13-17
14. Automatic tool change (ATC) ..........................................................................................14-1
II
Adtech (Shenzhen) Technology Co., Ltd. 4. CNC Programming Structure
1. Operating procedures of CNC machine tool
The step of CNC processing follows:
Fig. 1.1 CNC System Operation Flow
Programming:
Draw part drawing and write processing program (manual or CAM software)
Operating machine tool:
Read the program into CNC system, install the workpiece and the tool properly, and operate the tool to complete the processing task of preset track. Therefore, programming is the first step of CNC operating, and also the main content of the manual. The details are in the chapters below.
1-1
4. CNC Programming Structure Adtech (Shenzhen) Technology Co., Ltd.
2. Identifying the machine tool
2.1 Motion direction naming of control axes
Fig. 2.1 Name of the machine tool coordinate axis Fig. 2.2 Rotation axis direction determination of the
machine tool
This system can control the rapid traverse, feeding and interpolation of four axes. The axis direction is defined in Cartesian coordinate system, as shown below (facing to the machine tool):
Z axis:
The up and down movement of the tool relative to the workpiece is Z axis motion, with the upward movement the positive motion and the downward movement the negative motion.
X axis:
The left and right movement of the tool relative to the workpiece is X axis motion, with the rightward movement the positive motion and the leftward movement the negative motion.
Y axis:
The forward and backward movement of the tool relative to the workpiece is Y axis motion, with the forward movement the positive motion and the backward movement the negative motion.
Principal axis:
Look down to the workpiece, the clockwise rotation is principal axis positive rotation and the counterclockwise rotation is negative rotation.
A, B, C axes:
The positive directions of rotation axes correspond to the positive directions of X, Y, Z axis, which are determined according to the forward direction of right hand screw.
O Notice:
The X, Y, Z, A, B, C axis motion described in this manual is the tool’s motion relative to the workpiece, i.e. it is assumed
that the workpiece coordinate system has been set.
2-2
Adtech (Shenzhen) Technology Co., Ltd. 4. CNC Programming Structure
2.2 Coordinate systems of machine tool and workpiece
Machine tool coordinate system:
The coordinate system fixed on the machine tool is created through returning to reference point after NC is electrified every time. To select machine tool coordinate system, use G53 instruction.
Workpiece coordinate system:
When start programming, the programmer doesn’t know the position of the workpiece on the machine tool, and usually uses a point on the workpiece as the reference point to write processing program. The coordinate system created with this reference point is the workpiece coordinate system. When the workpiece is fixed on the worktable of the machine tool, move the tool to specified workpiece reference point and set the coordinate value of this point as the origin of workpiece coordinate system, and the tool will use this workpiece coordinate system as the reference system and process according to program instruction when the system executes the machining program. Therefore, the origin offset function of coordinate system is very important to CNC machine tool. This system can preset six workpiece coordinate systems (nine extended coordinate systems G591-G599 are added in new version). Set the offset of every workpiece coordinate system origin relative to machine tool coordinate system origin, and then use G5X (5X is the specific workpiece coordinate system number, the same below) instruction to select. G5X are nodal instructions, corresponding to 1#~6# preset workpiece coordinate system respectively.
Fig. 2.3 Workpiece Coordinate System Diagram
2-3
4. CNC Programming Structure Adtech (Shenzhen) Technology Co., Ltd.
3. Preparation functions
3.1 Modal and non-modal function
G code determines the function of the command and can be classified into two types:
Non-modal G code:
G code is only valid in defined program segment
Modal G code:
G code is always valid, until next G code of same group appears.
B Example: G01 and G00 are modal G codes
G01X_; Y_; G01 is valid in this range Z_; G00X_;
3.2 Standard G codes list
G code Group Function
*G00 Positioning (rapid traverse)
G01 Linear interpolation (cutting feeding)
G02 Arc interpolation CW (clockwise)
G03
G04 00 Pause, accurate stop
*G17 XY plane selection
G18 ZX plane selection
G19
G20 Imperial data entry
*G21
G27 Return to and check reference point
G28 Return to reference point
G29
*G40 Tool radius compensation cancel
G41 Left tool radius compensation
G42
G43 Positive tool length offset
01
Arc interpolation CCW(counterclockwise)
02
YZ plane selection
06
Metric data entry
00
Return from reference point
07
Right tool radius compensation
3-4
G44 Negative tool length offset
*G49
G52 Local coordinate system setting
G53
*G54 Workpiece coordinate system 1
G55 Workpiece coordinate system 2
G56 Workpiece coordinate system 3
G57
08
Tool length offset cancel
00
Select machine tool coordinate system
05
Workpiece coordinate system 4
Adtech (Shenzhen) Technology Co., Ltd. 4. CNC Programming Structure
G code Group Function
G58 Workpiece coordinate system 5
G59 Workpiece coordinate system 6
G591 Extended workpiece coordinate system 7
G592 Extended workpiece coordinate system 8
G593 Extended workpiece coordinate system 9
G594 Extended workpiece coordinate system 10
G595 Extended workpiece coordinate system 11
G596 Extended workpiece coordinate system 12
G597 Extended workpiece coordinate system 13
G598 Extended workpiece coordinate system 14
G599 Extended workpiece coordinate system 15
G65 00 Macro program command
G73 Deep hole drilling fixed cycle
G74 Reverse threading fixed cycle
G76 Boring fixed cycle
*G80 Cancel fixed cycle
G81 Drilling fixed cycle
G82 Drilling fixed cycle
G83 Deep hole drilling fixed cycle
G84 Taping fixed cycle
G85 Boring fixed cycle
G86 Boring fixed cycle
G87 Reverse boring fixed cycle
G88 Boring fixed cycle
G89
*G90 Absolute value programming
G91
G92 01 Programmable workpiece coordinate system setting
*G98 Return to initial plane in fixed cycle
G99
09
Boring fixed cycle
03
Increment value programming
10
Return to point R plane in fixed cycle
O Notice:
The items marked with * are the default modal values of G codes of the system;
3-5
Adtech (Shenzhen) Technology Co., Ltd. 4. CNC Programming Structure
4. CNC program structure
4.1 Program structure
CNC processing program consists of the following parts:
Fig. 4.1 CNC Program Structure Diagram
Program name:
Used to mark different programs, and consists of O and four digits.
Ü If the start of the program doesn’t have program name, the program segment No. of the program start will be
considered as the program name by default;
Ü If the program segment No. contains five digits, the latter four digits will be used as the program name; Ü If the latter four digits are 0, add 1 automatically to use as the program name; Ü N0 can’t be used as program name; Ü When saving the program, if both program name and program segment No. don’t exist, it is necessary to make a
program name through MDI panel.
Note:
The content in the parentheses, in which the user can specify notes, guide, etc.:
Ü The note doesn’t have limit on length; if the program has a long note, the axis motion will pause for a while; therefore,
if a long note is required, please put it at the place that motion pauses or without motion;
Ü If there is only one “)” without “(”, “)” will be ignored; Ü The note may have multiple lines and are separated with space; Ü During processing, the note can’t be executed.
Instruction address:
One English letter in the text of the processing program (“Address” hereinafter)
Instruction word:
Adding a number after the instruction address will constitute an instruction word.
Program segment No.:
Consist of letter N and number (5 digits), and can be randomly arranged.
Ü The sequence of executing program segments only related to the storage position rather than program segment No.; Ü If program segment N20 appears before program segment N10, N20 shall be executed first.
Program segment:
A program segment consists of one or several instruction word and ends with “;”;
4-1
4. CNC Programming Structure Adtech (Shenzhen) Technology Co., Ltd.
N_ G_ X_ Z_ F_ S_ T_ M_ ; Program segment No. Preparation Size definition Feeding speed Principal axis rotation Tool change Auxiliary function
Skip symbol:
If the first character of a program segment is “/”, this program segment is conditional, i.e. skip switch. In upper position, this program segment isn’t executed; when the skip switch is in lower position, this program segment is executed.
Program end:
Generally, the following codes are used when program ends:
Code Action
M30 End main program
M99 End subroutine
H Note:
After M30 is executed, CNC stops executing and returns to program start;
After M99 is executed, CNC returns to the program that calls this subroutine and continues executing.
File end:
If the program end doesn’t have %, CNC is reset. Instruction word is the basic unit of program segment. Every address has unique meaning, and the following values also have different formats and ranges, as in the Table below:
Table 4.1 Instruction Address and Range of Command Value
Function Address Range Meaning
Program name O 1~9999 Program No.
Program segment No. Preparation function
Size definition
Feeding rate F 1~100,000mm/min Feeding rate
Principal axis rotation
Select tool T 0~99 Tool No.
Auxiliary function M 0~99 Auxiliary function M code No.
Tool offset No. H, D 1~200 Specify tool offset No.
Pause time P, X 0~65sec Pause time (ms)
Specify subroutine No.
Repeat times P, L 1~999 To call subroutine
Parameter P, Q, R
N 1~9999 Sequence No.
G 00~99 Specify motion mode (linear, arc…)
X, Y, Z ±99999.999mm Coordinate position value
R ±99999.999mm Arc radius, corner radius
I, J, K ±9999.9999mm Arc center coordinate position value
S 1~4000rpm Principal axis rotation
P 1~9999 To call subroutine
P is 0~99999.999 Q is ±99999.999mm R is ±99999.999
Fixed cycle parameters
4-2
Adtech (Shenzhen) Technology Co., Ltd. 4. CNC Programming Structure
4.2 Main program and subroutine
The processing programs include main programs and subroutines. Generally, NC executes the instructions of main program; however, NC will turn to execute subroutine when executes a subroutine calling instruction, and will return to the main program when executes the return instruction in subroutine. When the processing program needs to run same track for several times, edit this track into the subroutine and save in the program memory of the machine tool, and this subroutine can be called when this track should be executed in the program. When the main program calls a subroutine, this subroutine can call another subroutine, which is called double nesting. Generally, the machine tool allows up to quadruple subroutine nesting. In calling subroutine instruction, the subroutine can be repeated for 999 times.
Fig. 4.2 Main Program and Subroutine
Subroutine format:
OXXXX ; Subroutine name ………… ; ………… ; Subroutine content ………… ; M99 ; Subroutine ends, and returns to previous program
B Example: X100.0 Y100.0 M99; H Note:
Program start should have a subroutine name specified by address O
M99 doesn’t need to appear in a program segment separately.
Subroutine call format:
M98P XXX XXXX
H Note:
In the number following address P, the latter four digits are used to specify the program No. of called subroutine, and the
4-3
former three digits are used to specify the repeat times of calling.
B Example:
M98 P41005; call subroutine 1005, repeat four times
4. CNC Programming Structure Adtech (Shenzhen) Technology Co., Ltd.
G90 G00 X-75. Y50. Z53. M98 P40035; this program segment specifies the X, Y, Z axis to fast locate the instruction
position, and then call subroutine 0035 for four times.
H Note:
Ü If the calling time isn’t specified, the subroutine will be called only once; Ü M98 doesn’t need to appear in a program segment separately; Ü Different from other M codes, M98 and M99 won’t send signal to the machine tool when executing; Ü NC gives an alarm if can’t find the program No. specified by address P; Ü Subroutine call instruction M98 can’t be executed in MDI mode; to execute a subroutine separately, please edit the
following program in the editing mode, and execute in automatic running mode.
O×××; M98 P××××; M30;
4-4
Adtech (Shenzhen) Technology Co., Ltd. 7. Pause Instruction
5. Position instructions
5.1 Programming mode instruction
Function:
Tool motion instructions include absolute value instruction and increment value instruction. In absolute value instruction mode, the coordinate value of the motion end in current coordinate system is specified; in increment value instruction, the distance of every coordinate axis relative to the start point motion is specified.
Format:
G90 X_ Y_ Z_ α_; G91 X_ Y_ Z_ α_; G90……… absolute value instruction G91……… increment value instruction α……… additional axis
Details:
In absolute value instruction mode, the tool motion is unrelated to current position, and moves according to the position of specified workpiece coordinate system; In increment value instruction, the current position is the start point;
Fig. 1.1 Graphic Description Text
For the instructions from workpiece coordinate system home, absolute value or increment value coordinate instructions are same;
G90 and G91 are modal instructions, and are always valid until next new setting of G90 and G91.
5-1
7. Pause Instruction Adtech (Shenzhen) Technology Co., Ltd.
6. Feeding, rapid traverse, interpolation function (G00-G03, G17-G19)
6.1 Feeding
The feeding of CNC machine tool is classified into quick positioning and cutting feeding. The quick positioning feeding appears in the motion between quick feeding and positioning during manual rapid traverse and fixed cycle of instruction G00. The speed of quick positioning feeding is specified by machine tool parameters. During quick positioning feeding, the motions among feeding axes are disrelated, and move at the rapid traverse speed set by the parameters respectively. Generally, tool track is a broken line or straight line. Cutting feeding appears in the processing feeding in G01, G02/03 and fixed cycle, and cutting feeding speed is specified by address F (unit: mm/min). In processing program, F is a modal value, i.e. original programmed F value is always valid before a new F value is specified. When CNC system is just electrified, F value is specified by system parameter. The axes of feeding are in interpolation relation, and the composition of their motions is cutting feeding motion. The maximum value of F is controlled by system parameter; if the programmed F value is larger than this value, the actual feeding cutting speed is also this value. The cutting feeding speed also can be controlled by the feeding rate switch on the operation panel, and the actual cutting feeding speed is the product of specified F value and feeding rate. The range of rate is 10%-150%.
6.2 Rapid positioning (G00)
Function:
Every axis moves to specified position at specified fast traverse speed respectively; in absolute coordinate system, the specified motion end is the coordinate value in current coordinate system; in increment coordinate system, the motion distance of every coordinate axis relative to start point is specified.
Format:
G00 X_ Y_ Z_α_; (α is additional axis) X Y Z α is coordinate value; absolute or increment programming mode is determined according to G90 or G91 state specified by the program.
Details:
This instruction changes other G functions; G00 is always valid until the G01, G02 and G03 instructions of same group (01) appears; when G00 mode is valid, the latter instructions only need to specify coordinate X, Y, Z. In G00 mode, the tool always accelerates at the start point and decelerates at the end point of every path. It will execute next path only after the in-place state is confirmed. When every motion axis reaches the end point, CNC considers that this program segment has ended and turns to next program segment. When G00 instruction is valid, the G code function of group 09 (G73-G89) turns into cancellation state (G80). The motions among different axes are disrelated, i.e. tool path is straight line or broken line (confirmed by selected parameters), but the positioning time doesn’t change. Straight line path: same as linear interpolation (G01) mode, the speed is limited by the fast feeding speed of every axis. Broken line path: every axis is independent and moves for positioning at the maximum speed.
O Notice:
If there is no following number, G will be treated as G00.
B Example:
The position of start point is X-50, Y-75; instruction G00 X150. Y25.; the tool will have the track shown in the figure below.
6-2
Fig. 6.1 G00 Programming Diagram
Adtech (Shenzhen) Technology Co., Ltd. 7. Pause Instruction
6.3 Linear interpolation (G01)
Function:
G01 changes current interpolation state into linear interpolation, tool moves to specified position from current position, and the track is a straight line from start point to end point.
Format:
G01 X_ Y_ Z_ α_ F_; (α is additional axis) X Y Z α is coordinate value; absolute or increment programming mode is determined according to G90 or G91 state specified by the program. F indicates the speed of linear motion (unit: mm/min)
Details:
This instruction changes other G functions, and G01 is always valid until G00, G02 or G03 instruction of same group (01) appears. If the next instruction is still G01 and the feeding speed is same, G01 can be ignored. If the program segment in which G01 instruction appears for the first time doesn’t have F instruction, there will be error.
B Example:
The feeding speed of rotation axis is expressed in °/min. (F300=300°/min) Suppose that the current point of the tool is X-50. Y-75., the following program segment N1 G01 X150. Y25. F100 ; N2 X50. Y75.; will make the tool have the track shown in the figure below.
Fig 6.2 G01 Programming Diagram
6.4 Plane selection (G17-G19)
Function:
This group of instruction is used to select the plane of arc interpolation and tool radius compensation.
Format:
G17………select XY plane G18………select ZX plane G19………select YZ plane X, Y, Z indicate the coordinate axes or parallel axes
6-3
7. Pause Instruction Adtech (Shenzhen) Technology Co., Ltd.
Details:
When the system is electrified, plane XY is selected by default. In the program segment without instruction G17, G18 or G19, the plane doesn’t have any change.
B Example: B
G18 X_ Z_ ;ZX plane X_ Y_ ; plane doesn’t change (ZX plane)
Motion instruction is disrelated to plane selection.
B Example:
Under the following instruction,
G17 Z_ ; Z axis doesn’t exist on XY plane, and Z axis motion is disrelated to XY plane.
About the instructions related to plane selection, please refer to the content related to arc interpolation and tool compensation instructions.
6.5 Arc interpolation (G02, G03)
Function:
Used to move the tool in arc track
Format:
On X—Y plane G17 { G02 / G03 } X__ Y__ { ( I__ J__ ) / R__ } F__ ; On X--Z plane G18 { G02 / G03 } X__ Z__ { ( I__ K__ ) / R__ } F__ ; On Y--Z plane G19 { G02 / G03 } Y__ Z__ { ( J__ K__ ) / R__ } F__ ;
Table 6.1 Arc Interpolation Command Format Description
S/N Data content Instruction Meaning
G17 Specify the arc interpolation on X—Y plane
1 Plane selection
2 Arc direction
G90 mode Two axes instruction in X, Y, Z
3 End point
G91 mode Two axes instruction in X, Y, Z
G18 Specify the arc interpolation on Z—X plane
G19 Specify the arc interpolation on Y—Z plane
G02 Arc interpolation in clockwise direction CW
G03 Arc interpolation in counterclockwise direction CCW
The coordinate value of the end point position in current workpiece coordinate system
Distance from start point to end point ( directional)
Distance from start point to circle center
4
Arc radius R Arc radius
5 Feeding rate F The speed of arc motion
Two axes instruction in I, J, K
Distance from start point to circle center (directional)
Details:
G02 (G03) is modal instruction. The arc crossing multiple quadrants can be specified in one program segment.
6-4
Adtech (Shenzhen) Technology Co., Ltd. 7. Pause Instruction
H Note:
Arc direction X-Y plane: look to negative direction from Z axis X-Z plane: look to negative direction from Y axis Y-Z plane: look to negative direction from X axis
Fig. 6.3 Arc Interpolation Plane Definition Diagram
The end point of the arc is determined by address X, Y and Z. In G90 mode, i.e. absolute value mode, address X, Y and Z specify the coordinate value of arc end in current coordinate system; in G91 mode, i.e. increment value mode, address X, Y and Z specify the distance from the point of current tool to the end point in the direction of every axis.
In X, Y and Z direction, the distance from the point of current point to the circle center is specified by address I, J and K respectively, the symbols of which are determined by their motion directions. The coordinate value of arc end can be either in absolute value or increment value, while the coordinate value of arc center must be increment instruction from the start point. When X, Y and Z are ignored (the start point coincides with the end point), I, J and K define the circle center, and the track will be a full circle.
B Example:
G02 J50 F500; G91 G02 X50 Y50 J50 F500; The processing tracks are shown in the figures below (full circle and 3/4 arc)
Fig. 6.4 Instruction Diagram of Processing Full Circle
To program a segment of arc, in addition to specifying end point and circle center position, it is also possible by specifying radius and end point position. If the radius is specified with address R, the value of R can be either positive or negative; a positive R value can be used to determine an arc smaller than 180°, and a negative value can be used to determine an arc larger than 180°. Programming a full circle is only possible by specifying circle center.
6-5
7. Pause Instruction Adtech (Shenzhen) Technology Co., Ltd.
Fig. 6.5 Absolute/Increment Programming Diagram
Above tracks are programmed in absolute value and increment value mode as follows:
Ü Absolute value mode
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 ;
Ü Increment mode
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 ;
The feeding speed of arc interpolation is specified with F, which is the speed of tool in arc tangent direction.
6-6
Adtech (Shenzhen) Technology Co., Ltd. 7. Pause Instruction
7. Pause instruction (G04)
Function:
Pause for a period of time between two program segments.
Format:
G04 P_ or G04 X_ Address P specifies the pause time, and the minimum unit of its instruction is 0.001 second if there is no radix point. Address X specifies the pause time, and the minimum unit of its instruction is 1 second if there is no radix point.
B Example:
G04 P 1000 : pause for 1000ms, equal to 1sec G04 X 1 : pause for 1sec
7-7
8. Coordinate System Setting Function Adtech (Shenzhen) Technology Co., Ltd.
8. Coordinate system setting function (G52-G59, G591-G599,
G92)
8.1 Machine tool coordinate system (G53)
Machine tool coordinate system:
The coordinate system fixed on the machine tool is created through returning to reference point after NC is electrified every time. To select machine tool coordinate system, use G53 instruction.
Format (machine tool coordinate system):
G53 X_Y_Z_;
X_Y_Z_; The coordinate absolute value of every axis
Details:
When the machine tool is electrified, it must be reset in auto or manual mode, and the coordinate system is created basing on reset reference origin. The machine tool coordinate system won’t change before the power supply is cut off after created. The machine tool coordinate system won’t be changed due to G92 instruction. G53 instruction only can be used in absolute value mode (G90). G53 is non-modal instruction, and is only valid in current program segment. If G53 instruction and G28 instruction appear in the same program segment at the same time, the latter instruction is valid. When G53 instruction is created, cancel tool radius compensation and tool offset. All G53 instructions move in quick feeding mode. The distance between machine tool coordinate system home and machine tool reference point is determined by the parameters; unless otherwise specified, the reference point of every axis coincides with machine tool coordinate system home.
8.2 Workpiece coordinate system
Workpiece coordinate system:
When start programming, the programmer doesn’t know the position of the workpiece on the machine tool, and usually uses a point on the workpiece as the reference point to write processing program. The coordinate system created with this reference point is the workpiece coordinate system. When the workpiece is fixed on the worktable of the machine tool, move the tool to specified workpiece reference point and set the coordinate value of this point as the origin of workpiece coordinate system, and the tool will use this workpiece coordinate system as the reference system and process according to program instruction when the system executes the machining program. Therefore, the origin offset function of coordinate system is very important to CNC machine tool.
8-2
Adtech (Shenzhen) Technology Co., Ltd. 7. Pause Instruction
8.2.1 Programmable workpiece coordinate system (G92)
Function:
This instruction creates a new workpiece coordinate system, so that the coordinate value of the point where current tool locate is the value of IP_ instruction in this workpiece coordinate system. (as shown in Fig. 8.1)
Format:
(G90) G92 X_Y_Z_; X_Y_Z_; The coordinate absolute value of every axis
Details:
G92 instruction is a non-modal instruction, but the workpiece coordinate system created with this instruction is modal. Actually, this instruction also specifies an offset, which is specified indirectly. It is the coordinate value of new workpiece coordinate system origin in original workpiece coordinate system; seen from G92 function, this offset is the difference between the coordinate value of the tool in original workpiece coordinate system and IP_ instruction value. ( as shown in Fig. 8.1)
If G92 instruction is used for several times, the offset specified by G92 instruction will superpose. For every preset workpiece coordinate system (G54-G59), the superposed offset is valid. New coordinate system of the part is set in above instruction, e.g. the coordinate value of tool tip is IP_. Once the coordinates are confirmed, the position of the absolute value instruction is the coordinates in this coordinate system.
B Example:
The coordinates of the tool in original coordinate system are (200, 100), after executing (G92 X100 Y50): The origin of new coordinate system offsets to the position A in the lower right figure; The offset of coordinate system is (100, 50), (the difference between the coordinates of the tool in original coordinate system and IP_ instruction value). The coordinates of the tool in new coordinate system are (100, 50).
Fig. 8.1 G92 Instruction Function Diagram
8.2.2 Using preset workpiece coordinate system (G54~G59, G591~G599)
According to the loading position of the workpiece in the machine tool, this system can preset six coordinate systems (nine extended in new version); through the operation on LCD panel, set the offset of the origin of every workpiece coordinate system relative to the origin of machine tool coordinate system, and then use G54~G59, G591~G599 to select, which are modal instructions, corresponding to 1#~15# preset workpiece coordinate systems respectively.
B Example:
Preset 1# workpiece coordinate system offset: X-150.000 Y-210.000 Z-90.000 Preset 4# workpiece coordinate system offset: X-430.000 Y-330.000 Z-120.000
Program segment content
N1 G90 G54 G00 X50. Y50.; X-100, Y-160
N2 Z-70.; Z-160
N3 G01 Z-72.5 F100; Z-160.5 Linear interpolation, F value is 100
N4 X37.4; X-112.6 (Linear interpolation)
Coordinates of end point in machine tool coordinate system
Note
Select 1# coordinate system, quick positioning
8-3
8. Coordinate System Setting Function Adtech (Shenzhen) Technology Co., Ltd.
N5 G00 Z0; Z-90 Quick positioning
N6 X0 Y0 A0; X-150, Y-210
N7 G53 X0 Y0 Z0; X0, Y0, Z0
N8 G57 X50. Y50. ; X-380, Y-280 Select 4# coordinate system
N9 Z-70.; Z-190
N10 G01 Z-72.5; Z-192.5
N11 X37.4; X392.6
N12 G00 Z0; Z-120
N13 G00 X0 Y0 ; X-430, Y-330
Select to use machine tool coordinate system
Linear interpolation, F value is 100 (modal value)
Seen from above samples, the function of G54~G59 instruction is to move the coordinate origin used by NC to the point that the coordinates in machine tool coordinate system are preset value; please refer to the operation section in this manual for the method of presetting.
After returning to the home of machine tool, coordinate systems 1~6 of the workpiece are created. G54 is the initial mode after electrified. The absolute position of the position screen is the coordinates in current coordinate system.
In CNC programming of machine tool, unless otherwise specified, the IP of interpolation instruction and other instructions related to coordinates are the coordinate position in current coordinate system (the coordinate system used when the instruction is executed). In most cases, the current coordinate system is one of G54~G59, and machine tool coordinate system are seldom used directly.
8.3 Local coordinate system (G52)
Function:
G52 can create a local coordinate system, which is a sub-coordinate system equivalent to G54~G59.
Fig. 8.2 Local Coordinate System Diagram
Format:
G52 X_Y_Z_; X_Y_Z_; Equivalent to the offset of current G54~G59 coordinate systems,
Details:
In this instruction, IP_ specifies the offset equivalent to current G54~G59 coordinate systems, i.e. IP_ specifies the position coordinates of local coordinate system origin in current G54~G59 coordinate system. G52 instruction is always valid after specified until next G52 instruction is specified. G52 instruction can set the processing coordinate system without changing the workpiece coordinate system. G52 IP0 (G52 X0 Y0 Z 0 α0) can be used to cancel local coordinate system.
8-4
Adtech (Shenzhen) Technology Co., Ltd. 7. Pause Instruction
The setting of local coordinate system doesn’t change the machine tool coordinate and workpiece coordinate system. G52 instruction can replace G92 instruction to specify the offset between the origin of processing program and workpiece origin.
B Example:
Local coordinate system in absolute value mode
G28 X0 Y0; G00 G90 X1000 Y1000;
G92 X0 Y0; define workpiece coordinate system
G00 X500 Y500;
G52 X1000 Y1000; define local coordinate system
G00 X0 Y0; G01 X500 F100; Y500; G52 X0 Y0; cancel local coordinate system G00 X0 Y0;
Fig. 8.3 Local Coordinate System Usage Diagram in Absolute Value Mode
8.4 Operation related to reference point
The machine tool coordinate system is created through returning to reference point after NC is electrified every time. The reference point is a fixed point on the machine tool, and its position is determined by the installation position of stopper switch of every axis and the home position of the servo motor of every axis. When this machine tool returns to the reference point, the coordinates of the reference point in the machine tool coordinate system is X0, Y0, Z0.
8.4.1 Auto return to reference point (G28)
Function:
This instruction makes the axis return to reference point of the machine tool through the center point specified by IP at the feeding speed of quick positioning.
Format:
G28 X_ Y_ Z_α_; (α is additional axis) X Y Z α indicate the coordinates of center point.
Details:
The center point may be specified either in absolute value mode or increment value mode, which depends on current mode. Generally, this instruction is used to move the workpiece out of the processing area when the entire processing program ends, so as to unload processed parts and load the parts to be processed. When execute G28 instruction before returning to reference point manually, the motion of every started from center point is same as returning to reference point manually, and the motion direction started from the center point is positive.
8-5
8. Coordinate System Setting Function Adtech (Shenzhen) Technology Co., Ltd.
The coordinates in G28 instruction is saved as center point by NC; on another hand, if an axis isn’t contained in G28 instruction, the coordinates of the center pointed saved by NC will use the value G28 instruction specified previously.
B Example:
N0010 X20.0 Y54.0; N0020 G28 X-40.0 Y-25.0; coordinates of center point (-40.0,-25.0) N0030 G28 Z31.0; coordinates of center point (-40.0,-25.0,31.0
Fig. 8.2 Diagram of Automatically Returning to Reference Point
O Notice:
The coordinates of this center point are mainly used by G28 instruction.
In tool offset mode, tool offset is also valid for G27; for safety reasons, tool offset should be disabled before executing G28
instruction (radius offset and length offset).
8.4.2 Auto return from reference point (G29)
Function:
This instruction makes the axis move from reference point to instruction position through center point at the feeding speed of quick positioning; the position of center point is confirmed by previous G28 instruction.
Format:
G29 X_ Y_ Z_α_; (α is additional axis) X Y Z α indicate the coordinates of end point of the tool motion.
Details:
Generally, after this instruction is used for G28, the instructed axis is on reference point or second reference point. In increment value mode, the instruction value is the distance from center point to end point (instruction position). In program, the specific movement amount from center point to reference point doesn’t need to be calculated.
B G28, G29 example:
8-6
Loading...
+ 63 hidden pages