Numerical control system automatic test method and system supporting manual intervention

By identifying and recording automatic test operations and manual intervention operations in CNC system test cases, and generating test case scripts, the problems of low test coverage and poor test integrity in the prior art are solved, and higher automated test integrity and coverage are achieved.

CN120010441AActive Publication Date: 2025-05-16WUHAN HUAZHONG NUMERICAL CONTROL
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510113485.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-16
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

The existing automated testing methods for CNC systems cannot effectively support manual intervention operations, resulting in low test coverage and poor test integrity.

Method used

By recording the template data generated by test cases during manual testing, identifying automatic test operations and manual intervention operations, and generating test case scripts in the simulated CNC panel, it supports the arrangement and combination of multiple keys and data inputs to achieve manual intervention operations.

Benefits of technology

Improves the integrity and test coverage of automated tests, reduces the difficulty of users writing test case scripts, and increases the versatility of test case scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010441A_ABST
    Figure CN120010441A_ABST
Patent Text Reader

Abstract

The invention discloses a numerical control system automatic test method and system supporting manual intervention. The method comprises the following steps: recording template data generated by a test case in a manual test process; identifying an automatic test operation and a manual intervention operation in the test case, and generating a test case script in a test case script generation area in the simulation numerical control panel; reading the test case script, and sending an instruction to the numerical control device; performing automatic testing according to the instruction, and recording testing data generated in the testing process; and detecting whether the test case passes the test according to the test data and the template data. According to the technical scheme provided by the embodiment of the invention, the manual intervention operation is introduced into the test case, so that the integrity and the test coverage rate of the automatic test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of numerical control technology, and in particular to an automatic testing method and system for a numerical control system supporting manual intervention. Background Art

[0002] At present, the automatic testing method of CNC system mainly uses G instruction program as the input content of test case. When the test case is executed for the first time, it is first verified by manual testing. If it is executed correctly, a standard template data file of the test case is created. The template file records the instruction domain data generated during the execution of the test case. If the test case is executed again later, it can be detected whether the instruction domain data generated during the execution is consistent with the data in the template file. If they are consistent, the test case is executed correctly, otherwise it is executed incorrectly.

[0003] The main defects of the above-mentioned existing automated testing methods are that the input data items of the test cases are limited to G code files, and some common manual intervention operations of CNC systems during the execution of G code are not supported, such as switching processing modes (automatic, single-stage, manual), switching processing states (cycle start, feed hold), modifying G instruction parameters (tool compensation, coordinate system), manually moving the feed axis, etc. In fact, more CNC system software defects are generated during manual intervention operations, which indirectly reflects that the integrity of current CNC system automated testing is poor and the test coverage is low.

[0004] Therefore, how to improve the integrity and test coverage of automated testing is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present invention provide a method and system for automatic testing of a numerical control system supporting manual intervention, so as to at least overcome the above technical problems.

[0006] In a first aspect, an embodiment of the present invention provides a method for automated testing of a numerical control system supporting manual intervention, comprising:

[0007] Record the template data generated by the test case during manual testing;

[0008] Identify the automatic test operations and manual intervention operations in the test case, and generate a test case script in a test case script generation area in the simulated numerical control panel;

[0009] Read the test case script and send instructions to the numerical control device; perform automatic testing according to the instructions and record the test data generated during the testing process;

[0010] According to the test data and the template data, it is detected whether the test case passes the test.

[0011] Further, the simulated numerical control panel includes: a numerical control system interface display area, an NC panel, an MCP panel and a test case script generation area;

[0012] Before identifying test cases, also include:

[0013] Through the remote desktop protocol, the interface of the numerical control device is projected into the interface display area of ​​the numerical control system;

[0014] Mapping the NC keys of the numerical control device to the NC panel in the simulated numerical control panel;

[0015] The MCP buttons of the numerical control device are mapped to the MCP panel in the simulated numerical control panel.

[0016] Furthermore, the automatic test operation refers to an operation based on a G code program; and the manual intervention operation refers to an operation based on key events and a numerical control system.

[0017] Furthermore, the test case script generation process is specifically as follows:

[0018] The simulated numerical control panel generates automatic test operation instructions according to the automatic test operation;

[0019] The simulated numerical control panel generates a manual intervention operation instruction according to the manual intervention operation;

[0020] The analog numerical control panel determines the execution time of each instruction according to the operation time of each operation;

[0021] In the test case script generation area of ​​the simulated numerical control panel, each instruction and the execution time of each instruction are written in chronological order.

