Theory and Design of CNC Systems Part 3 ppsx

35 821 1
Theory and Design of CNC Systems Part 3 ppsx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

54 2 Interpreter Table 2.4 Operations and fixed cycle function codes Operation G-code Operation G-code Peck Drilling G73 Roughing G90 Reverse Tapping G74 Threading G92 Fine Boring G76 Face roughing G94 Cycle Cancel G80 Finishing G70 Drilling Cycle, G81 Turning Roughing G71 Spot Boring Drilling Cycle, G82 Face roughing G72 Count Boring Peck Drilling G83 Copying G73 Drilling Tapping G84 Grooving G74 Rigid Tapping G84.2 Face grooving G75 Reverse Rigid G84.3 Multiple threading G76 Tapping Boring G85 Circular Elongated Holes Boring G86 Circular Back Boring G87 Milling Circumferential Slot Boring G88 Facing Boring G89 Circular Pocket to the opposite side of the tool cutter, and finally retracts the tool upwards to avoid damage to the machined surface. The detailed procedure for the fine boring cycle function is given below. 1. The tool is moved to the cut start position. 2. The tool is moved rapidly to the R position. 3. With the tool movement to the Z position, boring is carried out. 4. If G76 is commanded with P address, the dwell function is executed. 5. The spindle orientation function (M19) is executed. 6. The tool is moved rapidly by the amount specified with the Q address along the direction specified by the parameter. (In this example, it is assumed that the XY plane is selected as the machining plane and, therefore, the tool can be moved along the X-axis or Y-axis.) 7. The tool is rapidly retracted to the specified position. If the G99 code is effective, tool movement position becomes the R position and if G98 code is effective, the tool movement position becomes the cut start position. 8. The tool is moved rapidly by the length specified with the Q address to the oppo- site direction pre-defined by parameter. 9. Tool rotation starts again. 2.3 Main CNC System Functions 55 G76 (G98) G76 (G99) Retract sfter shift Start position Start position Retract after shift R position R position Z position Z position Spindle orientation after Dwell (P) Spindle orientation after Dwell (P) Shift amount (Q) Shift amount (Q) Shift movement (Rapid feed) Fig. 2.18 Fine boring cycle movements WID LENG INDA STA RAD CPA CPO Vertical axis Horizontal axis Fig. 2.19 Circular slot cycle - circular pattern of slots 56 2 Interpreter Tool Path RTP RFP+SDIS RFP MID DP FAL MIDW 1 2 3 Fig. 2.20 Face milling pattern and parameters 2.3.7 Skip Function During the execution of the skip function (G31), if an external skip signal is input, execution of the command is interrupted and the next block is executed. The skip function is commanded with linear interpolation such as G01. The skip function is used when the end of machining is not programmed but specified by a signal from the machine, for example, in grinding. It is used also for measuring the dimensions of a workpiece. Figure 2.21 shows an example of the actual toolpath after the skip signal is de- tected in the case when absolute command mode is effective and the programmed path is on the XZ plane. As soon as a skip signal is detected, the tool (in this case a touch probe is generally used) is moved to the end point of the next block regardless of whether or not the tool reaches the end point of the current block. The feedrate of the linear path commanded by the skip function is specified by the F-address or a certain parameter and this feedrate is effective only on the linear path commanded by the skip function. 2.3.8 Program Verification The part program edited by the machine tool operator is likely to include grammat- ical errors, logic errors, and numerical errors, such as incorrect computation of tool position, wrong tool-offset value, and invalid feedrate and spindle speed. Therefore, it is necessary to test the part program before executing it and the CNC system gen- erally provides the functions listed below for immediate validation. 2.3 Main CNC System Functions 57 Z X 100 100 200 300 Point when skip mode is applied Actual tool path Tool path without applying skip mode (300, 100) G90 G31 X200.0 F100 ; X300.0 Z100.0 ; The tool is moved to the point of the next block. Fig. 2.21 Skip function action 1. Dry Run: During dry run mode, the tool is moved at the feedrate specified by a parameter regardless of the feedrate specified in the program. This function is used for checking the movement of the tool in the case where the workpiece is removed from the table. The tool moves at the feedrate specified by the parameter. The feed override switch can also be used for changing the feedrate during this mode but during automatic mode, dry run is not allowed to begin. 2. Pressing the single-block switch starts single-block mode. When the cycle start button is pressed in single-block mode, the tool stops after a single block in the program is executed. This function is used for checking the program block-by- block and can be used with the dry run function and machine lock function. 3. Machine lock is used to display the change in position without moving the tool and there are two types of machine lock: all-axis machine lock, which stops move- ment along all axes, and specified-axis machine lock, which stops movement along specified axes only. 2.3.9 Advanced Functions Recently, CNC machine tools have become more accurate and faster and the func- tionality has become more complicated. To satisfy these requirements, advanced functions for high-speed and high-accuracy machining have been developed and ap- plied in addition to the functions mentioned in the previous sections. The next sec- tions describe typical advanced functions built into highly functional CNC systems. 2.3.9.1 Look Ahead Generally, the part program for surface machining (die and mold is a typical exam- ple of surface machining) consists of a sequential linear path with short length and fast feedrate. In this case, if each block is executed line by line, the actual feedrate 58 2 Interpreter becomes less than the programmed feedrate and the feedrate at the corners between one specific block and the next becomes discontinuous. Therefore, the quality of the machined surface is degraded due to frequent accel- eration/deceleration and the discontinuity of the feedrate and, after completing ma- chining, grinding becomes essential. To solve this problem, the Look-Ahead function was developed. The look-ahead function looks ahead a hundredblocks and calculates an adequate feedrate for each axis within the maximum allowable feedrate and ac- celeration/deceleration. With this function, it is possible to machine the free-form surfaces and contours of a complicated shape without stopping tool movement between successive blocks at high speed. The concept of the look-ahead function can be easily understood by comparing it with car driving. At night, it is difficult for the driver to see for long dis- tances and, therefore, it is difficult to drive at the maximum allowable speed. How- ever, during the day, a driver can see longer distances and, therefore, it is possible to examine the road status, predict maximum feasible driving speed, and, finally, to drive faster. The look-ahead function calculates the maximum feasible feedrate of the speci- fied block based on the interpreted result of the blocks that will be executed. This function requires much computing power. Recently, with the advance of CPU power, the number of the blocks that can be used for look ahead has grown to a thousand. Figure 2.22 shows the feedrate profiles when the look-ahead function is applied and when it is not and Fig. 2.22 also shows that the look-ahead function can increase the actual feedrate. When the look-ahead function is applied, the feedrate at the end of the starting block (N1) is not decelerated and the programmed feedrate is kept to the programmed feedrate. To stop at the end position of the last block (N12), the deceleration of the feedrate starts in the preceding blocks. Therefore, the look-ahead function enables high-speed machining compared to exact stop mode where acceleration and decel- eration is done at the start point and the end point of each block. Accordingly, with this function, reduction of machining time becomes possible. Feedrate Programmed feedrate Look-ahead Exact stop mode Programmed path N1 N2 N3 N4 N5 N6 N7 N8 N9N10N11 N12 F1 Fig. 2.22 Look-ahead mode and Exact stop profiles 2.3 Main CNC System Functions 59 2.3.9.2 Feedforward The conventional position control method essentially has the following error and it is proportional to the square of the feedrate during high speed machining. The cause of the control error is mainly based on the servo delay. In order to re- duce the machining error, it is necessary to increase the position control loop gain. However, increasing the position control loop gain is likely to result in machine vi- bration and make the servo system and the machine unstable. Accordingly, as the feedforward control method plays the role of making the servo system stable and in- creasing the position control loop gain, it makes it possible to reduce the machining error and achieve high-speed and high-accuracy machining. Figure 2.23 shows the actual feedrate profiles and path traces when the feedfor- ward control method is applied and when it is not applied. From Fig. 2.23, we can see that when the feedforward control method is applied, the following error decreases and the machining error obviously also decreases. Feedrate Feedrate Programmed feedrate without Feedrate forward with Feedforward Actual feedrate Programmed path Actual path Actual path without Feedforward with Feedforward t t Fig. 2.23 Feedrate profiles and path traces with and without feedforward control 2.3.9.3 NURBS Interpolation As high-speed machining and high-accuracy machining come to be generally used, the requirements for advanced functions to support them is growing. In particular, when conventional CNC systems (where free curve is defined by sequential small 60 2 Interpreter line segments or arcs) are used for machining free-form surfaces, the tool moves in a discontinuous manner and this makes the quality of the machined surface poor. Also in this case, because a lot of program blocks are required, the size of the part program is large. Because the size of the internal memory of CNC system is limited, DNC (Direct Numerical Control) mode has typically been used to machine free- form surfaces. Since the baud rate of DNC communication is restricted it becomes impossible to raise the machining speed over a restricted specific value when a con- ventional CNC system is used. To overcome this problem NURBS interpolation was developed. In this section, the necessity of NURBS interpolation will be described and the details will be given in Chapter 3. In NURBS interpolation, NURBS curve data (e.g. control points, weights, and knot vector) are directly input to the CNC system instead of the small line segment data that are defined by the G01 command. As the CNC system generates inter- polation points based on the NURBS curve data, the programmed feedrate and the tolerance, it makes it possible to perform high-speed and high-accuracy machining. Figure 2.24 shows the difference between the interpolation methods based on line-segment approximation and a NURBS curve. When offline CAM software is used the free-form curve geometry is approximated to within a pre-defined tolerance by a set of line segments. These in turn are then subdivided into a set of shorter line segments to give the desired feedrate. With direct NURBS interpolation in the CNC the interpolation the feedrate and tolerance are used to determine the step length along the curve directly to give the required speed profile. Y X NURBS curve CAD die machining drawing Y X Y X CAD die machining drawing Y X Y X NURBS curve CAM NC machining program CAM NC machining program Maximum machining error Small line segments Y X Interpolation point Small line segment data (Large amount of data) (a) Interoperation method based on small line segment approximation (b) Interoperation method based on NURBS curve Control point Control point Interpolation point Control point Knot Weight (Small amount of dada) Maximum machining error Fig. 2.24 Indirect and direct NURBS interpolation 2.3 Main CNC System Functions 61 2.3.9.4 NURBS Surface Machining For free-form surface machining, recent CAD/CAM systems include a function to transmit the free surface data into the CNC system using the NURBS surface form. The G-code format to specify the NURBS surface data is different according to the CNC maker. However, despite the differences in the G-code representation method, the data elements for representing a NURBS surface are the same. Table 2.5 summa- rizes the status of development of NURBS interpolation functions for different CNC makers. Table 2.5 Controller NURBS development summary FANUC SIEMENS OKUMA Mitsubishi Toshiba Machine 15 Series, OSP700M TOSNUC CNC Model 16 Series, 840D (spar H1 M700 888 18 Series, CNC) 30 Series CPU 64bit RISC RISC RISC Language G-code G06.2 Type: G132 G70.0 BSPLINE G70.1 Figure 2.25 shows the G-code format for representing a NURBS curve and Fig. 2.26 shows an example of a part program to machine a NURBS curve profile. G06.2 P_X_Y_Z_R_K_F ; G06.2 : NURBS interoperation P : NURBS curve order X, Y, Z : Control point R : Weight K : Knot F : Feedrate Fig. 2.25 FANUC system NURBS G-code format In Fig. 2.26, in the block whose line index is 110, the degree of the NURBS curve and the feedrate are specified. From the block whose line index is 110 to the block whose line index is 350, the control points and knot vector are specified. In the case of the NURBS curve defined in Fig. 2.26, the degree of the curve is 4, the feedrate is 10 mm/min, and the weight of all control points is 1. 62 2 Interpreter 2.4 G&M-code Interpreter As mentioned in the previous section, the interpreter of the CNC system is the soft- ware module of the NCK unit that interprets the part program consisting of G&M- code commands and related addresses such as S, T, and F. The interpreter consists of a parser, an executor, a path generator, a macro executor, and an error handler. The parser consists of a lexical analyzer, a calculator, and a sentence interpreter (YACC). As for the software modules connected with the interpreter, there are the program access module, which reads a program file, and the interpolator module, which gen- erates the interpolated points of the programmed path based on the interpreted data. Figure 2.27 shows these modules in graphic form. N100 G05 P10000 N110 G06.2 P4 K0. X-1.6953 Y 75 Z 2358 F10 N120 K0. X-1.6544 Z 2313 N130 K0. X-1.5752 Z 2225 N140 K0. X-1.4053 Z 2067 N150 K.0313 X-1.3031 Z 1982 N160 K.0781 X-1.1215 Z 1847 N300 K.9063 X1.7085 Z 2373 N310 K.9688 X1.75 Z 2421 N320 K1. N330 K1. N340 K1. N350 K1. N360 G01 Y 7188 Z 238 Fig. 2.26 NURBS-profile G-code part program The functionality of each module is given below. 1. Parser: this module interprets the part program block by block. The lexical inter- preter of this module reads the block character by character and makes meaningful words from the characters. The calculator carries out numerical operations within the part program. The sentence interpreter retrieves the command and the related data such as G-code, M-code, S-code, T-code, conditional branching, and iteration loop based on the words from the lexical interpreter. 2. Executor: this module executes the functions related with the interpreted sentence and stores the execution result in the internal memory. In addition, this module generates the data required for executing the modal code. 3. Path Generator: This module generates the position data based on the pro- grammed coordinates. In this module, the computation for mapping from work- 2.4 G&M-code Interpreter 63 piece coordinates to machine coordinates, tool compensation, and the axis limit is carried out. 4. Macro Executor: this module interprets and executes macro commands included in an NC part program. As the macro is user-defined code, the user can make specific functions that are not provided by the CNC maker by using a macro lan- guage, which is similar to the BASIC language. 5. Error Handler: if there is an error in a part program, the error should be noticed and the user notified. This module is responsible for this. IPR (Interpreter) Parser Program access LEX Macro Executor Path generator Error IPO (Interpolator) CAL YAC Fig. 2.27 Code interpreter modules The workflow that should be executed by the interpreter with the various S/W modules from interpreting the part program to generating the tool position is shown in Fig. 2.28. First, once the Cycle Start button on the MMI panel has been pushed, the inter- preter starts pre-processing tasks such as reading the part program into the internal memory of the CNC system block by block, interpreting the block, and storing the interpreted data in the internal memory. During the pre-processing tasks, a cycle code is converted into blocks that consist of G01, G02, and G03. These converted blocks replace the cycle code and the interpreter reads and interprets the converted blocks. The internal block memory can be defined as in Table 2.6. The block memory shown in Table 2.6 shows the memory contents when the block whose line index is N300 has been read and where the block skip is specified and interpreted in subprogram P9000. The interpreter reads the addresses and the following numbers specified in the N300 block and stores the interpreted values in the related internal block mem- [...]... t Vy = dt Vx = (3. 13a) (3. 13b) dX = ω R · sin ω t · dt (3. 14a) ω R · sin ω t · dt = −d(R · cos ω t) (3. 14b) 3. 3 Software Interpolator 75 dY = ω R · cos ω t · dt (3. 15a) ω R · cos ω t · dt = +d(R · sin ω t) (3. 15b) Based on Eq 3. 14 and Eq 3. 15, above, it is possible to design the DDA hardware interpolator If R · sin ω t is assigned to the V register of the DDA integrator for the Xaxis and R · cos ω t... the software DDA interpolation algorithm and denotes circular movement in a clockwise direction in the first quadrant Figure 3. 11 and Table 3. 5 show the result of the algorithm for the example part program Table 3. 5 Results of Stairs Approximation interpolation algorithm step 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 D 0 1 –18 –15 –10 3 6 –11 0 13 –2 13 0 17 6 -3 16 9 4 1 0 Δx 1 3 3 5 7... 1 –19 2 4 4 –18 3 9 9 –15 4 3 16 –10 5 6 6 –20 6 0 17 –11 7 –2 13 –15 8 0 13 –15 9 6 17 –11 10 3 25 3 11 9 16 –10 12 4 30 4 13 1 25 1 14 0 22 0 D3 –18 –15 –10 3 –11 0 –2 0 6 16 9 25 22 21 Δx 1 3 5 7 9 11 13 15 17 19 19 21 21 21 21 Δy –19 –19 –19 –19 –17 –17 –15 – 13 –11 –9 –7 –5 3 –1 1 ΔX f 10 9 8 7 6 5 4 3 2 1 1 0 0 0 0 ΔY f 10 10 10 10 9 9 8 7 6 5 4 3 2 1 0 X 0 1 2 3 4 5 6 7 8 9 9 10 10 10 10... step of integration represented by Eq 3. 3 In mathematical form, the displacement Δ S is as in Eq 3. 7 Δ Sk = 2−n ·Vk (3. 7) Equation 3. 7 can be written in the style of Eq .3. 4 by utilizing Eq 3. 6, which gives Eq 3. 8 3. 2 Hardware Interpolator 73 f ·Vk · Δ t (3. 8) 2n Accordingly, the average frequency for generating Δ S can be written as Eq 3. 9 Δ Sk = 2−n ·Vk · ( f · Δ t) = f0 = ΔS Δt k = f ·Vk 2n (3. 9)... 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 DDA Integrator for X-axis V Q ΔS 15 0 15 15 15 14 1 15 13 1 15 12 1 15 11 1 15 10 1 15 9 1 14 7 1 14 5 1 13 2 1 13 15 12 11 1 11 6 1 11 1 1 10 11 9 4 1 8 12 8 4 1 7 11 6 1 1 5 6 4 10 3 13 2 15 1 0 DDA Integrator for Y-axis V Q ΔS 0 0 0 0 1 1 2 3 3 6 4 10 5 15 6 5 1 7 12 8 4 1 9 13 9 6 1 10 0 1 11 11 12 7 1 12 3 1 13 0 1 13 13 14 11... 3. 1 can be rewritten as Eqs 3. 2 and 3. 3 Sk = k−1 ∑ Vi · Δ t + Vk · Δ t (3. 2) i=1 or Sk = Sk−1 + Δ Sk (3. 3) Δ Sk = Vk · Δ t (3. 4) where Δ Sk is defined in Eq 3. 4 The following three processes are necessary for integration: 72 3 Interpolator 1 Calculate current velocity by velocity summing at the previous time unit and the velocity increment at the current time unit by using Eq 3. 5 Vk = Vk−1 + Δ Vk (3. 5)... execution In order to understand the structure and the internal behavior of the interpreter, it is necessary to understand the structure of a part program and the commands used therein In a CNC system, various coordinate systems, such as the machine coordinate system, workpiece coordinate system, and local coordinate system, are supported for the convenience of editing a part program and setting up the machine... Interpolator Software DDA interpolation algorithms originate from hardware DDAs and their execution procedure is the same as the behavior of hardware DDAs Figure 3. 7 shows the flow chart for a software DDA interpolation algorithm and Fig 3. 7a and Fig 3. 7b respectively show linear interpolation and circular interpolation In Fig 3. 7a, the variable L is a linear displacement and the variables A and B denote... radius of the circle, and the variables P1 and P2 give the center position when the start point of the circle is the origin of the coordinate system The following is an example of a software DDA interpolation algorithm and an example part program is below The length unit of the example part program is BLU and a speed unit is BLU per second G01 X0.Y10.F10 G02 G90 X10 Y0 I0 J-10 F10 The example part program... (ye − ys )2 V = V0 × f eed override (3. 23) (3. 24) (3. 25) (3. 26) (3. 27) 88 3 Interpolator As shown in Eq 3. 25, the line segment Δ L depends on velocity V Velocity V is defined by Eq 3. 27 when the command velocity V0 defined in a part program is compensated for by feed override Figure 3. 14 represents the flow chart for the above-mentioned interpolation procedure Figure 3. 14a shows the total linear path to . X-1.69 53 Y 75 Z 235 8 F10 N120 K0. X-1.6544 Z 231 3 N 130 K0. X-1.5752 Z 2225 N140 K0. X-1.40 53 Z 2067 N150 K. 031 3 X-1 .30 31 Z 1982 N160 K.0781 X-1.1215 Z 1847 N300 K.90 63 X1.7085 Z 237 3 N310 K.9688. 2421 N320 K1. N 330 K1. N340 K1. N350 K1. N360 G01 Y 7188 Z 238 Fig. 2.26 NURBS-profile G-code part program The functionality of each module is given below. 1. Parser: this module interprets the part. CNC system is the soft- ware module of the NCK unit that interprets the part program consisting of G&M- code commands and related addresses such as S, T, and F. The interpreter consists of a

Ngày đăng: 11/08/2014, 20:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan