CNC automatic programming design method and system and computer storage medium thereof
By adopting parallel processing and TCP communication methods in CNC automation programming design, the problems of long processing cycle and low efficiency in the existing technology are solved, and the operation can be continued while the program is running, significantly shortening the processing cycle and improving efficiency.
Patent Information
- Application Number
- CN202410717623.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-24
AI Technical Summary
The existing CNC automatic programming design method has limited ability to shorten the machining cycle and has low work efficiency. CAM engineers need to wait for the program to complete before proceeding to the next step, resulting in low processing efficiency.
By providing a CNC automation programming design method, using NX external mode and internal mode client units for parallel processing, allowing other tasks to continue to be operated while the program is running, using TCP communication to achieve data transmission and processing, and dynamically starting the background execution end to improve efficiency.
It is possible to continue processing other tasks without waiting for the end of the program, shortening the processing cycle of the entire set of drawing files, improving work efficiency, batch processing of drawing files, and significantly improving the generation efficiency.
Smart Images

Figure CN118690436A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent mold design and manufacturing, and in particular to a CNC automatic programming design method, system and computer storage medium thereof. Background Art
[0002] At present, the existing CNC automatic programming solutions are partial automation and semi-parametric design. By developing multiple single-function programs, multiple steps in the processing flow of a part are automatically processed. In actual use, CAM engineers need to perform many steps in the process of processing parts. In each step, the engineer first analyzes the part based on experience and rules, and then loads the corresponding function program through NX to set parameters for automatic calculation according to his own analysis results. After waiting for the calculation to be completed, the engineer also needs to check and modify the calculation results, thus completing the processing operation step by step.
[0003] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:
[0004] The program is developed using the internal mode provided by NX (the interactive mode can only be run in the NX interface environment). Since the program designed in the internal mode cannot be operated by NX and the program interface during the operation, each call to the program requires waiting for the program to complete before the next operation can be performed. In actual operation, CAM engineers process a set of drawings, each set of drawings is the same type of parts, and the programs used by engineers in the corresponding stages of the process of processing the entire set of drawings are consistent. From the perspective of the entire set of drawings, engineers face many repetitive operations in the use of programs. At the same time, because CNC-related programs require a lot of calculations, these program engineers have to spend a lot of time waiting for the program to end before continuing to process after enabling a program. The existing CNC automatic programming design method has limited ability to shorten the processing cycle and low work efficiency. Summary of the invention
[0005] The embodiments of the present application provide a CNC automatic programming design method, system and computer storage medium thereof, thereby solving the technical problems of the limited ability of the existing CNC automatic programming design method in the prior art to shorten the processing cycle and low work efficiency, thereby shortening the processing cycle of the entire set of drawings and improving efficiency.
[0006] The embodiment of the present application provides a CNC automatic programming design method, which includes the following steps:
[0007] Step S1, select file: select the folder where the whole set of images are saved in the human-computer interaction server unit, read the content in the folder, filter and correct the image file names in the content, and then display them on the UI interface of the human-computer interaction server unit;
[0008] Step S2, UG execution: After the user clicks the UG execution button, it is determined whether the NX internal mode client unit is started. If not, an NX is started, and the NX internal mode client unit will be started together with the NX;
[0009] Step S3, background execution: after the user clicks the background execution button, at least one NX external mode client unit is dynamically started according to the current computer CPU utilization;
[0010] Step S4, double-click the image file name: obtain the name of the image file double-clicked by the user, and then determine whether the NX internal mode client unit is started. If not started, start an NX, and the NX internal mode client unit is started together with the NX;
[0011] Step S5, obtaining interface data and image data: obtaining the image name and enabled function name selected by the user on the human-computer interaction service end unit;
[0012] Step S6, storing the image file name and the enabled function name in binary form in order;
[0013] Step S7, the serialized data is sent to the background execution end and the NX execution end: the data converted into binary is sent to the NX external mode client unit and the NX internal mode client unit respectively in the form of TCP communication;
[0014] Step S8, the NX external mode client unit and the NX internal mode client unit receive data respectively: the NX external mode client unit receives the binary data sent by the human-computer interaction server unit, and the NX internal mode client unit receives the binary data sent by the human-computer interaction server unit;
[0015] Step S9, deserialize the received data: restore the binary data into image file names and function names in order;
[0016] Step S10, using the NX external mode to execute related functions: using the NX external mode client unit to open the image file in the background program in a non-rendering manner, and then using the NX external mode client unit to load the function module in the background program to perform operations on the image file;
[0017] Step S11, using the NX internal mode to execute the corresponding function: using the NX internal mode client unit to open the drawing file through the NX execution program control NX, and then using the NX internal mode client unit to load the function module through the NX execution program to perform operations on the drawing file;
[0018] Step S12, execution completion data return interface: the drawing file name and function name after execution are serialized, and sent to the human-computer interaction server unit through TCP communication. The human-computer interaction server unit then deserializes the data into the drawing file name and function name after receiving it, and displays the message that the corresponding drawing file has completed the execution of the corresponding function on the UI interface of the human-computer interaction server unit.
[0019] Wherein, in the step S3, the NX external mode client unit is started only when the computer CPU utilization rate does not exceed 60%.
[0020] The NX internal mode client unit includes an NX internal mode execution module and an NX internal TCP communication module.
[0021] The NX external mode client unit includes an NX external mode execution module and an NX external TCP communication module.
[0022] Wherein, the human-computer interaction server unit includes a server TCP communication module.
[0023] Wherein, when the NX internal mode client unit is started, it includes an NX internal main line execution step and an NX internal sub-line execution step;
[0024] The NX internal main line execution steps include:
[0025] Step A1, waiting for the human-computer interaction service end unit to send data;
[0026] Step A2: When the human-computer interaction server unit sends data, the NX internal mode client unit processes the data;
[0027] Step A3, the NX internal mode client unit executes a corresponding function according to the result of data processing;
[0028] Step A4, the NX internal mode client unit processes the data after executing the corresponding function and sends it to the UI interface of the human-computer interaction server unit for display;
[0029] The NX internal sub-line execution steps include:
[0030] Step B1, waiting for the human-computer interaction server unit to come online;
[0031] Step B2, the NX internal mode client unit and the human-computer interaction server unit communicate and connect via TCP;
[0032] Step B3: Select the folder where the whole set of drawings is saved through the human-computer interaction server unit, read the contents in the folder, filter and correct the drawing names in the contents, and then display them on the UI interface of the human-computer interaction server unit. At the same time, send relevant data to the NX internal mode client unit for processing.
[0033] Wherein, when the NX external mode client unit is started, it includes an NX external main line execution step and an NX external sub-line execution step;
[0034] The NX external main line execution steps include:
[0035] Step A1, waiting for the human-computer interaction service end unit to send data;
[0036] Step A2: When the human-computer interaction server unit sends data, the NX external mode client unit processes the data;
[0037] Step A3, the NX external mode client unit executes a corresponding function according to the result of data processing;
[0038] Step A4, the NX external mode client unit processes the data after executing the corresponding function and sends it to the UI interface of the human-computer interaction server unit for display;
[0039] The NX external sub-line execution steps include:
[0040] Step B1, waiting for the human-computer interaction server unit to come online;
[0041] Step B2, the NX external mode client unit and the human-computer interaction server unit communicate and connect via TCP;
[0042] Step B3: Select the folder where the entire set of drawings is saved through the human-computer interaction server unit, read the contents in the folder, filter and correct the drawing names in the contents, and then display them on the UI interface of the human-computer interaction server unit. At the same time, send relevant data to the NX external mode client unit for processing.
[0043] Wherein, the human-computer interaction service end unit includes a human-computer interaction method and a client connection method when it is started;
[0044] The human-computer interaction method comprises the following steps:
[0045] Step C1, when the human-computer interaction server unit is started, select the folder where the image file is located;
[0046] Step C2, read the content in the folder, if there is content, filter and correct the image file name in the content; if there is no content, return to step C1 and select another folder where the image file is located;
[0047] Step C3, display data on the UI interface;
[0048] Step C4: Perform human-computer interaction. If no function needs to be executed on the data, close the UI interface and end; if the data needs to be processed, execute the corresponding function or open the image file to process the data and form client information;
[0049] Step C5: Process the data according to the received client information and display the data on the UI interface; at the same time, send the client information to the NX external mode client unit and the NX internal mode client unit for execution;
[0050] The client connection method comprises the following steps:
[0051] Step D1: When the human-computer interaction server unit is started, the server TCP communication module is started;
[0052] Step D2, waiting for the client to connect;
[0053] Step D3: After the client is connected, the NX external mode client unit and the NX internal mode client unit respectively connect with the client and obtain the client information;
[0054] Step D4, monitoring client information;
[0055] Step D5: Process the data according to the received client information and display the data on the UI interface; at the same time, send the client information to the NX external mode client unit and the NX internal mode client unit for execution.
[0056] The present invention also provides a CNC automatic programming design system, which includes a human-computer interaction server unit, an NX external mode client unit and an NX internal mode client unit;
[0057] The human-computer interaction service end unit is used for allowing the customer to select a folder for saving a whole set of drawings, and filtering and correcting the names of drawings in the content, and then displaying them on the UI interface of the human-computer interaction service end unit, obtaining the drawing names and enabled function names selected by the user on the human-computer interaction service end unit, and saving the drawing names and enabled function names in binary order;
[0058] The NX external mode client unit receives the binary data sent by the human-computer interaction server unit, uses the NX external mode client unit to open the drawing in the background program in a non-rendering manner, and then uses the NX external mode client unit to load the function module in the background program to perform operations on the drawing, and serializes the drawing name and function name after the execution is completed, and sends them to the human-computer interaction server unit for display;
[0059] The NX internal mode client unit receives the binary data sent by the human-computer interaction server unit, uses the NX internal mode client unit to open the drawing through the NX execution program control NX, and then uses the NX internal mode client unit to load the function module through the NX execution program to perform operations on the drawing; the drawing name and function name after execution are serialized and sent to the human-computer interaction server unit for display.
[0060] The present invention also provides a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the CNC automatic programming design method.
[0061] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0062] By adopting the CNC automatic programming design method, system and computer storage medium thereof, the technical problems of the limited ability to shorten the processing cycle and low working efficiency of the existing CNC automatic programming design methods in the prior art are solved. The problem that NX and the program interface can continue to operate during the program processing of parts can be solved. The user does not need to wait for the program to end and can still process other things through NX. When faced with a whole set of drawings, the CNC automatic programming design scheme that can automatically process the entire set of drawings in batches can greatly shorten the processing cycle of the entire set of drawings and improve the generation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The present invention is a flow chart of a CNC automatic programming design method.
[0064] Figure 2 The present invention is a flowchart of a human-computer interaction method and a client connection method in a human-computer interaction server unit. DETAILED DESCRIPTION
[0065] The embodiment of the present application solves the technical problems of the limited ability to shorten the processing cycle and low work efficiency of the existing CNC automatic programming design method in the prior art by providing a CNC automatic programming design, system and computer storage medium thereof, thereby shortening the processing cycle of the entire set of drawings and improving efficiency.
[0066] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0067] Embodiment 1
[0068] The first embodiment of the present application provides a CNC automation programming design method, wherein the human-computer interaction server unit is a Windows desktop program in the form of an exe, and the main body is a plurality of UI interface modules and a TCP server, which is manually started by the user. After startup, the TCP server will enter the listening state in the child thread to wait for the client to connect, and the UI interface in the main thread performs human-computer interaction; the NX internal mode client unit is an interfaceless dynamic library in the form of a dll, and the main body is a plurality of NX internal mode execution modules and a TCP client, which is started with NX, and after startup, the client will always listen to the server online in the child thread; the NX external mode client unit is an interfaceless background program in the form of an exe, and the main body is a plurality of NX external mode execution modules and a TCP client, which is controlled to start by the human-computer interaction server unit, and after startup, the client will always listen to the server online in the child thread; it includes the following steps:
[0069] Step S1, file selection: executed by the human-computer interaction server unit, the human-computer interaction server unit selects a folder to store the entire set of images, reads the contents in the folder, filters and corrects the image file names in the contents, and then displays them on the UI interface of the human-computer interaction server unit;
[0070] Step S2, UG execution: executed by the human-computer interaction server unit. After the user clicks the UG execution button, it is determined whether the NX internal mode client unit is started. If not, an NX is started. The NX internal mode client unit will be started together with the NX.
[0071] Step S3, background execution: executed by the human-computer interaction server unit, after the user clicks the background execution button, at least one NX external mode client unit is dynamically started according to the current computer CPU utilization; preferably, in step S3, the NX external mode client unit is started only when the computer CPU utilization does not exceed 60%;
[0072] Step S4, double-click the image file name: executed by the human-computer interaction server unit, obtain the name of the image file double-clicked by the user, and then determine whether the NX internal mode client unit is started. If not started, start an NX, and the NX internal mode client unit starts together with the NX;
[0073] Step S5, obtaining interface data and image data: executed by the human-computer interaction server unit, obtaining the image name and enabled function name selected by the user on the human-computer interaction server unit;
[0074] Step S6, serializing the acquired data: executed by the human-computer interaction server unit, and sequentially saving the image file name and the enabled function name in binary form;
[0075] Step S7, the serialized data is sent to the background execution end and the NX execution end: the data is executed by the human-computer interaction server unit, and the data converted into binary data is sent to the NX external mode client unit and the NX internal mode client unit respectively in the form of TCP communication;
[0076] Step S8, the NX external mode client unit and the NX internal mode client unit receive data respectively: the NX external mode client unit receives the binary data sent by the human-computer interaction server unit, and the NX internal mode client unit receives the binary data sent by the human-computer interaction server unit;
[0077] Step S9, deserialize the received data: performed by the NX external mode client unit and the NX internal mode client unit, and restore the binary data into image file names and function names in an orderly manner;
[0078] Step S10, using the NX external mode to execute related functions: using the NX external mode client unit to open the image file in the background program in a non-rendering manner, and then using the NX external mode client unit to load the function module in the background program to perform operations on the image file;
[0079] Step S11, using the NX internal mode to execute the corresponding function: using the NX internal mode client unit to open the drawing file through the NX execution program control NX, and then using the NX internal mode client unit to load the function module through the NX execution program to perform operations on the drawing file;
[0080] Step S12, execution completion data return interface: the drawing file name and function name after execution are serialized, and sent to the human-computer interaction server unit through TCP communication. The human-computer interaction server unit then deserializes the data into the drawing file name and function name after receiving it, and displays the message that the corresponding drawing file has completed the execution of the corresponding function on the UI interface of the human-computer interaction server unit.
[0081] In the first embodiment of the present application, the NX internal mode client unit includes an NX internal mode execution module and an NX internal TCP communication module. Among them, the NX external mode client unit includes an NX external mode execution module and an NX external TCP communication module. Among them, the human-computer interaction server unit includes a server TCP communication module. Specifically, the NX internal mode execution module and the NX external mode execution module are respectively used to perform related functions and operations; the NX internal TCP communication module, the NX external TCP communication module and the server TCP communication module are used to realize TCP communication connection to facilitate data interaction.
[0082] In the first embodiment of the present application, when the NX internal mode client unit is started, it includes the NX internal main line execution step and the NX internal sub-line execution step;
[0083] The steps for executing the mainline in NX include:
[0084] Step A1, waiting for the human-computer interaction service end unit to send data;
[0085] Step A2: When the human-computer interaction server unit sends data, the NX internal mode client unit processes the data;
[0086] Step A3, the NX internal mode client unit executes a corresponding function according to the result of data processing;
[0087] Step A4, the NX internal mode client unit processes the data after executing the corresponding function and sends it to the UI interface of the human-computer interaction server unit for display;
[0088] The steps for executing the NX internal sub-line include:
[0089] Step B1, waiting for the human-computer interaction server unit to come online;
[0090] Step B2, the NX internal mode client unit and the human-computer interaction server unit communicate and connect via TCP;
[0091] Step B3: Select the folder where the whole set of drawings is saved through the human-computer interaction server unit, read the contents in the folder, filter and correct the drawing names in the contents, and then display them on the UI interface of the human-computer interaction server unit. At the same time, send relevant data to the NX internal mode client unit for processing.
[0092] In the first embodiment of the present application, when the NX external mode client unit is started, it includes the NX external main line execution step and the NX external sub-line execution step;
[0093] The NX external mainline execution steps include:
[0094] Step A1, waiting for the human-computer interaction service end unit to send data;
[0095] Step A2: When the human-computer interaction server unit sends data, the NX external mode client unit processes the data;
[0096] Step A3, the NX external mode client unit executes a corresponding function according to the result of data processing;
[0097] Step A4, the NX external mode client unit processes the data after executing the corresponding function and sends it to the UI interface of the human-computer interaction server unit for display;
[0098] The steps for executing the NX external sub-line include:
[0099] Step B1, waiting for the human-computer interaction server unit to come online;
[0100] Step B2, the NX external mode client unit and the human-computer interaction server unit communicate and connect via TCP;
[0101] Step B3: Select the folder where the entire set of drawings is saved through the human-computer interaction server unit, read the contents in the folder, filter and correct the drawing names in the contents, and then display them on the UI interface of the human-computer interaction server unit. At the same time, send relevant data to the NX external mode client unit for processing.
[0102] In the first embodiment of the present application, the human-computer interaction service end unit includes a human-computer interaction method and a client connection method when it is started;
[0103] The human-computer interaction method includes the following steps:
[0104] Step C1, when the human-computer interaction server unit is started, select the folder where the image file is located;
[0105] Step C2, read the content in the folder, if there is content, filter and correct the image file name in the content; if there is no content, return to step C1 and select another folder where the image file is located;
[0106] Step C3, display data on the UI interface;
[0107] Step C4: Perform human-computer interaction. If no function needs to be executed on the data, close the UI interface and end; if the data needs to be processed, execute the corresponding function or open the image file to process the data and form client information;
[0108] Step C5: Process the data according to the received client information and display the data on the UI interface; at the same time, send the client information to the NX external mode client unit and the NX internal mode client unit for execution;
[0109] The client connection method includes the following steps:
[0110] Step D1: When the human-computer interaction server unit is started, the server TCP communication module is started;
[0111] Step D2, waiting for the client to connect;
[0112] Step D3: After the client is connected, the NX external mode client unit and the NX internal mode client unit respectively connect with the client and obtain the client information;
[0113] Step D4, monitoring client information;
[0114] Step D5: Process the data according to the received client information and display the data on the UI interface; at the same time, send the client information to the NX external mode client unit and the NX internal mode client unit for execution.
[0115] Specifically, the embodiment of the present application is cleverly designed to solve the technical problems in the prior art of the existing CNC automatic programming design method in terms of limited ability to shorten the processing cycle and low work efficiency. It can solve the problem that NX and the program interface can continue to operate during the process of processing parts. Users do not need to wait for the program to end and can still process other things through NX. When faced with a whole set of drawings, the CNC automatic programming design scheme can automatically process the entire set of drawings in batches, which can greatly shorten the processing cycle of the entire set of drawings and improve generation efficiency.
[0116] The beneficial effects achieved by the embodiments of the present application are:
[0117] When switching drawings, users only need to double-click the drawing name on the interface to open the drawing on NX, which saves users time in searching and calling drawings and facilitates users to better manage drawings.
[0118] When it is necessary to perform calculations on drawings, users can send drawing data and functional modules to the background execution program. The calculation program does not occupy NX, thus achieving parallelism between user operations and program calculation logic.
[0119] When it is necessary to perform calculations on the drawings, users can send the drawing data and function modules to the NX execution program. The calculation program occupies NX, but the UI interface can still be operated, solving the problem of the interface being unavailable when the NX program is running.
[0120] When faced with multiple graphics files, these graphics files and functions can be sent to multiple background programs for simultaneous calculation, which increases the execution efficiency exponentially.
[0121] Embodiment 2
[0122] A CNC automatic programming design system, comprising a human-computer interaction server unit, an NX external mode client unit and an NX internal mode client unit;
[0123] The human-computer interaction service end unit is used to allow the customer to select a folder to save the entire set of drawings, filter and correct the names of the drawings in the content, and then display them on the UI interface of the human-computer interaction service end unit, obtain the drawing names and enabled function names selected by the user on the human-computer interaction service end unit, and save the drawing names and enabled function names in binary order;
[0124] The NX external mode client unit receives the binary data sent by the human-computer interaction server unit, uses the NX external mode client unit to open the drawing in the background program in a non-rendering manner, and then uses the NX external mode client unit to load the function module in the background program to perform operations on the drawing, serializes the drawing name and function name after the execution is completed, and sends them to the human-computer interaction server unit for display;
[0125] The NX internal mode client unit receives the binary data sent by the human-computer interaction server unit, uses the NX internal mode client unit to open the drawing through the NX execution program control NX, and then uses the NX internal mode client unit to load the function module through the NX execution program to operate on the drawing; the drawing name and function name after execution are serialized and sent to the human-computer interaction server unit for display.
[0126] Embodiment 3
[0127] Embodiment 3 of the present application provides a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute a CNC automated programming design method.
[0128] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0132] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A CNC automation programming design method, It is characterized in that The following steps are involved: Step S1, select file: select the folder where the whole set of images are saved in the human-computer interaction server unit, read the content in the folder, filter and correct the image file names in the content, and then display them on the UI interface of the human-computer interaction server unit; Step S2, UG execution: After the user clicks the UG execution button, it is determined whether the NX internal mode client unit is started. If not, an NX is started, and the NX internal mode client unit will be started together with the NX; Step S3, background execution: after the user clicks the background execution button, at least one NX external mode client unit is dynamically started according to the current computer CPU utilization; Step S4, double-click the image file name: obtain the name of the image file double-clicked by the user, and then determine whether the NX internal mode client unit is started. If not started, start an NX, and the NX internal mode client unit is started together with the NX; Step S5, obtaining interface data and image data: obtaining the image name and enabled function name selected by the user on the human-computer interaction service end unit; Step S6, storing the image file name and the enabled function name in binary form in order; Step S7, the serialized data is sent to the background execution end and the NX execution end: the data converted into binary is sent to the NX external mode client unit and the NX internal mode client unit respectively in the form of TCP communication; Step S8, the NX external mode client unit and the NX internal mode client unit receive data respectively: the NX external mode client unit receives the binary data sent by the human-computer interaction server unit, and the NX internal mode client unit receives the binary data sent by the human-computer interaction server unit; Step S9, deserialize the received data: restore the binary data into image file names and function names in order; Step S10, using the NX external mode to execute related functions: using the NX external mode client unit to open the image file in the background program in a non-rendering manner, and then using the NX external mode client unit to load the function module in the background program to perform operations on the image file; Step S11, using the NX internal mode to execute the corresponding function: using the NX internal mode client unit to open the drawing file through the NX execution program control NX, and then using the NX internal mode client unit to load the function module through the NX execution program to perform operations on the drawing file; Step S12, execution completion data return interface: the drawing file name and function name after execution are serialized, and sent to the human-computer interaction server unit through TCP communication. The human-computer interaction server unit then deserializes the data into the drawing file name and function name after receiving it, and displays the message that the corresponding drawing file has completed the execution of the corresponding function on the UI interface of the human-computer interaction server unit.
2. A CNC automated programming design method according to claim 1, Features: In step S3, the NX external mode client unit is started only when the computer CPU utilization does not exceed 60%.
3. A CNC automated programming design method according to claim 1, Features: The NX internal mode client unit includes an NX internal mode execution module and an NX internal TCP communication module.
4. A CNC automated programming design method according to claim 1, Features: The NX external mode client unit includes an NX external mode execution module and an NX external TCP communication module.
5. A CNC automated programming design method according to claim 1, Features: The human-computer interaction server unit comprises a server TCP communication module.
6. A CNC automated programming design method according to claim 1, Features: The NX internal mode client unit includes the steps of executing the NX internal main line and executing the NX internal sub-line when starting; The NX internal main line execution steps include: Step A1, waiting for the human-computer interaction service end unit to send data; Step A2: When the human-computer interaction server unit sends data, the NX internal mode client unit processes the data; Step A3, the NX internal mode client unit executes a corresponding function according to the result of data processing; Step A4, the NX internal mode client unit processes the data after executing the corresponding function and sends it to the UI interface of the human-computer interaction server unit for display; The NX internal sub-line execution steps include: Step B1, waiting for the human-computer interaction server unit to come online; Step B2, the NX internal mode client unit and the human-computer interaction server unit communicate and connect via TCP; Step B3: Select the folder where the whole set of drawings is saved through the human-computer interaction server unit, read the contents in the folder, filter and correct the drawing names in the contents, and then display them on the UI interface of the human-computer interaction server unit. At the same time, send relevant data to the NX internal mode client unit for processing.
7. A CNC automated programming design method according to claim 1, Features: When the NX external mode client unit is started, it includes an NX external main line execution step and an NX external sub-line execution step; The NX external main line execution steps include: Step A1, waiting for the human-computer interaction service end unit to send data; Step A2: When the human-computer interaction server unit sends data, the NX external mode client unit processes the data; Step A3, the NX external mode client unit executes a corresponding function according to the result of data processing; Step A4, the NX external mode client unit processes the data after executing the corresponding function and sends it to the UI interface of the human-computer interaction server unit for display; The NX external sub-line execution steps include: Step B1, waiting for the human-computer interaction server unit to come online; Step B2, the NX external mode client unit and the human-computer interaction server unit communicate and connect via TCP; Step B3: Select the folder where the entire set of drawings is saved through the human-computer interaction server unit, read the contents in the folder, filter and correct the drawing names in the contents, and then display them on the UI interface of the human-computer interaction server unit. At the same time, send relevant data to the NX external mode client unit for processing.
8. A CNC automated programming design method according to claim 5, Features: The human-computer interaction service end unit includes a human-computer interaction method and a client connection method when it is started; The human-computer interaction method comprises the following steps: Step C1, when the human-computer interaction server unit is started, select the folder where the image file is located; Step C2, read the content in the folder, if there is content, filter and correct the image file name in the content; if there is no content, return to step C1 and select another folder where the image file is located; Step C3, display data on the UI interface; Step C4: Perform human-computer interaction. If no function needs to be executed on the data, close the UI interface and end; if the data needs to be processed, execute the corresponding function or open the image file to process the data and form client information; Step C5: Process the data according to the received client information and display the data on the UI interface; at the same time, send the client information to the NX external mode client unit and the NX internal mode client unit for execution; The client connection method comprises the following steps: Step D1: When the human-computer interaction server unit is started, the server TCP communication module is started; Step D2, waiting for the client to connect; Step D3: After the client is connected, the NX external mode client unit and the NX internal mode client unit respectively connect with the client and obtain the client information; Step D4, monitoring client information; Step D5: Process the data according to the received client information and display the data on the UI interface; at the same time, send the client information to the NX external mode client unit and the NX internal mode client unit for execution.
9. A CNC automated programming design system, Features: It includes a human-computer interaction server unit, an NX external mode client unit and an NX internal mode client unit; The human-computer interaction service end unit is used for allowing the customer to select a folder for saving a whole set of drawings, and filtering and correcting the names of drawings in the content, and then displaying them on the UI interface of the human-computer interaction service end unit, obtaining the drawing names and enabled function names selected by the user on the human-computer interaction service end unit, and saving the drawing names and enabled function names in binary order; The NX external mode client unit receives the binary data sent by the human-computer interaction server unit, uses the NX external mode client unit to open the drawing in the background program in a non-rendering manner, and then uses the NX external mode client unit to load the function module in the background program to perform operations on the drawing, and serializes the drawing name and function name after the execution is completed, and sends them to the human-computer interaction server unit for display; The NX internal mode client unit receives the binary data sent by the human-computer interaction server unit, uses the NX internal mode client unit to open the drawing through the NX execution program control NX, and then uses the NX internal mode client unit to load the function module through the NX execution program to perform operations on the drawing; the drawing name and function name after execution are serialized and sent to the human-computer interaction server unit for display.
10. A computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the CNC automatic programming design method according to any one of claims 1 to 8.