[0022] Further, the test case script is read and instructions are sent to the numerical control device; automatic testing is performed according to the instructions, and test data generated during the test is recorded, including:

[0023] The automated testing system reads the test case script and sends each instruction and the execution time of each instruction to the numerical control device through the Talnet protocol;

[0024] The key event receiving program in the numerical control device receives the manual intervention operation instruction and the execution time of the manual intervention operation instruction, and interprets it as a key event;

[0025] The numerical control system in the numerical control device receives the automatic test operation instruction and the execution time of the automatic test operation instruction, as well as the key event, performs automatic testing, and records the test data generated during the testing process.

[0026] Further, the detecting whether the test case passes the test according to the test data and the template data includes:

[0027] The line numbers of the G code program in the manual test and the generated template data are collected at a predetermined period, and each data segment of the template data is marked with the collected G code line numbers to form first instruction domain data;

[0028] The line numbers of the G code program in the automatic test and the generated test data are collected in the same cycle, and each data segment of the test data is marked with the collected G code line numbers to form second instruction domain data;

[0029] If the first instruction domain data is consistent with the second instruction domain data, it is detected that the test case has passed the test; if the first instruction domain data is inconsistent with the second instruction domain data, it is detected that the test case has not passed the test.

[0030] In a second aspect, an embodiment of the present invention provides a numerical control system automatic test system supporting manual intervention, comprising: a PC terminal and a numerical control device;

[0031] The automated testing system is used to record the template data generated by the test case during the manual testing process;

[0032] The simulated numerical control panel is used to identify automatic test operations and manual intervention operations in the test case, and generate a test case script in a test case script generation area in the simulated numerical control panel;

[0033] The automated testing system is further configured to read the test case script and send instructions to the numerical control device; the numerical control device is configured to perform automatic testing according to the instructions and record test data generated during the testing process;

[0034] The automated testing system is also used to detect whether a test case passes the test based on the test data and the template data.

[0035] Furthermore, the simulated numerical control panel is used to identify the automatic test operation and the manual intervention operation in the test case, and generate the test case script in the test case script generation area in the simulated numerical control panel, specifically including:

[0036] The simulated numerical control panel generates automatic test operation instructions according to the automatic test operation;

[0037] The simulated numerical control panel generates a manual intervention operation instruction according to the manual intervention operation;

[0038] The analog numerical control panel determines the execution time of each instruction according to the operation time of each operation;

[0039] In the test case script generation area of ​​the simulated numerical control panel, each instruction and the execution time of each instruction are recorded in chronological order.

[0040] Furthermore, the automated testing system is also used to read the test case script and send instructions to the numerical control device, specifically including:

[0041] After reading the test case script, the automated testing system sends each instruction and the execution time of each instruction to the numerical control device through the Talnet protocol.

[0042] Furthermore, the key event receiving program in the numerical control device is used to receive the manual intervention operation instruction and the execution time of the manual intervention operation instruction, and parse it into a key event;

[0043] The numerical control system in the numerical control device is used to receive the automatic test operation instruction and the execution time of the automatic test operation instruction, as well as the key event, perform automatic testing, and record the test data generated during the testing process.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] 1) Test cases not only support the input of G-code files, but also support the arrangement and combination of multiple keys and data input to achieve manual intervention operations, which greatly improves the integrity and test coverage of automated testing;

[0046] 2) By simulating the numerical control panel to identify automatic test operations and manual intervention operations, the test case script is generated, which reduces the difficulty of users writing test case scripts;

[0047] 3) By comparing the template data with the test data, it is determined whether the automatic test results meet expectations, and then whether the test case is suitable for the current CNC test system, which increases the versatility of the test case script.

[0048] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 It is a flow chart of a method for automatic testing of a numerical control system supporting manual intervention provided by an embodiment of the present invention;

[0051] Figure 2 It is a schematic diagram of a simulated numerical control operation panel of a numerical control system automatic testing method supporting manual intervention provided by an embodiment of the present invention;

[0052] Figure 3 The invention is a schematic diagram of a structure of a numerical control system automatic test system supporting manual intervention provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0055] Embodiment 1

[0056] Figure 1 A flow chart of a method for automated testing of a numerical control system supporting manual intervention is provided in an embodiment of the present invention. This embodiment is applicable to situations where a numerical control system performs automated testing of test cases. The method can be executed by an automated testing system for a numerical control system supporting manual intervention.

[0057] like Figure 1 As shown, the method specifically comprises the following steps:

