Method, device, storage medium and processor for determining processing time

By adding an empty task subroutine in the NC program and utilizing the CNC system data acquisition interface, the problem of difficult determination of CNC machine tool processing time was solved, and accurate calculation of workpiece processing time and optimization of production management were achieved.

CN114331089BActive Publication Date: 2025-09-26CAXA TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111595619.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-09-26
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

Existing technologies cannot effectively determine the processing time of CNC machine tools, which limits the data connection and communication between MDC collection and production management systems.

Method used

By adding empty task subroutines as start and end markers in the NC program and combining the data acquisition interface of the CNC system, the program number, annotation information and program status are obtained to calculate the actual processing time of the NC program.

Benefits of technology

It achieves accurate quantification of NC program processing time, supports precise statistics of workpiece processing time and production management optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331089B_ABST
    Figure CN114331089B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, storage medium, and processor for determining processing time. The method includes: obtaining operation information of a preset program at preset time intervals, wherein the preset program is used to control processing equipment to process a target workpiece, the target workpiece being the workpiece for which processing time is to be calculated, and the preset program includes: multiple preset subroutines, the preset subroutines including a first preset subroutine and a second preset subroutine, the first preset subroutine being used to indicate the start of the preset program, and the second preset subroutine being used to indicate the end of the preset program, and the operation information including: an acquisition time and a program identifier; identifying a first acquisition time corresponding to the first program identifier of the first preset subroutine based on the operation information; identifying a second acquisition time corresponding to the second program identifier of the second preset subroutine based on the operation information; and determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time. This method solves the technical problem of the prior art in being unable to determine processing time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of numerical control machining, and in particular to a method, device, storage medium and processor for determining machining time. Background Art

[0002] With the development of digital workshops, existing MDC workshops' detailed manufacturing data and process systems are now capable of collecting CNC machine tool status information, including status information, operating information, and some real-time parameter information. However, there is currently no universal method for collecting the time it takes for workpieces to be produced on these machines. This significantly limits the integration and connection between MDC data collection and production management systems.

[0003] At present, for network card-type CNC equipment, the main program number, subroutine number, program status and program comment text information of a specific NC numerical control program can be obtained based on the data acquisition interface or communication protocol provided by its CNC computer numerical control machine tool system, but the start time and end time of the program cannot be obtained, resulting in the inability to calculate the actual processing time of the NC program.

[0004] With respect to the problem that the above-mentioned prior art cannot determine the processing time, no effective solution has been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a method, device, storage medium, and processor for determining processing time, so as to at least solve the technical problem that the prior art cannot determine processing time.

[0006] According to one aspect of an embodiment of the present invention, a method for determining processing time is provided, comprising: obtaining operation information of a preset program at preset time intervals, wherein the preset program is used to control processing equipment to process a target workpiece, the target workpiece being a workpiece for which processing time is required to be counted, the preset program comprising: a plurality of preset subroutines, the preset subroutines comprising a first preset subroutine and a second preset subroutine, the first preset subroutine being used to indicate the start of the preset program, and the second preset subroutine being used to indicate the end of the preset program, the operation information comprising: an acquisition time and a program identifier; identifying a first acquisition time corresponding to a first program identifier of the first preset subroutine based on the operation information; identifying a second acquisition time corresponding to a second program identifier of the second preset subroutine based on the operation information; and determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0007] Optionally, determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time includes: determining a time difference between the first acquisition time and the second acquisition time; determining an overall processing time based on the time difference; and determining the overall processing time as the processing time of the target workpiece.

[0008] Optionally, the operation information also includes: a program status, which is used to indicate the execution status of the preset program and the preset subroutine; based on the first acquisition time and the second acquisition time, determining the processing time of the target workpiece includes: identifying at least one third preset subroutine within the first acquisition time and the second acquisition time, wherein the preset subroutine also includes: the third preset subroutine; identifying the program status of the third preset subroutine in the operation information, wherein the program status includes at least: a processing status; determining the running time of the third preset subroutine in the processing status; determining the processing time of the target workpiece based on the running time of at least one of the third preset subroutine.

