Turret CNC punch presses, with their advantages of fast, high-precision, flexible punching processing systems and accurate product prediction through CNC programming simulation technology, have become increasingly widely used in recent years. They are particularly suitable for small-batch production of multi-variety, high-precision, and complex parts. Turret CNC punch presses are multi-station machines that process holes of various shapes by changing the processing trajectory and changing punches when processing sheet metal. They are mainly used for processing holes of various sizes and shapes on equipment panels, electrical component mounting plates, and cabinets. For example, the PEGA-345 CNC punch press from AMADA Corporation of Japan, which we have at home, can install 58 types of punches on the turntable, and changing punches only requires rotating the turntable. It can be seen that the main workload of CNC machining is the problem of programming the machining code. 1 Programming Analysis 1.1 According to foreign statistics, when programming manually, the ratio of programming time to actual machining time of a part is about 30:1, and 20% to 30% of the reasons why CNC machine tools cannot start are due to the inability to program the machining process in time. For example, the heat-conducting plate for one of our products has as many as 18 different types. Processing the drawings, calculating various coordinate data, and manually programming each part takes at least a day, while the actual machining time is only 3-5 minutes. 1.2 CNC milling machines and machining centers have relatively complete CAD/CAM systems as platforms that can automatically generate CNC code. However, for CNC punching machines like AMADA, only simple CNC coding programs are supported, and most are based on MS-DOS systems. The code is mainly written manually step by step by technicians, and even before writing, a series of coordinate calculations are required. This not only results in low programming efficiency but is also prone to errors. For example, the software used on our machine tools in 1995 was the AMADA-1E simple manual programming software. Its operating mode is shown in Figure 1. Because it involves manually drawing unfolded diagrams, calculating various data, and manually inputting information, the programming efficiency is very low. In addition, the file management system is limited, making it inconvenient to store, manage, and query program files. Especially given the large workload and variety of military and civilian product production tasks in our institute, without establishing a product program file database, a large amount of unnecessary repetitive work will occur. 1.3 The existence of this situation seriously restricts the needs of our institute's military and civilian product production tasks. In order to further improve processing efficiency, shorten processing cycle, improve processing accuracy, and enable advanced equipment to better serve scientific research and production, after a thorough investigation, analysis and demonstration of CNC punching machine programming software on the market, our institute upgraded the AMADA-1E programming system to the AMADA-2D programming system in 2002. Its operation mode is shown in Figure 2. It has the following advantages: (1) It can automatically generate processing programs by drawing unfolded diagrams; (2) Since it avoids repeatedly drawing unfolded diagrams of parts, manually calculating various processing data, and manually writing processing programs, the programming efficiency is greatly improved; (3) The file management system is relatively powerful, which is convenient for storing, managing and querying program files. It is particularly suitable for the large workload and variety of military product production tasks of our institute, avoiding repetitive labor. 2 Auxiliary Programming Analysis 2.1 Although the AMADA-2D programming system has made great progress compared with the AMADA-1E software, it still has many defects and cannot well meet the needs of actual production. 2.1.1 The AMADA-2D programming system is a standalone system. Even with multiple technicians forming a "serial" programming system, it still significantly limits programming efficiency. 2.1.2 For the AMADA-2D programming system, the most crucial task in programming is generating a high-quality 2D CAD plan view. Tests show that drawing the 2D plan view takes up as much as 3/4 of the total programming time. In contrast, CAM post-processing takes significantly less time. Ultimately, the AMADA-2D programming system is a programming software, and its CAD drawing functions are extremely limited and unfamiliar to most engineers. 2.2 To address the shortcomings of the AMADA-2D programming system, through extensive programming practice, I discovered that it can exchange data with other applications via DXF (Drawing Exchange File) format. AutoCAD, as a CAD software platform, boasts a user-friendly interface, powerful drawing capabilities, and ease of use, making it popular among engineers. Because CAD itself can achieve a precision of 0.0001 mm, high-precision CAD drawings ensure the high precision of parts. I organically combined AutoCAD with the AMADA-2D programming system to build the programming system shown in Figure 3, which greatly improved programming efficiency and program accuracy. 2.2.1 Parallel System of CAD Drawings Not only can programmers draw CAD unfolded drawings in parallel, but they can also make full use of process and design CAD drawings, as shown in Figure 3. Since the generation of unfolded drawings comes from multiple channels and multiple stages, a "parallel" system of CAD drawings is formed, which greatly improves programming efficiency and accuracy. 2.2.2 Fully Utilizing AutoCAD's Powerful Drawing Functions Utilizing AutoCAD's powerful drawing functions, manual layout can be used for special small parts, greatly saving materials and processing time. Although the AMADA-2D programming system has a layout function, for special parts, the layout function it has cannot meet the needs of the actual situation. If integrated organically with the AutoCAD system, utilizing AutoCAD's series of cut, copy, symmetry, and array operations, functions that AMDADA-2D cannot achieve can be easily realized. 2.2.3 Fully utilize the designed CAD drawing files. Taking the heat-conducting plate of a certain product of our institute as an example: using the previous manual programming mode, it takes about a day to write a machining program, and it is prone to errors. If using the AMADA-2D programming system, the programmer regenerates the CAD drawing according to the machining positioning drawing, which takes about 1 to 2 hours to draw the drawing, while the program generation time is about 30 minutes, which is inefficient and makes it difficult to guarantee the accuracy of machining. If the designed CAD drawing can be fully integrated with the AMADA-2D programming system, the program can be completed in just 1 hour with the help of the designed CAD drawing, achieving twice the result with half the effort. 2.2.4 Use AutoCAD to draw the unfolded drawing of box-type parts. The most important task in CNC programming of box-type parts is how to quickly and accurately generate two-dimensional planar unfolded drawings. The traditional process flow is shown in Figure 4. In the aforementioned process, on the one hand, it is difficult to draw part graphics and unfolded diagrams strictly to scale in KaiMu CAPP. Process engineers generally only provide unfolded schematic diagrams of the parts, while the CAD unfolded diagrams used for CNC programming must be strictly drawn to scale. On the other hand, because KaiMu CAPP and AutoCAD cannot achieve true data sharing and graphic exchange, not only is there a large amount of unnecessary duplication of work for process engineers and CNC programmers, but there is also no good mutual checking process between the various stages, which multiplies the probability of errors. Fully utilizing our existing office automation system, we can enable design, process, and CNC programming personnel to truly achieve data sharing. This will not only greatly improve programming efficiency, but also allow for timely detection and correction of errors by design, process, and programming personnel through mutual checking between the various stages, as shown in Figure 5. In conclusion, only by fully and effectively combining the AMADA-2D programming system with AutoCAD, utilizing AutoCAD's advanced and powerful CAD platform, and leveraging the advanced and reasonable CAM functions of the AMADA-2D programming system, can CNC machining programs be quickly and accurately compiled. This allows advanced equipment to better function and serve scientific research and production. 3. Programming Example 3.1 Programming of a Product's Heat Transfer Plate Through a local area network, the designed CAD graphics are called up, useful entity information is extracted, and data is exchanged with the AMADA-2D programming system via DXF files, quickly and accurately completing the CNC program compilation. This programming method not only improves machining efficiency but also greatly reduces the probability of errors in various stages. It improves efficiency and ensures machining accuracy and precision. Our institute has many heat transfer plates for various products, with numerous production tasks and tight deadlines. Applying this programming method not only ensures the production cycle but also guarantees the first-time acceptance of the heat transfer plates. Over the past two years, hundreds of CNC programs for heat transfer plates of various products have been designed for our institute. 3.2 Rational Layout of Small Parts Although the AMADA-2D programming system has a layout function, for some parts with special shapes, relying solely on this function is far from meeting the needs of actual production. Using only the AMADA-2D programming system's layout function, only 12 parts can be processed on a (500 mm × 240 mm) sheet metal, as shown in Figure 6. First, by using a series of AutoCAD commands such as cut, copy, symmetry, and rotation, the two parts are rationally nested. Then, the AMADA-2D programming system is used to generate a machining program and perform layout, allowing 18 parts to be processed on the (500 mm × 240 mm) sheet metal, as shown in Figure 7. Rational nesting not only improves material utilization but also reduces the processing time per part, increases mold life, and improves processing efficiency. In fact, the rational layout of small parts should be analyzed specifically based on the characteristics of the parts. Sometimes, rotating the part by a certain angle in AutoCAD before applying the AMADA-2D generation program is more reasonable, as shown in Figure 8. 3.3 AutoCAD-assisted unfolding of box-type parts: Using our existing local area network, the CAD three-view diagram of the design is accessed (Figure 9). In AutoCAD, a view is selected as the reference plane for the unfolded drawing (Figure 10). Through a series of commands such as cut, copy, symmetry, and rotation, process engineers can easily draw the CAD unfolded drawing of the part. Furthermore, during this process, they have a detailed review of the design, allowing design oversights to be identified and corrected immediately. Before programming the unfolded part drawing, programmers review both the part drawing and the unfolded drawing again, ensuring that design and process errors are detected early, guaranteeing the part's quality and production cycle. The CNC program for this part, generated using this method, was successfully machined on a CNC punch press, and the part passed inspection on the first attempt. This paper focuses on the research of the AMDAD-2D programming system, pointing out that only by fully and effectively combining the AMDAD-2D programming system with AutoCAD, utilizing AutoCAD's advanced and powerful CAD platform, and leveraging the advanced and reasonable CAM functions of the AMDAD-2D programming system, can CNC machining programs be quickly and accurately compiled, better serving scientific research and production. However, for some parts given in coordinate data format, sometimes using the AMDAD-1E manual programming software is more convenient, and sometimes even using Windows Notepad is more convenient, because Notepad is more convenient and faster for editing simple text files. Programmers should treat each situation specifically and make reasonable use of software resources.