[0058] S101: Recording template data generated by test cases during manual testing.

[0059] It should be noted that in the embodiments of the present invention, there are two types of tests, namely manual testing and automatic testing. Manual testing is performed manually. When a test case is executed by the numerical control system in the numerical control device, it is manually determined whether the test process and test results meet expectations. Automatic testing is to simulate the numerical control panel, generate a test case script, and then control the numerical control device to perform the test by the automated test program.

[0060] The purpose of manual testing is to screen out test cases that meet expectations and record the data generated by the test cases during the testing process as template data.

[0061] The purpose of automatic testing is to determine whether the test case is suitable for the current CNC system. By comparing the test data generated by the test case in the automatic testing process with the template data generated by the test case in the manual testing process, it can be determined whether the test case is suitable for the current CNC system.

[0062] Manual testing does not use the simulated CNC panel, but is performed manually based on automatic test operations and manual intervention operations. Both manual testing and automatic testing involve the running of G code programs. Therefore, by matching different lines of G code programs in manual testing with those in automatic testing, and confirming that the template data and test data generated when each line of G code program is running are compared, it can be determined whether the test case is suitable for the current CNC system.

[0063] Among them, the template data and test data include: the starting position of the operation point, the end position, the motion trajectory, the moving speed, the acceleration, the time, etc.

[0064] S102: Identify automatic test operations and manual intervention operations in the test case, and generate a test case script in a test case script generation area in the simulated numerical control panel.

[0065] In the embodiment of the present invention, the test case is actually a set of collections, including: test environment, operation steps, input data and expected results, etc. In order to verify whether the execution result of the test case is consistent with the expected result, it is necessary to provide the test case to the numerical control system in the numerical control device.

[0066] The operation steps in the test case include: automatic test operation and manual intervention operation.

[0067] In the embodiment of the present invention, the automatic test operation does not refer to the operation of the statements in the G code, but refers to the operation based on the G code program, including: the selection, loading, running, stopping and other operations of the G code program. The manual intervention operation refers to the operation based on the key events and the numerical control system, including: pressing the NC button, pressing the MCP button, restarting the numerical control system, updating the numerical control system version and other operations.

[0068] Automatic test operation actually refers to the related operations on the G code program. After the user selects a G code program, the automatic test system on the PC will automatically execute the G code program; the G code program can be a pre-written program or a manually input program.

[0069] Manual intervention operation actually refers to the human intervention in the code operation during the automatic operation of the G code program, such as switching the processing mode (automatic, single-stage, manual), switching the processing status (cycle start, feed hold), modifying the G command parameters (tool compensation, coordinate system), manually moving the feed axis, etc.

[0070] Figure 2 Schematic diagram of a simulated numerical control operation panel of a numerical control system automatic testing method supporting manual intervention provided by an embodiment of the present invention, such as Figure 2 As shown, the simulated CNC panel includes: CNC system interface display area, NC panel, MCP panel and test case script generation area.

[0071] Before identifying test cases, also include:

[0072] S211: The interface of the numerical control device is projected into the numerical control system interface display area through the remote desktop protocol.

[0073] S212: Mapping the NC keys of the numerical control device with the NC panel in the simulated numerical control panel.

[0074] S213: Mapping the MCP button of the numerical control device with the MCP panel in the simulated numerical control panel.

[0075] In the embodiment of the present invention, after the numerical control device is mapped to the numerical control system interface display area, a corresponding relationship between the NC panel keys and the NC keys is established, and a corresponding relationship between the MCP panel keys and the MCP keys is established.

[0076] When simulating the CNC panel to identify the test case, for each manual intervention operation in the test case, the simulated CNC panel will further identify whether it is an NC key operation of the CNC device or an MCP key operation, and correspond the NC key operation to the NC panel key in the simulated CNC panel, and correspond the MCP key operation to the MCP panel key in the simulated CNC panel.

[0077] Preferably, different NC panel buttons in the NC panel can be corresponded with different identifiers. Table 1 provides some NC operation contents and their identifiers. As shown in Table 1, a correspondence between NC panel buttons and identifiers is established. When the simulated numerical control panel recognizes an NC button operation, the corresponding NC panel button is first searched according to the correspondence between the NC panel button and the NC button; then the corresponding identifier is searched according to the correspondence between the NC panel button and the identifier, and then a manual intervention operation instruction is generated.

[0078] Table 1

[0079]