[0009] Optionally, the program state also includes: a non-processing state, and determining the processing time of the target workpiece also includes: determining the overall processing time based on the time difference between the first acquisition time and the second acquisition time; determining the non-running time of the third preset subroutine in the non-processing state; determining the overall non-processing time of the target workpiece based on the non-running time of at least one of the third preset subroutine; and determining the processing time based on the overall processing time and the overall non-processing time.

[0010] Optionally, the first preset subroutine and the second preset subroutine are empty task subroutines.

[0011] According to another aspect of an embodiment of the present invention, a device for determining processing time is also provided, including: an acquisition unit, used to acquire operation information of a preset program at a preset time interval, wherein the preset program is used to control a processing device to process a target workpiece, and the target workpiece is a workpiece for which processing time needs to be counted, and the preset program includes: multiple preset subroutines, and the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program, and the operation information includes: an acquisition time and a program identifier; a first identification unit, used to identify a first acquisition time corresponding to a first program identifier of the first preset subroutine based on the operation information; a second identification unit, used to identify a second acquisition time corresponding to a second program identifier of the second preset subroutine based on the operation information; a determination unit, used to determine the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0012] Optionally, the determination unit includes: a first determination module, used to determine the time difference between the first acquisition time and the second acquisition time; a second determination module, used to determine the overall processing time based on the time difference; and a third determination module, used to determine the overall processing time as the processing time of the target workpiece.

[0013] Optionally, the operation information also includes: a program status, which is used to indicate the execution status of the preset program and the preset subroutine; the determination unit includes: a first identification module, which is used to identify at least one third preset subroutine within the first acquisition time and the second acquisition time, wherein the preset subroutine also includes: the third preset subroutine; a second identification module, which is used to identify the program status of the third preset subroutine in the operation information, wherein the program status includes at least: a processing status; a fourth determination module, which is used to determine the running time of the third preset subroutine in the processing state; and a fifth determination module, which is used to determine the processing time of the target workpiece based on the running time of at least one of the third preset subroutine.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned method for determining the processing time.

[0015] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is configured to run a program, wherein the method for determining the processing time described above is executed when the program is run.

[0016] In an embodiment of the present invention, operation information of a preset program is obtained according to a preset time interval, wherein the preset program is used to control a processing device to process a target workpiece, the target workpiece is a workpiece for which processing time is required to be counted, the preset program includes: a plurality of preset subroutines, the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program, and the operation information includes: an acquisition time and a program identifier; a first acquisition time corresponding to the first program identifier of the first preset subroutine is identified based on the operation information; a second acquisition time corresponding to the second program identifier of the second preset subroutine is identified based on the operation information; and a second acquisition time corresponding to the first acquisition time and the second acquisition time. The processing time of the target workpiece is determined by setting the first preset subroutine and the second preset subroutine as the start and end identifiers of the preset program, so that the running time of the preset program can be calculated based on the first acquisition time of the first preset subroutine and the second acquisition time of the second preset subroutine, thereby achieving the purpose of determining the running time of the preset program used to process the target workpiece, and because the preset program is used to process the target workpiece, the running time of the preset program is the processing time of the target workpiece, therefore, the processing time of the target workpiece can also be determined according to the first acquisition time and the second acquisition time, thereby achieving the technical effect of determining the processing time of the target workpiece, thereby solving the technical problem that the prior art cannot determine the processing time. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 is a flow chart of a method for determining processing time according to an embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of collecting data according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a statistical diagram of collected data according to an embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of a device for determining processing time according to an embodiment of the present invention;

[0022] Figure 5 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to an embodiment of the present invention, an embodiment of a method for determining processing time is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] Figure 1 FIG. 1 is a flow chart of a method for determining processing time according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0027] Step S102, acquiring operation information of a preset program at preset time intervals, wherein the preset program is used to control a processing device to process a target workpiece, the target workpiece being a workpiece for which processing time is to be calculated, and the preset program includes: a plurality of preset subroutines, the preset subroutines including a first preset subroutine and a second preset subroutine, the first preset subroutine being used to indicate the start of the preset program, and the second preset subroutine being used to indicate the end of the preset program, and the operation information includes: an acquisition time and a program identifier;

