When using CNC machined parts, it is often encountered that the part shape is composed of complex space curves. The known conditions are the equations of the curves. These equations may be directly obtained or approximated by certain key points on the contour shape. The purpose of NC machining is to machine parts in accordance with known curve equations. Therefore, converting the curve to the NC code required by the CNC machine tool is a very important part. The work of generating NC codes for complex parts is generally achieved through programming software, and the programming software used by a large number of ordinary users generally does not have the function of automatically drawing part curves based on user equations. Therefore, in fact, only as many nodes as possible can be solved in the programming software according to the curve equation and connected to the curve point by point. Manually engaging in this part of the work is both troublesome and difficult to ensure the accuracy of the curve. For complex space curves, manual operation is difficult. The author uses Autolisp language to write the drawing program according to the known space curve equation, realizes the parametric design of the curve in AutoCAD, automatically generates the curve, then passes the dxf file format, inputs the MasterCAM software, and then sets the tool path and other process parameters and postpositions. Processing, and finally generate NC code for CNC machined parts.
Figure 1 Steel pipe welding curve 1 Space complex curve equation known space curve shown in Figure 1. This part is a master used for automatic welding of steel pipe. It is used to control the two directions of the welding torch for movement during welding processing. One is horizontal movement. For example, when the piano piece rotates around 2 axes in the X direction, the elliptical cylindrical profile looks like a Plane cam, so that the gun moves with its horizontal movement Another movement of the gun is along the Z axis. As can be seen from Figure 1, the upper end of the part is made up of a cosine curve, which allows the torch to move up and down vertically. The projection of the space curve in the XY plane is an ellipse. The polar expression of the ellipse in the XY plane is: x=rcost (1 Y = rsint (2) where r is a variable except t is a variable. The known elliptic equation is x2 + y2 = 1 a2 b2 (3) where a and b are the major and minor semi-axes of the ellipse, respectively. Substituting (1) and (2) into (3) and arranging the resulting variable r is: r= ab (a2sin2t+b2cos2t)1â„2 (4) Substituting (4) into (1) and (2) ), get the elliptic equation projected to the XY plane and expressed in polar coordinates: x= abcost (a2sin2t+b2cos2t)1â„2 (5) y= absint (a2sin2t+b2cos2t)1â„2 (6)
Figure 2 Curve development
The program flow chart of Figure 3 can be used to determine the coordinates of each point on the XY plane elliptic curve by (5) and (6). The curve of the curve of Figure 1 along the circumference is shown in Figure 2. The Z-axis coordinate corresponding to each point on the plane is: z=hcos(2t-p) (7) From (5)(6) and (7), the coordinates of the spatial point of the desired curve can be determined (x, y, z). 2 The principle of computer program Autolisp is AutoCAD embedded programming tool, with many special functions, can be used for AutoCAD for secondary development, to achieve graphic parametric design. The program flow of the computer to draw a complex space curve is shown in Figure 3. To run the program, first input the relevant parameter variables, including the initial value, final value, and step distance of each curve's independent variables, such as: t0, te1, te2...ten, and dt, and then insert the function x1(t) into each curve. , x2(t), ..., xn(t), y1(t), y2(t), ..., yn(t), z1(t), z2(t), ..., zn(t), and other parameters . Then the program automatically calculates the coordinates of each node on the corresponding curve by the dt argument, and connects each node with a straight line. After a curve is drawn, call up the next function to continue to calculate and draw the connection until all the curve segments are completed. In this example, the curve consists of only one curve equation. Therefore, t0=0, te1=360, x1(t), y1(t), and z1(t) are respectively input into the following equations: (5), (6), and (7), dt=0.5, and a=16. After the input parameters of , b=13, h=10 and so on are completed, the required contour of the entire part will be generated point by point in the AutoCAD environment, as shown in FIG. 4 .
Figure 4 Curve generated in AutoCAD 3 Generating NC code Since AutoCAD software does not have CAM functionality, you must convert Figure 4 generated by running the Autolisp program to a dxf file format. MasterCAM is a CAD/CAM software that is commonly used in the machining industry. It can both draw 2D and 3D part graphics, set tooling parameters such as tool path, tool parameters, cutting amount, and simulate toolpaths. The specific steps of the NC code used for a variety of CNC machine tools are as follows: File-Converters-dxf reads the Figure 4 graphics file; Toolpath-Contour selects the contour processing mode for the outline processing; Chain method defines the outline, and the processing route is determined by the concatenation of the connection lines. Input tool and shape milling parameters (such as tool diameter, spindle speed, cutting depth, etc.); display tool path; NC-Utils-Backplot tool path simulation to check whether the tool and cutting parameters are reasonable; NC-Utils-Post Proc -Run Toolpath Post-processing generates the NC code that can process the part in Figure 1. The following is a list of typical location codes: Due to the requirement to machine a curve on the part face contour. Therefore, the left and right tool radius compensation is not appropriate in the NC program. Therefore, the tool compensation option must be turned off to move the tool center line along the curve. When setting the parameters, the tool must be selected as the ball end mill. The diameter is set to 6mm, tool diameter too large may lead to severe over cutting; lower point should be selected at the lowest point of the curve. To avoid the unexpected excessive vertical feed of the cutter during the processing; the generated NC code just can process the curve for a week. If the workpiece is processed only with this program, the cutting amount at the trough is too large. Therefore, this program can only be used as a subroutine. A simple main program is also needed to complete the Z-axis depth feed, that is, the Z-axis feeds once, and calls the subroutine to process the part for one week until the complete curve profile is processed and the main program ends (the main program is omitted). The above processing only solves the programming and processing problems of the complex space curve at the upper end of the part. Parts such as Fig. 1 and elliptic cylindrical contours need to be processed. However, the remaining shapes are easily modeled and processed in MasterCAM, so they can be used directly. MasterCAM processing, no longer detailed description here. 4 Conclusions Most CAD software only has straight line and recurve arc drawing functions. For complex and non-circular geometric curves, especially space curves, they can only be manually fitted by the method of plotting. The results are difficult to be precise. Using a straight-line approach, programming and running complex curves automatically generates graphs that meet the accuracy requirements. Using Autolisp language programming, draw the required part contour curve, and then select the processing parameters and post-processing through MasterCAM software to generate NC code. The method of machining the parts on the CNC machine tool is successful and can ensure the contour accuracy requirements of the parts. This method not only can handle flat non-circular geometric curves, but also can handle complex spatial curves and other contours.
Figure 1 Steel pipe welding curve 1 Space complex curve equation known space curve shown in Figure 1. This part is a master used for automatic welding of steel pipe. It is used to control the two directions of the welding torch for movement during welding processing. One is horizontal movement. For example, when the piano piece rotates around 2 axes in the X direction, the elliptical cylindrical profile looks like a Plane cam, so that the gun moves with its horizontal movement Another movement of the gun is along the Z axis. As can be seen from Figure 1, the upper end of the part is made up of a cosine curve, which allows the torch to move up and down vertically. The projection of the space curve in the XY plane is an ellipse. The polar expression of the ellipse in the XY plane is: x=rcost (1 Y = rsint (2) where r is a variable except t is a variable. The known elliptic equation is x2 + y2 = 1 a2 b2 (3) where a and b are the major and minor semi-axes of the ellipse, respectively. Substituting (1) and (2) into (3) and arranging the resulting variable r is: r= ab (a2sin2t+b2cos2t)1â„2 (4) Substituting (4) into (1) and (2) ), get the elliptic equation projected to the XY plane and expressed in polar coordinates: x= abcost (a2sin2t+b2cos2t)1â„2 (5) y= absint (a2sin2t+b2cos2t)1â„2 (6)
Figure 2 Curve development
The program flow chart of Figure 3 can be used to determine the coordinates of each point on the XY plane elliptic curve by (5) and (6). The curve of the curve of Figure 1 along the circumference is shown in Figure 2. The Z-axis coordinate corresponding to each point on the plane is: z=hcos(2t-p) (7) From (5)(6) and (7), the coordinates of the spatial point of the desired curve can be determined (x, y, z). 2 The principle of computer program Autolisp is AutoCAD embedded programming tool, with many special functions, can be used for AutoCAD for secondary development, to achieve graphic parametric design. The program flow of the computer to draw a complex space curve is shown in Figure 3. To run the program, first input the relevant parameter variables, including the initial value, final value, and step distance of each curve's independent variables, such as: t0, te1, te2...ten, and dt, and then insert the function x1(t) into each curve. , x2(t), ..., xn(t), y1(t), y2(t), ..., yn(t), z1(t), z2(t), ..., zn(t), and other parameters . Then the program automatically calculates the coordinates of each node on the corresponding curve by the dt argument, and connects each node with a straight line. After a curve is drawn, call up the next function to continue to calculate and draw the connection until all the curve segments are completed. In this example, the curve consists of only one curve equation. Therefore, t0=0, te1=360, x1(t), y1(t), and z1(t) are respectively input into the following equations: (5), (6), and (7), dt=0.5, and a=16. After the input parameters of , b=13, h=10 and so on are completed, the required contour of the entire part will be generated point by point in the AutoCAD environment, as shown in FIG. 4 .
Figure 4 Curve generated in AutoCAD 3 Generating NC code Since AutoCAD software does not have CAM functionality, you must convert Figure 4 generated by running the Autolisp program to a dxf file format. MasterCAM is a CAD/CAM software that is commonly used in the machining industry. It can both draw 2D and 3D part graphics, set tooling parameters such as tool path, tool parameters, cutting amount, and simulate toolpaths. The specific steps of the NC code used for a variety of CNC machine tools are as follows: File-Converters-dxf reads the Figure 4 graphics file; Toolpath-Contour selects the contour processing mode for the outline processing; Chain method defines the outline, and the processing route is determined by the concatenation of the connection lines. Input tool and shape milling parameters (such as tool diameter, spindle speed, cutting depth, etc.); display tool path; NC-Utils-Backplot tool path simulation to check whether the tool and cutting parameters are reasonable; NC-Utils-Post Proc -Run Toolpath Post-processing generates the NC code that can process the part in Figure 1. The following is a list of typical location codes: Due to the requirement to machine a curve on the part face contour. Therefore, the left and right tool radius compensation is not appropriate in the NC program. Therefore, the tool compensation option must be turned off to move the tool center line along the curve. When setting the parameters, the tool must be selected as the ball end mill. The diameter is set to 6mm, tool diameter too large may lead to severe over cutting; lower point should be selected at the lowest point of the curve. To avoid the unexpected excessive vertical feed of the cutter during the processing; the generated NC code just can process the curve for a week. If the workpiece is processed only with this program, the cutting amount at the trough is too large. Therefore, this program can only be used as a subroutine. A simple main program is also needed to complete the Z-axis depth feed, that is, the Z-axis feeds once, and calls the subroutine to process the part for one week until the complete curve profile is processed and the main program ends (the main program is omitted). The above processing only solves the programming and processing problems of the complex space curve at the upper end of the part. Parts such as Fig. 1 and elliptic cylindrical contours need to be processed. However, the remaining shapes are easily modeled and processed in MasterCAM, so they can be used directly. MasterCAM processing, no longer detailed description here. 4 Conclusions Most CAD software only has straight line and recurve arc drawing functions. For complex and non-circular geometric curves, especially space curves, they can only be manually fitted by the method of plotting. The results are difficult to be precise. Using a straight-line approach, programming and running complex curves automatically generates graphs that meet the accuracy requirements. Using Autolisp language programming, draw the required part contour curve, and then select the processing parameters and post-processing through MasterCAM software to generate NC code. The method of machining the parts on the CNC machine tool is successful and can ensure the contour accuracy requirements of the parts. This method not only can handle flat non-circular geometric curves, but also can handle complex spatial curves and other contours.
Magnetic Assembly:
1. Precast concrete magnet
2.Magnetic Name Badge Name Tag/Magnetic Name Tag
3.Permanent Magnetic Lifter
4.Neocube Neo Ball
5.Car Mount Holding Device Automobile Mount Holder
6.Magnetic Round Base NdFeB Magnet
7.Magnetic Filter
8.Magnetic Chuck
9.Button Magnet
10.Magnetic Badge
Magnetic Assembly, Motor Magnet, Industrial Magnet, Magnetic Filter bar, Lifting Magnet
NINGBO SHINE MAGENETIC TECHNOLOGY CO.,LTD , https://www.shinemagnets.com