A method for automatically matching drilling and riveting NC codes to analyze machining logs

Through the CNC code analysis method developed in C#, the processing logs of automatic drilling and riveting equipment are automatically identified and calculated, which solves the problem of time-consuming analysis in the existing technology, realizes efficient and accurate processing log analysis, and improves the efficiency of the automatic drilling and riveting feedback mechanism.

CN115269518BActive Publication Date: 2025-09-09AVIC SAC COMML AIRCRAFT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210848380.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-19
Publication Date
2025-09-09
Estimated Expiration
2042-07-19

AI Technical Summary

Technical Problem

In the existing technology, the processing log analysis of automatic drilling and riveting equipment is time-consuming, and the workload of manual identification of CNC code content is large, which restricts the working efficiency of the feedback mechanism.

Method used

Use C# for secondary development, establish a NC code file backup mechanism for single product and single batch, read the processing log and match the NC code file line by line, develop a theoretical and actual time difference algorithm, and automatically identify processing efficiency.

Benefits of technology

It achieves efficient analysis of automatic drilling and riveting processing logs, improves recognition accuracy and speed, provides comprehensive production result feedback, and provides reliable data support for the automatic drilling and riveting operation mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269518B_ABST
    Figure CN115269518B_ABST
Patent Text Reader

Abstract

A method for automatically matching drilling and riveting CNC codes to analyze processing logs. First, confirm the processing of a certain batch of a certain product according to the production schedule, generate a production flow database, and back up the CNC files; initially build the processing log data architecture, and set the processing log to record the start time information. Secondly, read the processing log, match the product information in the flow database, and record the batch information; after matching the product and batch, read the CNC file. Thirdly, analyze and calculate the theoretical time according to the read program code, and then judge the downtime, and then record the theoretical time, actual time and downtime. Finally, summarize the time information of each item, and calculate the start-up efficiency and processing performance. The present invention can efficiently realize the time analysis of automatic drilling and riveting processing logs, and can obtain efficient and comprehensive production results; it can ensure the accuracy of analyzing processing logs and reduce the workload of analyzing automatic drilling and riveting equipment processing logs; and efficiently and comprehensively provide reliable data support for the automatic drilling and riveting operation feedback mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of numerical control design and provides a method for automatically drilling and riveting, matching numerical control codes and analyzing processing logs. Background Art

[0002] Analyzing processing results plays a key role in the operational feedback mechanism for automated drilling and riveting. Analyzing the automated drilling and riveting log is the most reliable method for providing timely, effective, and comprehensive information. Analyzing the log and calculating the difference between theoretical and actual times involves several steps: reading the log's time; determining the product name and production run; matching the program code to calculate the theoretical time; and finally, obtaining the actual theoretical difference. The automated drilling and riveting equipment's processing log contains information such as the processing time, program name, and process number (hereinafter referred to as "N") for each cycle. Manually identifying and matching CNC code content is labor-intensive and time-consuming, limiting the efficiency of the automated drilling and riveting feedback mechanism. Summary of the Invention

[0003] In order to overcome the above-mentioned technical difficulties, the present invention provides a method for automatically matching NC codes for drilling and riveting and analyzing processing logs. The present invention adopts C# for secondary development, establishes a NC code file backup mechanism for a single product and a single batch, reads the production content of the processing log, matches the NC code file line by line, develops a theoretical and actual time difference algorithm, and finally summarizes the information to obtain the automatic drilling and riveting processing efficiency.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] A method for automatically analyzing a machining log by matching numerical control codes to drilling and riveting includes the following steps:

[0006] The first step is to determine the processing of a certain batch of a product according to the production schedule, generate production flow data R, and back up the NC file. The specific method is as follows:

[0007] ① Establish data R of all production records, which includes all NC file objects P. Object P includes attributes such as time, program name, number of runs and file path;

[0008] ② When processing a new product, add a NC file object P1 in the data R;

[0009] ③Use the C#DateTimePicker module to read the current time, and then change the time property of object P1 to the current time;

[0010] ④ Set the program name and number to be processed, and use C# string method to record the program name attribute and number attribute in P1;

[0011] ⑤ Use the C#FileInfo method to back up the NC files to a separate folder and record the file path properties of P1.

[0012] The second step is to initially establish processing log data S0, which includes all log objects J. Object J includes attributes such as time point, program name, flight number, N number, theoretical time, actual time, and downtime.