[0028] Step S104, identifying a first collection time corresponding to a first program identifier of a first preset subroutine based on the operation information;

[0029] Step S106, identifying a second collection time corresponding to a second program identifier of a second preset subroutine based on the operation information;

[0030] Step S108 : determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0031] In an embodiment of the present invention, operation information of a preset program is obtained according to a preset time interval, wherein the preset program is used to control a processing device to process a target workpiece, the target workpiece is a workpiece for which processing time is required to be counted, the preset program includes: a plurality of preset subroutines, the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program, and the operation information includes: an acquisition time and a program identifier; a first acquisition time corresponding to the first program identifier of the first preset subroutine is identified based on the operation information; a second acquisition time corresponding to the second program identifier of the second preset subroutine is identified based on the operation information; and a second acquisition time corresponding to the first acquisition time and the second acquisition time. The processing time of the target workpiece is determined by setting the first preset subroutine and the second preset subroutine as the start and end identifiers of the preset program, so that the running time of the preset program can be calculated based on the first acquisition time of the first preset subroutine and the second acquisition time of the second preset subroutine, thereby achieving the purpose of determining the running time of the preset program used to process the target workpiece, and because the preset program is used to process the target workpiece, the running time of the preset program is the processing time of the target workpiece, therefore, the processing time of the target workpiece can also be determined according to the first acquisition time and the second acquisition time, thereby achieving the technical effect of determining the processing time of the target workpiece, thereby solving the technical problem that the prior art cannot determine the processing time.

[0032] In the above step S102 , the processing equipment may be a digital control machine tool, and the preset program may be an NC digital control program of the digital control machine tool. The digital control machine tool can process the target workpiece by executing the digital control program.

[0033] In the above step S102, the operation information is collected at preset time intervals, and the operation information collected at each collection time includes at least: the collection time and the program identifier.

[0034] Optionally, the program identifier includes at least: a program identifier of a preset program, and a program identifier of a preset subroutine.

[0035] It should be noted that various preset programs for processing different workpieces may have the same preset subroutines. The purpose of including the program identifier of the preset program in the running information is to determine the preset program used to process the target workpiece.

[0036] Optionally, each preset program for processing different workpieces may be a combination of a different number of sub-programs.

[0037] For example, at collection time t, the preset subroutine a in the preset program A is running, and the running information collected at collection time t includes: collection information t and the program identifier of the preset program A, and the program identifier of the preset subroutine a.

[0038] Optionally, the operation information also includes: annotation information, which is used to supplement the program information, such as process number, part name, batch number, etc.

[0039] In the above step S104, the first collection time is the operation information collected when the first preset subroutine is running, and the operation information at least includes: the first collection time and the first program identifier of the first preset subroutine.

[0040] In the above step S106, the second collection time is the operation information collected when the second preset subroutine is running, and the operation information at least includes: the second collection time and the second program identifier of the second preset subroutine.

[0041] As an optional embodiment, determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time includes: determining the time difference between the first acquisition time and the second acquisition time; determining the overall processing time based on the time difference; and determining the overall processing time as the processing time of the target workpiece.

[0042] In the above embodiment of the present invention, the first acquisition time is T1 and the second acquisition time is T2. The time difference |T2-T1| is the interval time between the first preset subroutine and the second preset subroutine. The time difference can also represent the running time of the preset program, which can be the processing time of the target workpiece.

[0043] It should be noted that, in the process of running the preset program, the preset subroutine in the preset program may include other processing states in addition to the processing state, such as waiting state, interruption state, termination state, and stop state. The preset subroutine is used to process the target workpiece in the processing state, and other processing states are not used to process the target workpiece. Therefore, the processing time is directly determined according to the difference between the first acquisition time and the second acquisition time, and the determined processing time is redundant.

[0044] As an optional embodiment, the operation information also includes: a program status, which is used to indicate the execution status of a preset program and a preset subroutine; based on the first acquisition time and the second acquisition time, determining the processing time of the target workpiece includes: identifying at least one third preset subroutine within the range of the first acquisition time and the second acquisition time, wherein the preset subroutine also includes: a third preset subroutine; identifying the program status of the third preset subroutine in the operation information, wherein the program status includes at least: a processing status; determining the running time of the third preset subroutine in the processing status; and determining the processing time of the target workpiece based on the running time of at least one third preset subroutine.