[0080] Preferably, different MCP panel buttons in the MCP panel can be corresponded with different identifiers. Table 2 provides some MCP operation contents and their identifiers. As shown in Table 2, a correspondence between MCP panel buttons and identifiers is established. When the analog numerical control panel recognizes the MCP button operation, the corresponding MCP panel button is first searched according to the correspondence between the MCP panel button and the MCP button; then the corresponding identifier is searched according to the correspondence between the MCP panel button and the identifier, and then a manual intervention operation instruction is generated.

[0081] Table 2

[0082]

[0083] In an embodiment of the present invention, the manual intervention operation in the test case can be decomposed into indivisible minimum sub-steps. Each time an NC button or an MCP button is pressed, a minimum sub-step is generated. Each minimum sub-step can correspond to an NC panel button or an MCP panel button and is represented by an identifier in a fixed format.

[0084] Furthermore, the test case script generation process is as follows:

[0085] S221: The simulation numerical control panel generates automatic test operation instructions according to the automatic test operation.

[0086] Automatic test operation instructions can be expressed in the format of "operation type (operation content, waiting time)". For example, "PROG_SEND (O13773.txt, 3000)" means sending the G code program named O13773.txt to the CNC system and waiting for 3s.

[0087] S222: The simulating numerical control panel generates a manual intervention operation instruction according to the manual intervention operation.

[0088] Manual intervention operation instructions can be expressed in the format of "operation type (operation content, waiting time)". For example, "NC_KEY (RESET, 10)" means pressing the reset button and waiting for 10ms; "MCP_KEY (CYCLE_START, 3000)" means pressing the cycle start button and waiting for 3s.

[0089] S223: The simulation numerical control panel determines the execution time of each instruction according to the operation time of each operation.

[0090] The test case includes various operation contents and the operation time of each operation content. By reading this information and restoring it in the way of program running, each instruction and the execution time of each instruction are obtained, and the playback of the test case is realized.

[0091] S224: In the test case script generation area of ​​the simulated numerical control panel, write each instruction and the execution time of each instruction in chronological order.

[0092] In the embodiment of the present invention, each line in the test case script, that is, an automatic test operation instruction or a manual intervention operation instruction, represents an atomic operation, and each atomic operation consists of three parts: operation type, operation content and waiting time.

[0093] Table 3 provides some operation types and their identifiers. As shown in Table 3, the operation types can be classified according to the different functions of the operation objects, including: key response, G code file sending and loading, CNC system restart and CNC system version update. Among them, G code file sending and loading corresponds to automatic test operation instructions; key response, CNC system restart and CNC system version update correspond to manual intervention operation instructions.

[0094] Table 3

[0095]

[0096] The operation content can be determined according to the operation type, see Table 1 and Table 2. Table 1 contains common operation content in NC_KEY type, and Table 2 contains common operation content in MCP_KEY type. The operation content is specifically represented by CNC system panel keys, G code file names, or CNC system standard upgrade package file names.

[0097] The waiting time indicates the interval time after the atomic operation is completed and before the next atomic operation starts to be executed, and the unit is ms.

[0098] The test case script can be loaded and executed by the automated test system. During the loading process, the automated test system parses the case script line by line from the beginning to the end of the file, converts each atomic operation into a line of executable code statements, and the automated test system executes the converted code statements in sequence to realize the playback of the test case in the numerical control device.

[0099] S103: Read the test case script and send instructions to the numerical control device; perform automatic testing according to the instructions and record the test data generated during the test.

[0100] After reading the test case script, the automated test system sends each instruction and the execution time of each instruction to the numerical control device through the Talnet protocol.

[0101] The key event receiving program in the numerical control device receives the manual intervention operation instruction and the execution time of the manual intervention operation instruction, and interprets it as a key event.

[0102] It should be noted that the underlying operating system of the numerical control device starts the key event receiving program, which calls the key event processing function of the operating system layer according to the manual intervention operation instruction. The key event receiving program can use<linux / input.h> The struct input_event in the simulation defines each key input event on the CNC panel. The defined key input event is written to the keyboard device file in the / dev / input / directory, which can trigger the key event processing function of the underlying operating system. At this time, the operating system notifies the CNC system process of the key event to realize the playback of the test case script.

[0103] The numerical control system in the numerical control device receives the automatic test operation instruction and the execution time of the automatic test operation instruction, as well as the key event, performs automatic testing, and records the test data generated during the testing process.

[0104] S104: Detect whether the test case passes the test based on the test data and template data. Specifically:

