- Detail

NC lathe processing non-circular curve macro programming skills

in machining, there are often non-circular curve parts (such as elliptic curve, parabola, hyperbola and involute) composed of complex curves. With the continuous improvement of the performance requirements of industrial products, the role of non-circular curve parts is becoming increasingly important, and its processing quality often becomes the key to production and manufacturing. The NC system of NC machine tools generally only has the functions of linear interpolation and circular interpolation. The workpiece with non-circular curve shape belongs to the more complex part category in NC turning, and it is generally processed by fitting method. The characteristic of this method is to replace the curve with many small straight lines according to the shape error requirements of the part drawing. According to the shape error requirements of the part drawing, if the requirements are high, the number of straight lines is more. Although the coordinates of nodes can be calculated by CAD software, too many nodes also lead to inconveniences in processing. If macro programs can be used flexibly, programming can be carried out conveniently and simply, So as to improve the processing efficiency

I. use steps of non-circular curve macro program

(1) select independent variables. The X and Z coordinates in the non-circular curve can be defined as independent variables. Generally, the one with a wide range of changes will be selected as the independent variable. This capacity expansion measure enables DSM to meet the growing needs of customers, and it is necessary to consider the convenience of writing the function expression in the macro program. For convenience, we set the variables related to the Z coordinate as 100, 101, and the variables related to the X coordinate as 200 201, etc

(2) determine the coordinate value of the starting and ending point of the independent variable. It must be clear that the coordinate system of this coordinate value is relative to the coordinate system of the non-circular curve itself. Its starting point coordinate is the initial value of the independent variable, and the ending point coordinate is the end value of the independent variable

(3) perform function transformation to determine the macro expression of dependent variable relative to independent variable

(4) determine the algebraic offset (△ X and △ z) of the origin of the coordinate system of the formula curve itself relative to the origin of the workpiece

(5) when calculating the X coordinate value (201) of each point on the non-circular curve under the workpiece coordinate system, distinguish the sign of the macro variable 200. Take the coordinate origin of the formula curve itself in the programmed contour as the origin, draw the X 'and Z' coordinate axes of the corresponding curve coordinate system, take its z 'coordinate as the dividing line, and divide the contour into positive and negative contours. The programmed contour is called positive contour in the positive direction of X', and the programmed contour is negative contour in the negative direction of X '

if the formula curve used in programming is a positive contour, when calculating the X coordinate value (201) under the workpiece coordinate system, the macro variable 200 should be preceded by a positive sign; If the formula curve is a negative contour, the height of the adjusting screw rod in front of the macro variable 200 should be preceded by a negative sign, that is, 201 = ± ＃ 200 + △ X

(6) design the template of non-circular curve macro program. Set the Z coordinate as the independent variable 100, the X coordinate as the dependent variable 200, the independent variable step size as △ W, △ x as the offset of the origin of the coordinate system of the curve itself in the X direction under the workpiece coordinate system, △ Z as the offset of the origin of the coordinate system of the curve itself in the Z direction under the workpiece coordinate system, then the macro instruction programming template of the machining program of the formula curve segment is as follows

＃ 100 = Z1 (defining the starting Z coordinate of the independent variable)

while [＃ 100gez2] do1

(processing control)

＃ 200 = f (＃ 100) (establishing the functional relationship between the independent variable and the dependent variable)

＃ 201 = ± ＃ 200 + △ x

(calculating the X coordinate of the point on the curve in the processing coordinate system)

＃ 101 = ＃ 100 + △ Z (calculating the point on the curve in ＃z coordinate of machining coordinate system)

g01x [2 ×＃ 201] Z [101] f

(curve processing)

<100 = <100 - △ w (the independent variable is reduced by one step)

end1 (end of processing)

II. Specific application examples of non-circular curve macro program

using the above non-circular curve macro program template, you can quickly and accurately realize the programming and processing of part formula curve contour. Here is a specific application example. Process the elliptical contour as shown in Figure 1, bar material Φ 45. The programming zero point is placed on the right end face of the workpiece

(1) analyze the part size, determine the positive and negative contour and algebraic offset (△ X and △ z)

when calculating the X coordinate value (3, 201) under the workpiece coordinate system, the macro variable 200 should be preceded by a positive sign, and the offset of the origin of the formula curve's own coordinate system relative to the workpiece origin is (x0, z-60)

(2) the reference procedure for rough and finish machining of the outer contour of the part is as follows (rectangular equation for rough machining and polar coordinate equation for finish machining)

O9988

G98S700M3； T0101；

G0X41Z2；

G1Z－100F150； (rough machining starts) g0x42

Z2；

＃1＝20 × twenty × 4； （4A2）

＃2＝60； （B）

＃3＝35； (initial value of X (diameter value)) while [3ge0] do1; (rough machining control)

＃ 100 = ＃ 2 × SQRT【1－＃3 ×＃ 3／＃1】； （Z）

＃101＝＃100－60＋0.2

G0X【＃3＋1】； (feed)

g1z [101] F150; (cutting)

g0u1; (tool withdrawal) Z2; (return)

＃ 3 = ＃ 3-4; (next cutting diameter) end1

＃10＝0.8； (x will accelerate aging to finish machining allowance)

11 = 0.1; (Z-direction finishing allowance) while [10ge0] do1; (semi finishing and finishing control)

g0x0s800; (feed, ready for finishing)

20 = 0; (initial value of angle) while [20le90] DO2; (curve processing range)

200 = 2 × twenty × SIN【＃20】； (10)

＃ 201 = ＃ 200 + 10

＃ the focus is to build a project with an annual output of 300000 tons of ethylene glycol to produce 50000 tons of methyl carbonate and 100000 tons of methanol 100 = 60 × COS【＃20】； （Z）

＃101＝＃100＋＃11－60

G1X【＃201】Z【＃101】F100； (curve finishing)

Related Topics

- ·Under-pressure Jodi McKay resigns as NSW Labor lea
- ·International lawyer urges United Nations to immed
- ·https---www.euronews.com-2022-03-29-El Salvador pr
- ·Chiswicks Antique and Vintage Market - Today News
- ·China- WHO investigators visit second Wuhan hospit
- ·Tens of thousands of Polish EU supporters demonstr
- ·Reality check- England held in goaless draw by gut
- ·Boy,5, rescued after being stuck in well for five

Copyright © 2011 JIN SHI