[0045] Optionally, the operation information also includes: program status. Table 1 is a schematic table of program status provided by the present invention. As shown in Table 1, each program status can be identified by a character. For example, the character "0" represents the "terminate (reset)" state, the character "1" represents the "stop" state, the character "2" represents the "run (activate)" state, the character "3" represents the "wait" state, and the character "4" represents the "interrupt" state, wherein the "run (activate)" state belongs to the "processing" state of the target workpiece, and the "terminate (reset)" state, "stop" state, "wait" state and "interrupt" state belong to the "non-processing" state of the target workpiece.

[0046] Program Status Function Remark 0 Terminate (Reset) Non-processing 1 stop Non-processing 2 Run (activate) Processing 3 wait Non-processing 4 Interrupt Non-processing

[0047] Table 1

[0048] As an optional embodiment, the program state also includes: a non-processing state, and determining the processing time of the target workpiece also includes: determining the overall processing time based on the time difference between the first acquisition time and the second acquisition time; determining the non-running time of the third preset subroutine in the non-processing state; determining the overall non-processing time of the target workpiece based on the non-running time of at least one third preset subroutine; and determining the processing time based on the overall processing time and the overall non-processing time.

[0049] In the above embodiment of the present invention, the overall processing time is determined based on the time difference between the first acquisition time and the second acquisition time, and the third preset subroutine within the range of the first acquisition time and the second acquisition time, as well as the non-operating time of the third preset subroutine, are determined. Then, the non-operating time of the third preset subroutine (i.e., the overall non-processing time) is eliminated from the overall processing time to determine the processing time.

[0050] As an optional embodiment, the first preset subroutine and the second preset subroutine are empty task subroutines.

[0051] In the above embodiment of the present invention, the first preset subroutine and the second preset subroutine are only used for calibration, and an empty task subroutine can be used to implement the calibration function.

[0052] The present invention also provides a preferred embodiment, which provides a solution for collecting and calculating the workpiece processing time through program operation.

[0053] The present invention calculates the actual processing time of the NC program by modifying the NC program and combining the collected program number (i.e., program identifier), annotation information, and program status information.

[0054] It should be noted that the NC program is the above-mentioned preset program.

[0055] The technical solution provided by the present invention includes: NC program modification, machine tool information collection (program number, annotation information and program status), and statistical logic (calculating the actual processing time of the NC program).

[0056] Optionally, the purpose of "NC program modification" is to add start and end marks to the NC program.

[0057] Alternatively, using the Fanuc system as an example, empty task subroutines can be added after the start and before the end of an existing program to mark the start and end of processing. Comments can also be added after the program number to supplement the program information.

[0058] Table 2 is a schematic table of key items in an NC code provided by the present invention, as shown in Table 2:

[0059]

[0060] Table 2 Alternatively, the original procedure is as follows:

[0061] "%

[0062] O0009

[0063] M08

[0064] M03S1500

[0065] T0101

[0066] G0X60.0Z-9.9

[0067] G1X35.0F0.15

[0068]

[0069] G70P1Q2F0.1

[0070] G0X100.0Z100.0

[0071] M30

[0072] %".

[0073] Optionally, the remodeled program:

[0074] “O0009(part1)

[0075] M98P0091

[0076] M08

[0077] M03S1500

[0078] T0101

[0079] G0X60.0Z-9.9

[0080] G1X35.0F0.15

[0081]

[0082] G70P1Q2F0.1

[0083] G0X100.0Z100.0

[0084] M98P0092

[0085] M30

[0086] %".

[0087] Optionally, add an empty task subroutine as a program start marker.

[0088] "%

[0089] O0091(start)

[0090] G04 X2.

[0091] M99

[0092] %".

[0093] Add an empty task subroutine as a program end mark.

[0094] "%

[0095] O0092(end)

[0096] G04 X2.

[0097] M99

[0098] %".

[0099] Optionally, "machine tool information acquisition" obtains the main program number, subroutine number, annotation information and program status for the modified NC program based on the data acquisition interface or communication protocol provided by the CNC system.