[0105] The line numbers of the G code program in the manual test and the generated template data are collected at a predetermined period, and each data segment of the template data is marked using the collected G code line numbers to form first instruction domain data.

[0106] The line numbers of the G code program in the automatic test and the generated test data are collected in the same cycle, and each data segment of the test data is marked using the collected G code line numbers to form second instruction domain data.

[0107] Since both manual and automatic tests involve the execution of G code programs, by matching different lines of G code programs in manual and automatic tests, and confirming that when each line of G code program is running, the corresponding template data and test data are compared to determine whether the test case is suitable for the current CNC system.

[0108] If the data in the first instruction domain is consistent with the data in the second instruction domain, it is detected that the test case has passed the test; if the data in the first instruction domain is inconsistent with the data in the second instruction domain, it is detected that the test case has not passed the test.

[0109] Preferably, the numerical control system in the manual test and the numerical control system in the automatic test can be the same system or different systems. Further, the numerical control system in the manual test and the numerical control system in the automatic test can be different versions of the same numerical control system.

[0110] The technical solution of an embodiment of the present invention discloses an automated testing method for a CNC system that supports manual intervention. First, in order to facilitate unified identification and management, the manual intervention operations in the test case are scripted; secondly, the recording of the test case script is realized through the remote desktop protocol and the user input on the simulated CNC panel; thirdly, the playback of the test case script is realized by utilizing the Talnet protocol and the built-in secondary development interface of the CNC system; finally, the correctness verification of the test case execution result is completed by combining the instruction domain big data technology.

[0111] Embodiment 2

[0112] Figure 3 FIG. 1 is a schematic diagram of a structure of a numerical control system automatic test system supporting manual intervention provided by an embodiment of the present invention. Figure 3 As shown, it includes: PC terminal and numerical control device;

[0113] Among them, the PC end includes a built-in automatic test system, the numerical control device includes a built-in key event receiving program and a numerical control system; the automatic test system includes a built-in analog numerical control panel.

[0114] Among them, the automated testing system is used to record the template data generated by the test cases during the manual testing process.

[0115] The simulated numerical control panel is used to identify automatic test operations and manual intervention operations in the test case, and to generate a test case script in a test case script generation area in the simulated numerical control panel.

[0116] Among them, the automated testing system is also used to read the test case scripts and send instructions to the numerical control device.

[0117] Among them, the numerical control device is used to perform automatic testing according to the instructions and record the test data generated during the testing process.

[0118] Among them, the automated testing system is also used to detect whether the test case passes the test based on the test data and template data.

[0119] Furthermore, the simulated numerical control panel is used to generate automatic test operation instructions based on automatic test operations; to generate manual intervention operation instructions based on manual intervention operations; to determine the execution time of each instruction based on the operation time of each operation; and to record each instruction and the execution time of each instruction in chronological order in the test case script generation area.

[0120] Furthermore, the automated testing system is used to send each instruction and the execution time of each instruction to the numerical control device through the Talnet protocol after reading the test case script.

[0121] Furthermore, the key event receiving program in the numerical control device is used to receive the manual intervention operation instruction and the execution time of the manual intervention operation instruction, and parse them into key events.

[0122] Furthermore, the numerical control system in the numerical control device is used to receive automatic test operation instructions and the execution time of the automatic test operation instructions, as well as the key events, perform automatic testing, and record test data generated during the testing process.

[0123] The technical solution of the embodiment of the present invention is that the test case not only supports the input of G code files, but also supports the arrangement and combination of multiple keys and data input, realizes the operation of manual intervention, and greatly improves the integrity and test coverage of the automated test; the recording of the test case script is realized through the remote desktop protocol and the user input on the simulated numerical control panel, which reduces the difficulty of users writing test case scripts; the playback of the test case script is based on the Talnet protocol and is realized by calling the event processing function of the operating system layer, which reduces the impact of the numerical control system version on the test case script when updating, and increases the versatility of the test case script.

[0124] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0125] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for automated testing of a numerical control system supporting manual intervention, characterized in that: include: Record the template data generated by the test case during manual testing; Identify the automatic test operations and manual intervention operations in the test case, and generate a test case script in a test case script generation area in the simulated numerical control panel; Read the test case script and send instructions to the numerical control device; perform automatic testing according to the instructions and record the test data generated during the testing process; According to the test data and the template data, it is detected whether the test case passes the test.