[0013] The third step is to add the first initial log object. The specific method is as follows:

[0014] ① Add a log object J1 in data S0;

[0015] ② Select the earliest time point recorded in the processing log and set it as the time point attribute of object J1;

[0016] ③ Leave the program name, flight number, and N number attributes blank;

[0017] ④ Theoretical time, actual time, and downtime attributes are set to 0.1 seconds, and the initial processing log is completed.

[0018] The fourth step is to read the processing log file and fill the processing log data S with the flight information and update it to S1. The specific method is as follows:

[0019] ① Use the C#OpenFileDialog module to open the processing log file, and use the C#TextReader method to record and create a text object T with time point, program name, and N number information;

[0020] ②Select the last log object J1 in data S;

[0021] ③ Select the first file object T1 in the set T in chronological order;

[0022] ④Compare the time of T1 and the time of J1. If the time of T1 is earlier than the time of J1, delete T1 and repeat step ③;

[0023] ⑤ Read the program name in T1, filter by program name, and extract the NC file object combination R1 in data R in reverse chronological order;

[0024] ⑥Select the first NC file object P1 in R1;

[0025] ⑦Compare the time of T1 and the time of P1. If the time of P1 is later than the time of T1, delete P1 in R1 and repeat step ⑥;

[0026] ⑧Add a log object J2 in the data S, use C# string method to record the time point T1, program name, and N number to the time point T1, program name, and N number to J2, and record the flight number of P1 to the flight number of J2;

[0027] ⑨ Delete T1 in T and repeat steps ③ to ⑧ until there is no data in T.

[0028] Step 5: Match the NC file content in data S, fill the theoretical time, actual time, and downtime of the processing log data S1 and update it to S2. The specific method is as follows:

[0029] ① Select a new log data group M in data S1 by a certain program name and a certain flight, and select a certain CNC file object P1;

[0030] ② Use the C#OpenFileDialog module to open the NC file according to the file path of P1, and use the C#TextReader method to read and generate the text object T of the code;

[0031] ③Select the first log object J1 and the second log object J2 in M;

[0032] ④ Read the "N" attribute of J1 and J2 in the program text object T, use String.Contains to determine the movement position of each axis, and then calculate the theoretical time A1 according to the theoretical movement speed of the device, and set the "theoretical time" attribute of J1 to A1;

[0033] ⑤ Read the "Time Point" attributes of J1 and J2, subtract them to get the time difference A2, and calculate the work efficiency by dividing A1 by A2. If the work efficiency is less than 60%, set J1's "Actual Time" attribute to A1*1.67 and J1's "Downtime" attribute to A2-A1*1.67;

[0034] ⑥ Delete J1 in M ​​and repeat steps ③ to ⑤ until there is only one piece of data in M.

[0035] In the sixth step, finally use the C#DateTimePicker module to set the start time and end time, read the time point information in S2 and then make a judgment, summarize all the theoretical time, actual time, and downtime, and obtain the equipment start-up efficiency = actual time / (actual time + downtime), and obtain the processing performance = theoretical time / actual time.

[0036] The key technical points of the present invention are as follows:

[0037] 1) Confirm the processing of a certain batch of a product according to the production schedule, generate a production flow database, and back up the NC files;

[0038] 2) Initially build the processing log data structure, including time point, program name, flight number, N number, theoretical time, actual time, and downtime information;

[0039] 3) Set the processing log to record the start time information;

[0040] 4) Read the processing log, match the product information in the flow database, and record the batch information;

[0041] 5) After matching the product and the batch, read the CNC file;

[0042] 6) Analyze and calculate the theoretical time by reading the program code, and then determine the downtime situation, and then record the theoretical time, actual time and downtime;

[0043] 7) Summarize the time information of each item and calculate the operating efficiency and processing performance.

[0044] Beneficial effects of the present invention:

[0045] (1) The method of using automatic drilling and riveting to match CNC code to analyze processing logs can efficiently realize the time analysis of automatic drilling and riveting processing logs, automatically identify the processed products and production batches, automatically read the program code content, and efficiently calculate the theory based on the code. The downtime situation is then judged based on the processing log information, and finally an efficient and comprehensive production result is obtained, which provides a data basis for the feedback mechanism of automatic drilling and riveting operations and has good engineering application value.

