A turning NC programming method, device and NC machining system
By generating structural encodings and matching preset encodings in typical structural libraries, the problem of inefficiency of traditional CNC programming methods is solved, and more efficient and accurate CNC programming is achieved.
Patent Information
- Application Number
- CN202010915323.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-03
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2040-09-03
AI Technical Summary
Traditional CNC programming methods rely on manual judgment of whether templates are available and importing programming templates, resulting in low programming efficiency and accuracy.
By obtaining the outline curve of the product to be processed, selecting the processing curve, generating structure encoding, and matching the corresponding preset structure encoding in the typical structure library, importing the programming file to generate CNC code.
It improves the efficiency of CNC programming, reduces manual intervention, and improves the accuracy and speed of programming.
Smart Images

Figure CN114137908B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of numerical control machining, and relates to a turning numerical control programming method, a device and a numerical control machining system. Background Art
[0002] Over the past 50 years, CNC machine tool processing technology has continued to develop and is a core technology in advanced manufacturing technology. The development of CNC technology supported by information is the key to realizing the modernization of enterprise manufacturing systems and an important means to improve enterprise manufacturing technology.
[0003] With the diversification of CNC machining products of enterprises, process personnel need to perform CNC programming for more and more products. At the same time, the management of CNC programs is becoming more and more complicated. In order to adapt to the requirements of large-scale data management and improve programming efficiency, research on CNC machining template programming is an effective way to solve the problem. Traditional template calling relies on the judgment of programmers and requires manual judgment on whether the template is available, and the programming template is manually imported, which seriously affects the efficiency and accuracy of programming. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a turning CNC programming method, device and CNC machining system, which have the advantage of high programming efficiency.
[0005] To achieve the above-mentioned and other related purposes, the present invention provides a turning NC programming method, comprising:
[0006] Obtain the contour curve of the product to be processed and enter the processing environment;
[0007] Set the machining coordinate system according to the machining process route;
[0008] Selecting a processing curve, wherein the processing curve is composed of a plurality of structural curves;
[0009] Generate structure codes in sequence according to the drawing order of each structure curve, match the preset structure codes that match them in the typical structure library, obtain the programming files, and import them into the processing environment;
[0010] Redefine the machining coordinate system, regenerate the tool path file, and generate NC code after post-processing.
[0011] In one embodiment of the present invention, obtaining a processing curve having typical features selected from a contour curve of a product to be processed specifically includes:
[0012] Get the processing curve;
[0013] According to the starting point coordinates and the end point coordinates of each structural curve of the processing curve, it is judged whether the selected processing curve is a continuous curve in the same plane. If so, the processing curve is selected; if not, the process is terminated.
[0014] In one embodiment of the present invention, the structure codes are generated in sequence according to the coding rules based on the drawing order of each structure curve.
[0015] In one embodiment of the present invention, the structure codes are generated in sequence according to the coding rules based on the drawing order of each structure curve, specifically:
[0016] Determine the curve type of each structural curve in the processing curve according to the plane where the processing curve is located and the direction of the coordinate axis in the coordinate system of the plane, wherein the curve type is divided into a horizontal straight line, a vertical straight line, an oblique line and an arc;
[0017] Corresponding codes are set for the curve type and the vector direction of the curve, and structural codes are generated according to the drawing order of each structural curve.
[0018] In one embodiment of the present invention, before matching the corresponding preset structure code in the typical structure library, a typical structure library needs to be established.
[0019] In one embodiment of the present invention, establishing a typical structure library includes: creating a typical structure library file in the installation directory of the CAM software, entering a variety of turning processing templates into the typical structure library file, and the turning processing template contains preset structure codes and corresponding programming files.
[0020] In one embodiment of the present invention, the method further includes: entering the tool path file and structure code of the machining curve into the typical structure library file.
[0021] The present invention also provides a numerical control programming device, comprising:
[0022] Modeling module, used to obtain the contour curve and processing coordinate system of the product to be processed, as well as the set processing curve;
[0023] A processing curve selection module is used to select a processing curve with typical characteristics on the contour curve of the product to be processed;
[0024] A coding module, used for sequentially generating structure codes according to the drawing order of each structure curve in the processing curve;
[0025] A matching module is used to match the preset structure code that is consistent with the structure code of the machining curve in the typical structure library, and obtain the corresponding programming file and import it into the machining environment;
[0026] The generation module is used to redefine the machining coordinate system and regenerate the tool path file, and generate the NC code after post-processing.
[0027] As described above, the numerical control programming method of the present invention performs structural coding according to coding rules for the structural curve in the processing curve of the product to be processed, and matches it with the preset structural coding of the typical structure library, that is, directly uses the line data for matching. After the preset structural coding that meets the requirements exists in the typical structure library, the corresponding tool path file is directly called and regenerated, which can speed up the response speed of the numerical control device. At the same time, the process personnel can use mature tool path files to improve the programming speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of a flow chart of a numerical control programming method in one embodiment of the present invention.
[0029] Figure 2 It is a schematic diagram of a horizontal straight line of a processing curve placed on the xy plane in the present invention.
[0030] Figure 3 Shown is a schematic diagram of a vertical straight line of a processing curve placed on the xy plane in the present invention.
[0031] Figure 4 It is a schematic diagram of the oblique lines of the processing curve placed on the xy plane in the present invention in four quadrants.
[0032] Figure 5 Shown is a schematic diagram of the CNC machining system of the present invention.
[0033] Figure 6 Shown is a structural block diagram of the numerical control programming device of the present invention.
[0034] Figure 7 Shown is a structural block diagram of a wireless device of the present invention. DETAILED DESCRIPTION
[0035] The following is a description of the implementation of the present invention by means of specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
[0036] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no substantial technical significance. Any modification of the structure, change of the proportion relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the effects and purposes that can be achieved by the present invention. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of description, and are not used to limit the scope of the implementation of the present invention. The change or adjustment of their relative relationship should also be regarded as the scope of the implementation of the present invention without substantially changing the technical content.
[0037] See also Figure 1 The present invention provides a turning NC programming method, comprising:
[0038] S1, obtaining the contour curve of the product to be processed and entering the processing environment.
[0039] In this embodiment, the contour curve is actually a two-dimensional model, and the two-dimensional model of the product to be processed is obtained by drawing using a numerical control programming device installed with CAM software. The numerical control programming device can be a mobile electronic device, such as a laptop computer, a desktop computer, etc. The CAM software can be NX, Mastercam or solidworks, etc. During the drawing process, an absolute coordinate system exists in the numerical control programming device, and each line in the contour curve of the finished product to be processed has an absolute coordinate and is stored in the storage of the numerical control programming device to form a complete topological structure.
[0040] S2, set the processing coordinate system according to the processing route.
[0041] Taking NX as an example, the specific steps are: enter the geometric view mode in the process navigator, and create a machine tool coordinate system in the MCS-MILL coordinate system. In the coordinate system setting, you can select dynamic setting on the CSYC coordinate system setting interface to determine the origin of the machining coordinate system (X0, Y0, Z0), so as to obtain the machining coordinates of each point on the contour curve of the product to be processed relative to the machining coordinate system, and save them in the storage of the CNC programming device. The machining coordinates of each point correspond to its absolute coordinates.
[0042] S3, obtaining a processing curve selected on the contour curve of the product to be processed, wherein the processing curve is formed by laying out a plurality of structure curves in sequence, wherein each structure curve has a starting point coordinate and an end point coordinate.
[0043] In this embodiment, S3 is specifically divided into the following two steps:
[0044] S31, obtaining a machining curve on the contour curve of the product to be processed. Taking NX as an example, the machining curve can be obtained by establishing a part in a machining coordinate system, and the machining curve is set according to the part to be processed.
[0045] S32, judging whether the selected processing curve meets the typical characteristics; wherein the typical characteristics include the following: (1) the processing curve is a continuous curve, which is formed by connecting multiple structural curves in sequence; (2) the type of the structural curve is a straight line or an arc; (3) all structural curves must be located in the same plane. The judgment process of S32 can be obtained through secondary development in NX software.
[0046] Specifically include:
[0047] S321, obtaining the starting point coordinates and the end point coordinates of each structural curve in the processing curve. If, in adjacent structural curves, the end point coordinates of the previous structural curve are different from the starting point coordinates of the next structural curve, then the processing curve has a breakpoint and is not a continuous curve, and the process ends. Otherwise, execute S322;
[0048] S322, determine whether there are the same coordinate values in the coordinates of each structural curve. If so, it is determined that they are in the same plane and step S3223 is executed. Otherwise, the process ends.
[0049] S323, obtaining the line type of each structural curve, and determining that the processed curve meets the feature requirements when the curve type is a straight line or an arc. It should be noted that in the process of drawing a curve, a corresponding line type code will be generated according to the curve type to distinguish between a straight line and an arc.
[0050] The order of S321, S322, and S323 can be reversed. When the processing curve satisfies the contents of all typical features at the same time, S4 can be executed to perform structural coding on each structural curve.
[0051] S4, generating structure codes in sequence according to the drawing order of each structure curve in the processing curve and the coding rules.
[0052] The encoding rules are explained in detail here.
[0053] The encoding rule is to encode the line data of each structural curve in sequence, wherein the line data includes the curve type, starting point coordinates, end point coordinates and size information, and the size information includes fixed size and non-fixed size.
[0054] According to the plane where the processing curve is located and the direction of the coordinate axis in the coordinate system of the plane, the curve type of each structural curve in the processing curve is determined. The curve type is divided into horizontal straight line, vertical straight line, oblique line and arc. Accordingly, since the structural curve will generate corresponding line type codes according to its curve type during the drawing process to distinguish between straight lines and arcs, the horizontal straight line and vertical straight line can be judged according to the starting point coordinates and end point coordinates of their structural curves.
[0055] Corresponding codes are set for the curve type and the vector direction of the curve, and structural codes are generated according to the drawing order of each structural curve.
[0056] In this embodiment, taking the processing curve in the XY plane as an example, the set encoding rules are shown in Table 1:
[0057] Table 1 Coding rules in the XY plane
[0058]
[0059] Horizontal straight line Figure 2 As shown, the vertical line is Figure 3 As shown, the coding rule for the oblique line is to set a temporary coordinate system corresponding to the XY plane where the processing curve is located at the starting coordinate of the oblique line. The temporary coordinate system uses the starting coordinate of the oblique line as the coordinate origin, determines the quadrant position of the end coordinate of the oblique line in the temporary coordinate system, and determines the coding. When the end coordinate falls in the first quadrant of the temporary coordinate system, the oblique line is coded as C1, as shown in Figure 4 (a); When the end point coordinates fall in the second quadrant of the temporary coordinate system, the slash code is C2, such as Figure 4 (b); When the end point coordinates fall in the third quadrant of the temporary coordinate system, the slash code is C3, such as Figure 4 (c); When the end point coordinates fall in the fourth quadrant of the temporary coordinate system, the slash code is C4, such as Figure 4 (d).
[0060] When the machining curve is placed in the XZ plane or the YZ plane, the encoding rules are adjusted accordingly according to Table 1, which will not be repeated here.
[0061] S5, matching the preset structure code that matches the structure code of the machining curve in the typical structure library, when there is a preset structure code that matches in the typical structure library, obtaining the corresponding programming file and importing it into the machining environment, the programming file includes the tool path file, and the driving size is the same as the machining size. It should be noted that the premise of matching is that the plane where the preset structure code is located is the same as the plane where the machining curve is located.
[0062] Before S5, it was necessary to establish a typical structure library and enter various turning processing templates in the typical structure library. The typical structure library can create a typical structure library file in the CAM software.
[0063] Entering a variety of turning processing templates in the typical structure library includes the following steps:
[0064] S51, establish a turning processing template with typical features. The steps of creating a turning processing template are roughly the same as S1 to S4 above, and are briefly described here.
[0065] First, the template contour curve is obtained, the machining coordinate system is set according to the machining process route, and the required tool for machining is imported. The template curve can be directly drawn in the CNC device, or it can be drawn in another CNC device and then copied into the current CNC device.
[0066] Then, set the machining coordinate system, draw machining auxiliary lines, and compile tool paths.
[0067] Finally, the template contour curve, machining auxiliary lines, tools, and tool paths are stored in the library, and the structural code is generated according to the sequence of each structural curve of the template contour curve according to the coding rules and recorded in the typical structure library.
[0068] In this embodiment, the dimension information included in the line data of the structural curve includes fixed dimensions and non-fixed dimensions. When the structural curve contains non-fixed dimensions, the sketch of the structural curve needs to be fully constrained. The non-fixed dimensions include the annotation objects of the annotation dimensions and the dimension variation range. The definition of the dimension variation range must comply with basic geometric rules. When the structural curve is a fixed dimension, the sketch of the structural curve does not need to be fully constrained, and all object dimensions must be certain values.
[0069] S52, enter into the typical structure library. During the entry process, a corresponding programming file is created in the typical structure library file, and the structure name, number of curves, structure code, size information, and tool path file of the turning processing template are recorded in the programming file. The size information, structure code, and tool path file correspond to each other. Among them, the structure name can be defined according to actual needs; the number of structure curves is the sum of the number of structure curves in the turning processing template, and the structure code in the typical structure library is entered as the preset structure code.
[0070] It is also possible to record the process description, which is the processing description of the structural curve, for the convenience of engineers to consult; at the same time, it is also possible to record the graphic information, which is a schematic diagram of the turning processing template, which can be automatically captured according to a fixed ratio.
[0071] In S5, when there is a preset structure code that meets the requirements in the typical structure library, before calling the corresponding programming file and importing it into the processing environment, it is necessary to match the size information corresponding to the structure code of the product to be processed with the size information corresponding to the preset structure code in the typical structure library. When the size information of the preset structure code meets the size information requirements corresponding to the structure code of the product to be processed, the programming file can be obtained. For example, the processing curve is located in the XY plane, a structure curve C is a horizontal straight line, its structure code is H+, and the size information is a fixed size of 8mm. There are two identical preset structure codes A and preset structure codes B in the typical structure library, among which the size information of the preset structure code A is a fixed size of 3mm, and the size information of the preset structure code B is a non-fixed size of 5mm to 10mm. The size information of the structure curve C falls within the size range of the preset structure code B. It is determined that the preset structure code B meets the requirements of the structure curve C, and the programming file of the preset code structure B is called.
[0072] S6, redefine the machining coordinate system, and regenerate the tool path file, and generate the NC code after post-processing. Redefining the machining coordinate system is to switch the machine tool coordinate system in the called programming file to the machine tool coordinate system in the machining environment of the machining curve, and regenerate the corresponding tool path file under the redefined new coordinate system.
[0073] In this embodiment, the turning NC programming method may further include: S7, entering the structure code of the processing curve and the tool path file into the typical structure library file, so as to accumulate the processing curves of various processed products and continuously expand the typical structure library.
[0074] The present invention also provides a turning numerical control machining system, such as Figure 5 As shown, it includes a numerical control programming device 1 and a numerical control machine tool 3. It should be noted that the numerical control machine tool 3 includes a machine tool and a machine tool controller. Figure 5 Only the machine tool controller is shown in the figure, and signal transmission is performed between the machine tool controller and the numerical control programming device 1 .
[0075] The numerical control programming device 1 includes: Figure 6 As shown:
[0076] The modeling module 11 is used to obtain the contour curve and processing coordinate system of the product to be processed, as well as the set processing curve.
[0077] The processing curve selection module 12 is used to select a processing curve on the contour curve of the product to be processed.
[0078] The processing curve selection module 12 includes a selection module for selecting a processing curve on the contour curve of the product to be processed. It can also include a typical feature judgment module for judging whether the processing curve meets the typical features. Only when the typical features are met can the structure code be generated. Among them, the judgment of the typical structure feature mainly judges two aspects, one is whether the processing curve is a continuous curve, and the other is whether the processing curve is on the same plane. The specific judgment process in this regard has been described in detail in the programming method, and will not be repeated here.
[0079] The encoding module 13 is used to generate structure codes in sequence according to the drawing order of each structure curve in the processing curve and the encoding rules.
[0080] The matching module 14 is used to match the preset structure code that matches the structure code of the processing curve in the typical structure library. When there is a preset structure code that matches in the typical structure library, the corresponding programming file is obtained and imported into the processing environment. The programming file includes a tool path file, and the driving size is the same as the processing size.
[0081] The generating module 15 is used to redefine the machining coordinate system, regenerate the tool path file, generate the NC code after post-processing, switch the machine tool coordinate system in the called programming file to the machine tool coordinate system in the machining environment of the machining curve, and regenerate the corresponding tool path file.
[0082] In this embodiment, when the NC programming device 1 adopts a mobile electronic device, in order to not limit the location of the NC programming device 1 and facilitate the process personnel to take it, a wireless device 2 can be added to the NC programming system, such as Figure 7 As shown, the wireless device 2 may include a transceiver 22, a memory 23, a microcontroller 21 and an interface 24. The machine tool control is connected to the wireless device 2 via the interface 24. The wireless device 2 may be configured with a wireless hotspot to utilize the transceiver 22 to transmit signals with the CNC programming device 1. The transmission protocol may use the TCP / IP / UDP communication protocol. The microcontroller 21 temporarily stores the CNC code received by the transceiver 22 in the memory 23, and then transmits it to the machine tool controller of the CNC machine tool 3 via the interface 24.
[0083] In the present invention, the structure curve is structure-coded according to the coding rules, and each structure curve of the processing curve of the product to be processed is matched with the preset structure code of the typical structure library, that is, the line data is directly used for matching. After the preset structure code that meets the requirements exists in the typical structure library, the corresponding tool path file is directly called and regenerated, which can speed up the response speed of the numerical control device. At the same time, the process personnel can use mature tool path files to improve the programming speed.
[0084] In summary, the present invention effectively overcomes various shortcomings of the prior art and has high industrial utilization value.
[0085] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A turning NC programming method, characterized in that: include: Obtain the contour curve of the product to be processed and enter the processing environment; Set the machining coordinate system according to the machining process route; Selecting a processing curve, wherein the processing curve is composed of a plurality of structural curves, and the structural curves are divided into horizontal straight lines, vertical straight lines, oblique lines and arcs; Establishing a typical structure library includes: creating a typical structure library file in the installation directory of the CAM software, entering a plurality of turning processing templates in the typical structure library file, wherein the turning processing templates include preset structure codes and corresponding programming files; Generate structure codes in sequence according to the drawing order of each structure curve, match the preset structure codes that match them in the typical structure library, obtain the programming files, and import them into the processing environment; The conditions for the machining curve matching to be a typical feature are: the machining curve is a continuous curve, which is formed by connecting multiple structural curves in sequence; the type of structural curve is a straight line or an arc; all structural curves must be located in the same plane; Redefine the machining coordinate system, regenerate the tool path file, and generate the NC code after post-processing; The processing curve with typical features selected on the contour curve of the product to be processed includes: Get the processing curve; According to the starting point coordinates and the end point coordinates of each structural curve of the processing curve, it is judged whether the selected processing curve is a continuous curve in the same plane, if so, the processing curve is selected, if not, the process is terminated; Generate structural codes in sequence according to the drawing order of each structural curve and the coding rules; Determine the curve type of each structural curve in the processing curve according to the plane where the processing curve is located and the direction of the coordinate axis in the coordinate system of the plane, wherein the curve type is divided into a horizontal straight line, a vertical straight line, an oblique line and an arc; Set corresponding codes for the curve type and the vector direction of the curve respectively, and generate structural codes according to the drawing order of each structural curve; Entering the tool path file and structure code of the machining curve into the typical structure library file; The structural curve in the processing curve of the product to be processed is structurally encoded according to the encoding rules and matched with the preset structural code of the typical structure library, that is, the line data is directly used for matching; after the preset structural code that meets the requirements exists in the typical structure library, the corresponding tool path file is directly called and regenerated; Line data includes curve type, starting point coordinates, end point coordinates and size information, and the size information includes fixed size and non-fixed size; When the structural curve contains non-fixed dimensions, the sketch of the structural curve needs to be fully constrained. The non-fixed dimensions include the dimensioned objects and the dimension variation range. The definition of the dimension variation range complies with the geometric rules. When the structural curve is of fixed size, the sketch of the structural curve is not completely constrained and the sizes of all objects are fixed values.
2. A numerical control programming device, using a turning numerical control programming method according to claim 1, comprising: Modeling module, used to obtain the contour curve and processing coordinate system of the product to be processed, as well as the set processing curve; A processing curve selection module is used to select a processing curve with typical characteristics on the contour curve of the product to be processed; A coding module, used for sequentially generating structure codes according to the drawing order of each structure curve in the processing curve; A matching module is used to match the preset structure code that is consistent with the structure code of the machining curve in the typical structure library, and obtain the corresponding programming file and import it into the machining environment; The generation module is used to redefine the machining coordinate system and regenerate the tool path file, and generate the NC code after post-processing.
3. A CNC machining system, comprising the CNC programming device and a CNC machine tool as claimed in claim 2, wherein the CNC machine tool comprises a machine tool and a machine tool controller, and signal transmission is performed between the machine tool controller and the CNC programming device.
4. The numerical control machining system according to claim 3, characterized in that: The machine tool controller is connected to the numerical control programming device by a wireless device.
Citation Information
Patent Citations
A two-dimensional CNC machining method for metal workpieces
CN102279587A
Fast numerical control machining process system for complex parts of airplane
CN102411333A