[0100] Figure 2is a schematic diagram of collecting data according to an embodiment of the present invention, such as Figure 2 As shown, the two newly added subroutines in the modified NC program are both empty tasks. They serve as program start and end markers, consuming only call duration. The total program execution duration is equal to the interval between the two subroutine calls. At the start and end of the NC program, the program processing status can be used to calculate the actual processing time of the NC program. Other annotation information, such as part numbers, can be obtained from the collected program annotations. This statistical result can be used to correlate relevant NC program information with the statistical results for later application.

[0101] Optionally, the statistical summary process is mainly divided into two steps: collecting and clarifying the processing start time and processing end time of the NC program; two newly added subroutines in the modified NC program serve as the start and end marks of the program, and when these two subtasks are collected, the start and end of the program execution are coded respectively.

[0102] Figure 3 is a schematic diagram of a statistical diagram of collected data according to an embodiment of the present invention, such as Figure 3 As shown, within the range of the start and end of NC program processing, the total time the processing state is running is calculated based on the NC program status. Since program processing may be paused or abnormally interrupted, the processing time needs to exclude these non-processing time periods. After the start and end of NC program execution are clearly defined, the program status within the start and end time periods is analyzed. The time when the program status is running is located as the start of the actual processing segment, and the time when the processing status is non-running is considered the end of the actual processing segment. The actual processing time of the actual processing segment can be obtained. All actual processing segments are calculated in sequence, and the sum of the actual processing segment times is obtained, which is the actual processing time of the NC program.

[0103] The technical solution provided by the present invention is a method for obtaining the workpiece processing time by modifying the program content, collecting and calculating the program running time; it solves the problem of being unable to locate the start and end of NC program processing; it solves the problem of being unable to obtain the actual processing time of the NC program; by obtaining the actual processing time of the NC program, the processing technology can be optimized; by obtaining the actual processing time of the NC program, the working hours can be accurately counted, which can improve the production management of the enterprise.

[0104] According to an embodiment of the present invention, an embodiment of a device for determining processing time is also provided. It should be noted that the device for determining processing time can be used to execute the method for determining processing time in an embodiment of the present invention, and the method for determining processing time in an embodiment of the present invention can be executed in the device for determining processing time.

[0105] Figure 4is a schematic diagram of a device for determining processing time according to an embodiment of the present invention, such as Figure 4 As shown, the device may include: an acquisition unit 42, which is used to acquire the operation information of a preset program at a preset time interval, wherein the preset program is used to control the processing equipment to process the target workpiece, and the target workpiece is a workpiece whose processing time needs to be counted. The preset program includes: multiple preset subroutines, and the preset subroutines include a first preset subroutine and a second preset subroutine. The first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program. The operation information includes: an acquisition time and a program identifier; a first identification unit 44, which is used to identify a first acquisition time corresponding to a first program identifier of the first preset subroutine based on the operation information; a second identification unit 46, which is used to identify a second acquisition time corresponding to a second program identifier of the second preset subroutine based on the operation information; and a determination unit 48, which is used to determine the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0106] It should be noted that the acquisition unit 42 in this embodiment can be used to execute step S102 in the embodiment of the present application, the first recognition unit 44 in this embodiment can be used to execute step S104 in the embodiment of the present application, the second recognition unit 46 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the determination unit 48 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0107] In an embodiment of the present invention, operation information of a preset program is obtained according to a preset time interval, wherein the preset program is used to control a processing device to process a target workpiece, the target workpiece is a workpiece for which processing time is required to be counted, the preset program includes: a plurality of preset subroutines, the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program, and the operation information includes: an acquisition time and a program identifier; a first acquisition time corresponding to the first program identifier of the first preset subroutine is identified based on the operation information; a second acquisition time corresponding to the second program identifier of the second preset subroutine is identified based on the operation information; and a second acquisition time corresponding to the first acquisition time and the second acquisition time. The processing time of the target workpiece is determined by setting the first preset subroutine and the second preset subroutine as the start and end identifiers of the preset program, so that the running time of the preset program can be calculated based on the first acquisition time of the first preset subroutine and the second acquisition time of the second preset subroutine, thereby achieving the purpose of determining the running time of the preset program used to process the target workpiece, and because the preset program is used to process the target workpiece, the running time of the preset program is the processing time of the target workpiece, therefore, the processing time of the target workpiece can also be determined according to the first acquisition time and the second acquisition time, thereby achieving the technical effect of determining the processing time of the target workpiece, thereby solving the technical problem that the prior art cannot determine the processing time.