[0046] (2) The accuracy of the analysis of processing logs is guaranteed, and the analysis speed is improved, which greatly reduces the workload of analyzing the processing logs of automatic drilling and riveting equipment;

[0047] (3) Provides reliable data support for the automatic drilling and riveting operation feedback mechanism efficiently and comprehensively. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flow chart of the present invention. DETAILED DESCRIPTION

[0049] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings and technical solutions.

[0050] like Figure 1 As shown, a flow chart of a method for automatically matching NC codes with drilling and riveting process logs includes the following implementation steps:

[0051] 1) Determine the processing of a certain batch of a certain product according to the production schedule (method A), generate production flow data R, and back up the NC file. The specific method is as follows:

[0052] ① Establish data R of all production records, which includes all NC file objects P. Object P includes attributes such as time, program name, number of runs and file path;

[0053] ② When processing a new product, add a NC file object P1 in the data R;

[0054] ③Use the C#DateTimePicker module to read the current time, and then change the time property of object P1 to the current time;

[0055] ④ Set the program name and number to be processed, and use C# string method to record the program name attribute and number attribute in P1;

[0056] ⑤ Use the C#FileInfo method to back up the NC files to a separate folder and record the file path properties of P1.

[0057] 2) Initially establish processing log data S0, which includes all log objects J. Object J includes attributes such as time point, program name, flight number, N number, theoretical time, actual time, and downtime.

[0058] 3) Add the first initial log object (Method B), the specific method is as follows:

[0059] ① Add a log object J1 in data S0;

[0060] ② Select the earliest time point recorded in the processing log and set it as the time point attribute of object J1;

[0061] ③Set the program name, flight number, and N number attributes to blank "";

[0062] ④ Theoretical time, actual time, and downtime attributes are set to 0.1 seconds, and the initial processing log is completed.

[0063] 4) Read the processing log file, fill the processing log data S with the flight information (method C) and update it to S1. The specific method is as follows:

[0064] ① Use the C#OpenFileDialog module to open the processing log file, and use the C#TextReader method to record and create a text object T with time point, program name, and N number information;

[0065] ②Select the last log object J1 in data S;

[0066] ③ Select the first file object T1 in the set T in chronological order;

[0067] ④Compare the time of T1 and the time of J1. If the time of T1 is earlier than the time of J1, delete T1 and repeat step ③;

[0068] ⑤ Read the program name in T1, filter by program name, and extract the NC file object combination R1 in data R in reverse chronological order;

[0069] ⑥Select the first NC file object P1 in R1;

[0070] ⑦Compare the time of T1 and the time of P1. If the time of P1 is later than the time of T1, delete P1 in R1 and repeat step ⑥;

[0071] ⑧Add a log object J2 in the data S, use C# string method to record the time point T1, program name, and N number to the time point T1, program name, and N number to J2, and record the flight number of P1 to the flight number of J2;

[0072] ⑨ Delete T1 in T and repeat steps ③ to ⑧ until there is no data in T.

[0073] 5) Match the NC file content in data S, fill the theoretical time, actual time, and downtime in the processing log data S1 (method D) and update it to S2. The specific method is as follows:

[0074] ① Select a new log data group M in data S1 by a certain program name and a certain flight, and select a certain CNC file object P1;

[0075] ② Use the C#OpenFileDialog module to open the NC file according to the file path of P1, and use the C#TextReader method to read and generate the text object T of the code;

[0076] ③Select the first log object J1 and the second log object J2 in M;

[0077] ④ Read the "N" attribute of J1 and J2 in the program text object T, use String.Contains to determine the movement position of each axis, and then calculate the theoretical time A1 according to the theoretical movement speed of the device, and set the "theoretical time" attribute of J1 to A1;

[0078] ⑤ Read the "Time Point" attributes of J1 and J2, subtract them to get the time difference A2, and calculate the work efficiency by dividing A1 by A2. If the work efficiency is less than 60%, set J1's "Actual Time" attribute to A1*1.67 and J1's "Downtime" attribute to A2-A1*1.67;

[0079] ⑥ Delete J1 in M ​​and repeat steps ③ to ⑤ until there is only one piece of data in M.

[0080] 6) Finally, use the C# DateTimePicker module to set the start time and end time, read the time point information in S2 and make judgments, summarize all the theoretical time, actual time, and downtime, and calculate the total equipment start-up efficiency = actual time / (actual time + downtime), and calculate the processing performance = theoretical time / actual time.