2. The method according to claim 1, characterized in that The simulated numerical control panel includes: a numerical control system interface display area, an NC panel, an MCP panel and a test case script generation area; Before identifying test cases, also include: Through the remote desktop protocol, the interface of the numerical control device is projected into the interface display area of ​​the numerical control system; Mapping the NC keys of the numerical control device to the NC panel in the simulated numerical control panel; The MCP buttons of the numerical control device are mapped to the MCP panel in the simulated numerical control panel.

3. The method according to claim 1, characterized in that The automatic test operation refers to the operation based on the G code program; the manual intervention operation refers to the operation based on key events and the numerical control system.

4. The method according to claim 1, characterized in that: The generation process of the test case script is specifically as follows: The simulated numerical control panel generates automatic test operation instructions according to the automatic test operation; The simulated numerical control panel generates a manual intervention operation instruction according to the manual intervention operation; The analog numerical control panel determines the execution time of each instruction according to the operation time of each operation; In the test case script generation area of ​​the simulated numerical control panel, each instruction and the execution time of each instruction are written in chronological order.

5. The method according to claim 4, characterized in that The test case script is read and instructions are sent to the numerical control device; Perform automatic testing according to the instructions and record the test data generated during the test, including: The automated testing system reads the test case script and sends each instruction and the execution time of each instruction to the numerical control device through the Talnet protocol; The key event receiving program in the numerical control device receives the manual intervention operation instruction and the execution time of the manual intervention operation instruction, and interprets it as a key event; The numerical control system in the numerical control device receives the automatic test operation instruction and the execution time of the automatic test operation instruction, as well as the key event, performs automatic testing, and records the test data generated during the testing process.

6. The method according to claim 1, characterized in that The step of detecting whether the test case passes the test according to the test data and the template data includes: The line numbers of the G code program in the manual test and the generated template data are collected at a predetermined period, and each data segment of the template data is marked with the collected G code line numbers to form first instruction domain data; The line numbers of the G code program in the automatic test and the generated test data are collected in the same cycle, and each data segment of the test data is marked with the collected G code line numbers to form second instruction domain data; If the first instruction domain data is consistent with the second instruction domain data, it is detected that the test case has passed the test; if the first instruction domain data is inconsistent with the second instruction domain data, it is detected that the test case has not passed the test.

7. A system for implementing the automatic testing method for a numerical control system supporting manual intervention as claimed in any one of claims 1 to 6, characterized in that: include: PC terminal and CNC device; The PC terminal includes a built-in automatic test system, and the numerical control device includes a built-in key event receiving program and a numerical control system; The automated testing system includes a built-in analog numerical control panel; The automated testing system is used to record the template data generated by the test case during the manual testing process; The simulated numerical control panel is used to identify automatic test operations and manual intervention operations in the test case, and generate a test case script in a test case script generation area in the simulated numerical control panel; The automated testing system is further configured to read the test case script and send instructions to the numerical control device; the numerical control device is configured to perform automatic testing according to the instructions and record test data generated during the testing process; The automated testing system is also used to detect whether a test case passes the test based on the test data and the template data.

8. The method according to claim 7, characterized in that The simulated numerical control panel is used to identify the automatic test operation and the manual intervention operation in the test case, and generate the test case script in the test case script generation area in the simulated numerical control panel, specifically including: The simulated numerical control panel generates automatic test operation instructions according to the automatic test operation; The simulated numerical control panel generates a manual intervention operation instruction according to the manual intervention operation; The analog numerical control panel determines the execution time of each instruction according to the operation time of each operation; In the test case script generation area of ​​the simulated numerical control panel, each instruction and the execution time of each instruction are recorded in chronological order.

9. The method according to claim 7, characterized in that: The automated testing system is also used to read the test case script and send instructions to the numerical control device, specifically including: After reading the test case script, the automated testing system sends each instruction and the execution time of each instruction to the numerical control device through the Talnet protocol.

10. The method according to claim 7, characterized in that include: The key event receiving program in the numerical control device is used to receive the manual intervention operation instruction and the execution time of the manual intervention operation instruction, and parse it into a key event; The numerical control system in the numerical control device is used to receive the automatic test operation instruction and the execution time of the automatic test operation instruction, as well as the key event, perform automatic testing, and record the test data generated during the testing process.

Citation Information

Patent Citations

  • Interactive automated testing system and method thereof

    CN103092756A

  • Test script generation method and device, storage medium and program product

    CN115982024A

  • Numerical control system automatic test method and system based on instruction field big data

    CN116300797A

  • Visualization test method and device, electronic equipment and storage medium

    CN116841865A

  • Automatic test frame assembly, method and electronic equipment

    CN117971655A