[0108] As an optional embodiment, the determination unit includes: a first determination module, used to determine the time difference between the first acquisition time and the second acquisition time; a second determination module, used to determine the overall processing time based on the time difference; and a third determination module, used to determine the overall processing time as the processing time of the target workpiece.

[0109] As an optional embodiment, the operation information also includes: a program status, which is used to indicate the execution status of the preset program and the preset subroutine; the determination unit includes: a first identification module, which is used to identify at least one third preset subroutine within the first acquisition time and the second acquisition time, wherein the preset subroutine also includes: a third preset subroutine; a second identification module, which is used to identify the program status of the third preset subroutine in the operation information, wherein the program status includes at least: a processing status; a fourth determination module, which is used to determine the running time of the third preset subroutine in the processing state; and a fifth determination module, which is used to determine the processing time of the target workpiece based on the running time of at least one third preset subroutine.

[0110] As an optional embodiment, the program state also includes: a non-processing state, and the determination unit also includes: a sixth determination module, used to determine the overall processing time based on the time difference between the first acquisition time and the second acquisition time; a seventh determination module, used to determine the non-running time of the third preset subroutine in the non-processing state; an eighth determination module, used to determine the overall non-processing time of the target workpiece based on the non-running time of at least one third preset subroutine; and a ninth determination module, used to determine the processing time based on the overall processing time and the overall non-processing time.

[0111] As an optional embodiment, it is characterized in that the first preset subroutine and the second preset subroutine are empty task subroutines.

[0112] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.

[0113] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.

[0114] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the processing time: obtaining the operation information of the preset program at a preset time interval, wherein the preset program is used to control the processing equipment to process the target workpiece, and the target workpiece is the workpiece for which the processing time needs to be counted. The preset program includes: multiple preset subroutines, the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the first preset subroutine is used to indicate the end of the preset program, and the operation information includes: acquisition time and program identifier; identifying the first acquisition time corresponding to the first program identifier of the first preset subroutine based on the operation information; identifying the second acquisition time corresponding to the second program identifier of the second preset subroutine based on the operation information; and determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0115] Optionally, Figure 5 1 is a block diagram of a computer terminal according to an embodiment of the present invention. Figure 5 As shown, the computer terminal 50 may include: one or more (only one is shown in the figure) processors 52 and a memory 54.

[0116] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for determining processing time in the embodiments of the present invention. The processor executes the software programs and modules stored in the memory to perform various functional applications and data processing, thereby implementing the above-mentioned method for determining processing time. The memory can include a high-speed random access memory and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory can further include a memory remotely located relative to the processor, and these remote memories can be connected to the terminal 50 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0117] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtaining the operation information of the preset program at a preset time interval, wherein the preset program is used to control the processing equipment to process the target workpiece, and the target workpiece is the workpiece for which the processing time needs to be counted. The preset program includes: multiple preset subroutines, the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program, and the operation information includes: acquisition time and program identifier; identifying the first acquisition time corresponding to the first program identifier of the first preset subroutine based on the operation information; identifying the second acquisition time corresponding to the second program identifier of the second preset subroutine based on the operation information; and determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0118] Optionally, the processor may further execute program code of the following steps: determining a time difference between the first acquisition time and the second acquisition time; determining a total processing time based on the time difference; and determining the total processing time as the processing time of the target workpiece.

[0119] Optionally, the operation information also includes: a program status, which is used to indicate the execution status of the preset program and the preset subroutine. The above-mentioned processor can also execute the program code of the following steps: identifying at least one third preset subroutine within the first acquisition time and the second acquisition time, wherein the preset subroutine also includes: a third preset subroutine; identifying the program status of the third preset subroutine in the operation information, wherein the program status includes at least: a processing status; determining the running time of the third preset subroutine in the processing status; and determining the processing time of the target workpiece based on the running time of at least one third preset subroutine.