[0081] It should be pointed out that those skilled in the art may make several modifications and improvements without departing from the principles of the present invention, and these modifications and improvements should also be considered to fall within the scope of protection of the present invention.

[0082] The above-described embodiments merely express the implementation methods of the present invention, but should not be understood as limiting the scope of the patent of the present invention. It should be pointed out that for those skilled in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention.

Claims

1. A method for automatically analyzing machining logs by matching numerical control codes for drilling and riveting, characterized in that: The following steps are involved: The first step is to determine the processing of a certain batch of a product according to the production schedule, generate production flow data R, and back up the NC file. The specific method is as follows: ① Establish data R of all production records, which includes all NC file objects P. Object P includes attributes such as time, program name, number of runs and file path; ② When processing a new product, add a NC file object P1 in the data R; ③Use the C#DateTimePicker module to read the current time, and then change the time property of object P1 to the current time; ④ Set the program name and number to be processed, and use C# string method to record the program name attribute and number attribute in P1; ⑤ Use the C#FileInfo method to back up the NC files to a separate folder and record the file path properties of P1; The second step is to initially create processing log data S0, which includes all log objects J. Object J includes attributes such as time point, program name, flight number, N number, theoretical time, actual time, and downtime; The third step is to add the first initial log object. The specific method is as follows: ① Add a log object J1 in data S0; ② Select the earliest time point recorded in the processing log and set it as the time point attribute of object J1; ③ Leave the program name, flight number, and N number attributes blank; ④ Theoretical time, actual time, and downtime attributes are set to 0.1 seconds, and the initial processing log is completed; The fourth step is to read the processing log file and fill the processing log data S with the flight information and update it to S1. The specific method is as follows: ① Use the C#OpenFileDialog module to open the processing log file, and use the C#TextReader method to record and create a text object T with time point, program name, and N number information; ②Select the last log object J1 in data S; ③ Select the first file object T1 in the set T in chronological order; ④Compare the time of T1 and the time of J1. If the time of T1 is earlier than the time of J1, delete T1 and repeat step ③; ⑤ Read the program name in T1, filter by program name, and extract the NC file object combination R1 in data R in reverse chronological order; ⑥Select the first NC file object P1 in R1; ⑦Compare the time of T1 and the time of P1. If the time of P1 is later than the time of T1, delete P1 in R1 and repeat step ⑥; ⑧Add a log object J2 in the data S, use C# string method to record the time point T1, program name, and N number to the time point T1, program name, and N number to J2, and record the flight number of P1 to the flight number of J2; ⑨ Delete T1 in T and repeat steps ③ to ⑧ until there is no data in T; Step 5: Match the NC file content in data S, fill the theoretical time, actual time, and downtime of the processing log data S1 and update it to S2. The specific method is as follows: ① Select a new log data group M in data S1 by a certain program name and a certain flight, and select a certain CNC file object P1; ② Use the C#OpenFileDialog module to open the NC file according to the file path of P1, and use the C#TextReader method to read and generate the text object T of the code; ③Select the first log object J1 and the second log object J2 in M; ④ Read the "N" attribute of J1 and J2 in the program text object T, use String.Contains to determine the movement position of each axis, and then calculate the theoretical time A1 based on the theoretical movement speed of the device. Set the "Theoretical Time" attribute of J1 to A1; ⑤ Read the "Time Point" attribute of J1 and J2, subtract them to get the time difference A2, and calculate the work efficiency by dividing A1 by A2. If the work efficiency is less than 60%, set J1's "Actual Time" attribute to A1*1.67 and J1's "Downtime" attribute to A2-A1*1.67; ⑥ Delete J1 in M ​​and repeat steps ③ to ⑤ until there is only one piece of data in M; In the sixth step, finally use the C#DateTimePicker module to set the start time and end time, read the time point information in S2 and then make a judgment, summarize all the theoretical time, actual time, and downtime, and obtain the equipment start-up efficiency = actual time / (actual time + downtime), and obtain the processing performance = theoretical time / actual time.

Citation Information

Patent Citations

  • Cloud management platform for numerical control system of sewing equipment

    CN106202550A

  • Method and device for testing code file running efficiency

    CN111078581A