[0120] Optionally, the program state also includes: non-processing state, and the above-mentioned processor can also execute the program code of the following steps: determine the overall processing time based on the time difference between the first acquisition time and the second acquisition time; determine the non-running time of the third preset subroutine in the non-processing state; determine the overall non-processing time of the target workpiece based on the non-running time of at least one third preset subroutine; determine the processing time based on the overall processing time and the overall non-processing time.

[0121] Optionally, the first preset subroutine and the second preset subroutine are empty task subroutines.

[0122] According to an embodiment of the present invention, a solution for determining processing time is provided. The operation information of a preset program is obtained according to a preset time interval, wherein the preset program is used to control the processing equipment to process the target workpiece, and the target workpiece is the workpiece for which the processing time is required to be calculated. The preset program includes: multiple preset subroutines, and the preset subroutines include a first preset subroutine and a second preset subroutine. The first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program. The operation information includes: acquisition time and program identifier; a first acquisition time corresponding to the first program identifier of the first preset subroutine is identified based on the operation information; a second acquisition time corresponding to the second program identifier of the second preset subroutine is identified based on the operation information; and a target workpiece is determined based on the first acquisition time and the second acquisition time. The processing time of the target workpiece is determined by the first preset subroutine and the second preset subroutine. The first preset subroutine and the second preset subroutine are set as the start and end identifiers of the preset program, so that the running time of the preset program can be calculated based on the first acquisition time of the first preset subroutine and the second acquisition time of the second preset subroutine, thereby achieving the purpose of determining the running time of the preset program used to process the target workpiece, and since the preset program is used to process the target workpiece, the running time of the preset program is the processing time of the target workpiece. Therefore, the processing time of the target workpiece can also be determined according to the first acquisition time and the second acquisition time, thereby achieving the technical effect of determining the processing time of the target workpiece, and thus solving the technical problem that the prior art cannot determine the processing time.

[0123] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 5 It does not limit the structure of the above electronic device. For example, the computer terminal 50 may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 5 Different configurations shown.

[0124] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0125] The embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for determining the processing time provided in the embodiment.

[0126] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0127] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining operation information of a preset program at a preset time interval, wherein the preset program is used to control the processing equipment to process a target workpiece, the target workpiece is a workpiece for which processing time needs to be counted, the preset program includes: multiple preset subroutines, the preset subroutines include a first preset subroutine and a second preset subroutine, the first preset subroutine is used to indicate the start of the preset program, and the second preset subroutine is used to indicate the end of the preset program, the operation information includes: acquisition time and program identifier; identifying a first acquisition time corresponding to a first program identifier of the first preset subroutine based on the operation information; identifying a second acquisition time corresponding to a second program identifier of the second preset subroutine based on the operation information; and determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time.

[0128] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining a time difference between a first acquisition time and a second acquisition time; determining a total processing time based on the time difference; and determining the total processing time as the processing time of the target workpiece.

[0129] Optionally, the operation information further includes: a program state for indicating the execution state of the preset program and the preset subroutine; in this embodiment, the storage medium is configured to store program code for executing the following steps: identifying at least one third preset subroutine within the range of the first acquisition time and the second acquisition time, wherein the preset subroutine further includes: a third preset subroutine;

[0130] Identify the program status of the third preset subroutine in the running information, wherein the program status includes at least: a processing status; determine the running time of the third preset subroutine in the processing status; and determine the processing time of the target workpiece based on the running time of at least one third preset subroutine.

[0131] In this embodiment, the program state also includes: a non-processing state, and the storage medium is configured to store program codes for executing the following steps: determining the overall processing time based on the time difference between the first acquisition time and the second acquisition time; determining the non-running time of the third preset subroutine in the non-processing state; determining the overall non-processing time of the target workpiece based on the non-running time of at least one third preset subroutine; and determining the processing time based on the overall processing time and the overall non-processing time.

[0132] Optionally, the first preset subroutine and the second preset subroutine are empty task subroutines.

[0133] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0134] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0136] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0137] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0139] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for determining processing time, characterized in that: include: Obtaining operation information of a preset program at preset time intervals, wherein the preset program is used to control a processing device to process a target workpiece, the target workpiece being a workpiece for which processing time is to be calculated, the preset program comprising: a plurality of preset subroutines, the preset subroutines comprising a first preset subroutine and a second preset subroutine, the first preset subroutine being used to indicate the start of the preset program, and the second preset subroutine being used to indicate the end of the preset program, the operation information comprising: an acquisition time and a program identifier, and the processing device being a numerically controlled machine tool; identifying a first acquisition time corresponding to a first program identifier of the first preset subroutine based on the operation information; identifying a second collection time corresponding to a second program identifier of the second preset subroutine based on the operation information; A processing time of the target workpiece is determined based on the first acquisition time and the second acquisition time.

2. The method according to claim 1, characterized in that Determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time includes: determining a time difference between the first acquisition time and the second acquisition time; determining an overall processing time based on the time difference; The total processing time is determined as the processing time of the target workpiece.

3. The method according to claim 1, characterized in that The operation information further includes: a program status, which is used to indicate the execution status of the preset program and the preset subroutine; and determining the processing time of the target workpiece based on the first acquisition time and the second acquisition time includes: identifying at least one third preset subroutine within the range of the first acquisition time and the second acquisition time, wherein the preset subroutine further comprises: the third preset subroutine; identifying a program status of the third preset subroutine in the operation information, wherein the program status includes at least: a processing status; Determining the running time of the third preset subroutine in the processing state; The processing time of the target workpiece is determined based on the running time of at least one of the third preset subroutines.

4. The method according to claim 3, characterized in that The program state further includes: a non-machining state, and determining the machining time of the target workpiece further includes: determining a total processing time based on a time difference between the first acquisition time and the second acquisition time; Determine the non-operating time of the third preset subroutine in a non-processing state; determining a total non-machining time of the target workpiece based on a non-running time of at least one of the third preset subroutines; The processing time is determined based on the total processing time and the total non-processing time.

5. The method according to any one of claims 1 to 4, characterized in that The first preset subroutine and the second preset subroutine are empty task subroutines.

6. A device for determining processing time, characterized in that: include: an acquisition unit, configured to acquire operation information of a preset program at preset time intervals, wherein the preset program is used to control a processing device to process a target workpiece, the target workpiece being a workpiece for which processing time is to be calculated, the preset program comprising: a plurality of preset subroutines, the preset subroutines comprising a first preset subroutine and a second preset subroutine, the first preset subroutine being used to indicate the start of the preset program, and the second preset subroutine being used to indicate the end of the preset program, the operation information comprising: an acquisition time and a program identifier, and the processing device being a numerically controlled machine tool; a first identifying unit, configured to identify, based on the running information, a first acquisition time corresponding to a first program identifier of the first preset subroutine; a second identifying unit, configured to identify, based on the running information, a second collection time corresponding to a second program identifier of the second preset subroutine; A determining unit is configured to determine a processing time of the target workpiece based on the first acquisition time and the second acquisition time.

7. The device according to claim 6, characterized in that The determining unit includes: A first determining module, configured to determine a time difference between the first acquisition time and the second acquisition time; a second determining module, configured to determine an overall processing time based on the time difference; The third determining module is configured to determine the total processing time as the processing time of the target workpiece.

8. The device according to claim 6, characterized in that The operation information further includes: a program status, which is used to indicate the execution status of the preset program and the preset subroutine; the determining unit includes: A first identification module is configured to identify at least one third preset subroutine within the range of the first acquisition time and the second acquisition time, wherein the preset subroutine further includes: the third preset subroutine; a second identification module, configured to identify a program state of the third preset subroutine in the operation information, wherein the program state includes at least: a processing state; a fourth determining module, configured to determine the running time of the third preset subroutine in the processing state; The fifth determining module is configured to determine a processing time of the target workpiece based on a running time of at least one of the third preset subroutines.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for determining the processing time according to any one of claims 1 to 5.

10. A processor, characterized in that: The processor is configured to run a program, wherein the program, when running, executes the method for determining the processing time according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Statistical method and system for electronic screen using time

    CN107992393A