Test method and system of electronic control module, storage medium and upper computer

By introducing automated testing methods and systems in the research and development stage of automotive electronic control modules, and using the coordinated work of the upper computer and microcontroller and electronic control module, the problems of low testing efficiency and poor accuracy in the existing technology are solved, efficient and accurate testing is achieved, and cost is reduced.

CN120010435APending Publication Date: 2025-05-16SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510031677.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The prior art test efficiency, poor accuracy and high cost in the research and development stage of automotive electronic control modules, mainly due to the long time and high error rate caused by relying on manual testing.

Method used

It provides an automated testing method and system for electronic control modules. Through the collaborative work of the upper computer, microcontroller and electronic control module, it realizes automatic test data acquisition, processing and judgment, and improves testing efficiency and accuracy.

Benefits of technology

Automatic testing of electronic control modules is realized, which improves testing efficiency and accuracy, reduces testing costs and reduces human errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010435A_ABST
    Figure CN120010435A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test method and system of an electronic control module, a storage medium and an upper computer. The method comprises the following steps: in response to a test starting instruction input by a user, obtaining test data of an electronic control module test; sending the test piece number of the electronic control module test and the first element of the test item to a single-chip microcomputer, so that the single-chip microcomputer obtains test data corresponding to the test piece number and the test content of the first element of the test item according to the test piece number and the test item; obtaining test data corresponding to the test content sent by the single-chip microcomputer; and processing and judging test data corresponding to the test content. According to the technical scheme provided by the embodiment of the invention, automatic testing of the electronic control module can be realized, the testing efficiency and accuracy of the electronic control module are improved, and the testing cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to a testing method, system, storage medium and host computer for an electronic control module. Background Art

[0002] With the development of automobile technology, the functions of automobile electronic control modules are becoming more and more powerful, and automobile testing technology is becoming more and more important. At present, the test software based on LabVIEW is widely used in the testing of various subsystems of automobiles, but most of them are tests of subsystems built for electronic control modules without faults after mass production, and there are relatively few tests on electronic control modules before mass production, that is, in the research and development stage.

[0003] If the electronic control module is tested manually, it will take a long time and there will be a certain error rate due to human factors, and the cost will be high. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a test method, system, storage medium and host computer for an electronic control module, so as to realize automated testing of the electronic control module, improve the efficiency and accuracy of the electronic control module testing, and reduce the testing cost.

[0005] On the one hand, an embodiment of the present invention provides a method for testing an electronic control module, comprising: In response to a start test instruction input by a user, acquiring test data of an electronic control module test; Sending the test piece number and the first element of the test item of the electronic control module test to the single-chip microcomputer, so that the single-chip microcomputer obtains test data corresponding to the test piece number and the test content of the first element of the test item according to the test piece number and the test item; Acquire test data corresponding to the test content sent by the single chip microcomputer; The test data corresponding to the test content is processed and judged.

[0006] Optionally, the processing and judging the test data corresponding to the test content includes: Extracting the first element of the test content, and using the first element of the test content as the next test state; Determine whether the test data corresponding to the test content is qualified; If it is determined that the test data corresponding to the test content is qualified, and the test piece number and the test item of the electronic control module test have a next element, the test piece number and the next element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test piece number and the test content of the next element of the test item according to the test piece number and the test item; Acquire the test data corresponding to the test item number sent by the single chip microcomputer and the test content of the next element of the test item; The test data corresponding to the test content corresponding to the test piece number and the next element of the test item are processed and judged.

[0007] Optionally, it also includes: If it is determined that the test content is unqualified, the next test piece number and the first element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain test data corresponding to the test content of the next test piece number and the first element of the test item according to the next test piece number and the test item; Acquire the test data corresponding to the test content of the next test piece number and the first element of the test item sent by the single chip microcomputer; The test data corresponding to the test content of the next test piece number and the first element of the test item is processed and judged.

[0008] Optionally, the electronic control module test includes a function test and / or a key test.

[0009] Optionally, the acquiring test data corresponding to the test content sent by the single chip microcomputer includes: The discrete digital signal corresponding to the test content is processed into high and low level signals to detect the number of actions and action duration of the electronic control module.

[0010] Optionally, the processing of the discrete digital signal corresponding to the test content into high and low level signals to detect the number of actions and duration of actions of the electronic control module includes: Separate all sampling points into arrays of single elements, and compare them with a single-element array of the same dimension and the value of the first threshold, to obtain a single-element array of 0, 1 of the same dimension; Integrate the single-element arrays of 0 and 1 into a string to generate high and low level string arrays; The number of 0s or 1s contained in the high and low level character string arrays is calculated to detect the number of actions and duration of actions of the electronic control module.

[0011] Optionally, it also includes: The discrete digital signal corresponding to the test content is filtered and processed into high and low level signals.

[0012] On the other hand, an embodiment of the present invention provides a test system for an electronic control module, comprising: a host computer, a single-chip microcomputer and an electronic control module, wherein the host computer is connected to the single-chip microcomputer, and the single-chip microcomputer is connected to the electronic control module; The host computer is used to obtain test data of the electronic control module test in response to a start test instruction input by a user; and send the test piece number and the first element of the test item of the electronic control module test to the single chip microcomputer; The single chip computer is used to obtain test data corresponding to the test content of the first element of the test item and the test item according to the test item number and the test item; The host computer is used to obtain the test data corresponding to the test content sent by the single-chip computer; and process and judge the test data corresponding to the test content.

[0013] On the other hand, an embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above-mentioned test method for the electronic control module.

[0014] On the other hand, an embodiment of the present invention provides a host computer, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, wherein the program instructions, when loaded and executed by the processor, implement the steps of the above-mentioned electronic control module testing method.

[0015] In the technical solution provided by the embodiment of the present invention, in response to the start test instruction input by the user, the test data of the electronic control module test is obtained; the test piece number and the first element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test content of the test piece number and the first element of the test item according to the test piece number and the test item; the test data corresponding to the test content sent by the single-chip microcomputer is obtained; and the test data corresponding to the test content is processed and judged. In the technical solution provided by the embodiment of the present invention, the automated test of the electronic control module can be realized, the efficiency and accuracy of the electronic control module test can be improved, and the test cost can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. 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 paying creative labor.

[0017] Figure 1 A flow chart of a method for testing an electronic control module provided by one embodiment of the present invention; Figure 2 A flowchart of another method for testing an electronic control module provided by an embodiment of the present invention; Figure 3 A flowchart of a process for a host computer to obtain data sent by a single-chip microcomputer provided in an embodiment of the present invention; Figure 4A This is a schematic diagram of the data uploaded from the microcontroller to the host computer; Figure 4B It is a schematic diagram of the high and low level string array; Figure 5A , 5B 5C is a schematic diagram of filtering a discrete digital signal corresponding to a test content according to an embodiment of the present invention; Fig. 6A , 6B 6C is a schematic diagram of processing a discrete digital signal corresponding to a test content into a high and low level signal according to an embodiment of the present invention; Figure 7 A schematic diagram of calculating the time required for test content (automatic relocking) provided in one embodiment of the present invention; Figure 8 A schematic diagram of a test system for an electronic control module provided by an embodiment of the present invention; Fig. 9 A schematic diagram of a host computer provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0019] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0021] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0022] An embodiment of the present invention provides a method for testing an electronic control module. Figure 1 A flow chart of a method for testing an electronic control module provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes: Step 102: The host computer obtains test data of the electronic control module test in response to the start test instruction input by the user.

[0023] In the embodiment of the present invention, the host computer can obtain the test data of the electronic control module test sent by the single chip computer.

[0024] In an embodiment of the present invention, the electronic control module test includes two parts: a functional test and / or a key test. The test content of each part has a corresponding table, which can be Excel. The table includes five user events: "Start Test", "End Test", "Pause Test", "Restart Test" and "Key Test". When the "Start Test" button is pressed, the functional test is entered, and when the "Key Test" button is pressed, the key test is entered. The host computer can adopt the state machine mode.

[0025] Step 104: The host computer sends the test piece number and the first element of the test item of the electronic control module test to the single chip microcomputer.

[0026] Step 106: The single chip microcomputer obtains the test data corresponding to the test content of the first element of the test item number and the test item according to the test item number and the test item.

[0027] Step 108: The host computer obtains the test data corresponding to the test content sent by the single-chip microcomputer.

[0028] In the embodiment of the present invention, the host computer can filter the discrete digital signal corresponding to the test content and process the discrete digital signal corresponding to the test content into high and low level signals to detect the number of actions and duration of actions of the electronic control module.

[0029] Step 110: The host computer processes and judges the test data corresponding to the test content.

[0030] In the technical solution provided by the embodiment of the present invention, in response to the start test instruction input by the user, the test data of the electronic control module test is obtained; the test piece number and the first element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test content of the test piece number and the first element of the test item according to the test piece number and the test item; the test data corresponding to the test content sent by the single-chip microcomputer is obtained; and the test data corresponding to the test content is processed and judged. In the technical solution provided by the embodiment of the present invention, the automated test of the electronic control module can be realized, the efficiency and accuracy of the electronic control module test can be improved, and the test cost can be reduced.

[0031] An embodiment of the present invention provides another test method for an electronic control module, which is implemented by nesting a conditional structure in a while loop and then nesting an event structure, and using a shift register for data transfer between the while loop and the conditional structure. Figure 2 A flowchart of another method for testing an electronic control module provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes: Step 202: The host computer obtains test data of the electronic control module test in response to the start test instruction input by the user.

[0032] In an embodiment of the present invention, the electronic control module test includes two parts: a functional test and / or a key test. The test content of each part has a corresponding table (the table can be Excel), as shown in Table 1 below. The table may include five user events: "Start Test", "End Test", "Pause Test", "Restart Test" and "Key Test". When the "Start Test" button is pressed, the function test is entered, and when the "Key Test" button is pressed, the key test is entered. The host computer can adopt the state machine mode.

[0033] Table 1 In the embodiment of the present invention, the LabVIEW running program is opened, and the user clicks the "Start Test" button to input the start test instruction and enter the initialization, that is, the ten columns of data including the test piece number, test item, test content 1, test content 2, and test content 3 in the function test and key test tables are written into ten arrays, and the number of loops is +1.

[0034] As shown in Table 1 above, each test content of each test has a corresponding program code segment. Different program code segments can be placed in different event branches of an event structure. Each branch takes a corresponding selector label. For example, if the selector label is "initial condition", it means that this program code segment is testing the initial condition. By analogy, the code segment with the selector label "anti-theft alarm" is testing the anti-theft alarm. For example, if each element in test content 1 is "initial condition", it means that the first test content of each test must first test the initial condition, and the element of test content 2 is "anti-theft alarm", which means that the second test content of this test is to test the anti-theft alarm.

[0035] Step 204: The host computer sends the test piece number and the first element of the test item of the electronic control module test to the single chip microcomputer.

[0036] In the embodiment of the present invention, when the electronic control module test includes a functional test, the host computer may extract the first element of the array of test item numbers and the array of test items of the functional test and send them to the single chip microcomputer.

[0037] Step 206: The single chip microcomputer obtains the test data corresponding to the test content of the first element of the test item number and the test item according to the test item number and the test item.

[0038] In the embodiment of the present invention, when the electronic control module test includes a functional test, the single chip microcomputer can collect the test data corresponding to the first element of the array of the test content 1 of the functional test and upload it to the host computer.

[0039] Step 208: The host computer obtains the test data corresponding to the test content sent by the single-chip microcomputer.

[0040] Step 210: The host computer extracts the first element of the test content and uses the first element of the test content as the next test state.

[0041] In the embodiment of the present invention, the host computer may extract the first element of the array of test content 1 as the next test state.

[0042] Step 212 , the host computer determines whether the test data corresponding to the test content is qualified, if so, execute step 214 ; if not, execute step 222 .

[0043] In the embodiment of the present invention, the single-chip microcomputer is used as the lower computer, which is responsible for collecting electrical signals, and its collection cycle is 2ms. For example, to determine whether the duration of the high level is ≤20ms, the upper computer needs to continuously receive ≤10 sampling points with high level. If 11 are received, the upper computer will determine that the test data corresponding to the test content is unqualified; for example, to determine whether there is only one action, the test data should contain 3 groups of strings, and the order of the strings is low-level string (i.e. "0" string), high-level string (i.e. "1" string) and low-level string (i.e. "0" string), otherwise it will be judged as unqualified.

[0044] Step 214: If the test piece number and the test item of the electronic control module test have a next element, the host computer sends the test piece number and the next element of the test item of the electronic control module test to the single-chip microcomputer.

[0045] In the embodiment of the present invention, if the test content 1 is qualified, a qualified mark (A1) is sent to the single chip microcomputer to perform the test of the test content 2.

[0046] Step 216: The single chip microcomputer obtains test data corresponding to the test content of the next element of the test piece number and the test item according to the test piece number and the test item.

[0047] Step 218: The host computer obtains the test data corresponding to the test item number sent by the single-chip computer and the test content of the next element of the test item.

[0048] Step 220: Process and judge the test data corresponding to the test content corresponding to the test piece number and the next element of the test item.

[0049] In the embodiment of the present invention, if the test of step 220 is qualified, step 214 is continued to be executed; if the test of step 220 is unqualified, step 222 is continued to be executed.

[0050] Step 222: The host computer sends the next test piece number and the first element of the test item of the electronic control module test to the single-chip microcomputer.

[0051] In the embodiment of the present invention, if the test content 1 fails, an unqualified mark (A0) is sent to the single-chip microcomputer to perform the next test content 1, and then the test content 2 and test content 3 are cleared, and the time at this time is recorded and stored in the test time, and so on until the array is judged to be empty, and then it is judged whether the current number of cycles is equal to the set number of cycles. If they are not equal, the next initialization (step 202) is entered, and if they are equal, the "end test" button can be pressed to save the data and exit the test. During the period, if the "pause test" button is pressed and the "key test" button is also pressed, the key test is entered until the key test is completed, and then the "restart test" needs to be pressed to enter the functional test until the functional test is completed, and finally the "end test" needs to be pressed to store the test results and the original data collected by the single-chip microcomputer.

[0052] In the embodiment of the present invention, the tester needs to set the number of tests before the test starts, for example, 10 times. In addition, the program also uses a shift register to store the current number of cycles, that is, the register will be +1 when the current test is completed. When the array is judged to be empty, it means that the current test has been completed. At this time, the register is increased by 1 until the value of the register is equal to 10 to stop the test, otherwise it will continue to the next round of testing.

[0053] Step 224: The single chip microcomputer obtains the test data corresponding to the test content of the first element of the next test piece number and the test item according to the next test piece number and the test item.

[0054] Step 226: The host computer obtains the next test piece number sent by the single-chip computer and the test data corresponding to the test content of the first element of the test item.

[0055] Step 228: Process and judge the test data corresponding to the test content corresponding to the next test piece number and the first element of the test item.

[0056] In the embodiment of the present invention, if the test of step 228 is qualified, the step of the host computer sending the test piece number and the next element of the test item of the electronic control module test to the single-chip microcomputer is continued; if the test of step 228 is unqualified, step 222 is continued.

[0057] In the embodiment of the present invention, the test method of the electronic control module includes the following three functions: 1. It can process discrete digital signals into high and low level signals, so as to detect the number of actions and duration of actions of the test piece. 2. It has a filtering function. 3. It has a nested double-loop automatic test function, an expandable user event function and a timing function.

[0058] The following is a detailed description of the processing process in which the host computer obtains the data sent by the single-chip microcomputer in step 208, 218 or 226.

[0059] Figure 3 A flowchart of a process for a host computer to obtain data sent by a single-chip microcomputer provided in an embodiment of the present invention, such as Figure 3 As shown, the processing process includes: S1. The host computer performs filtering processing on the discrete digital signal corresponding to the test content.

[0060] In the embodiment of the present invention, since the signals of the electronic control module will interfere with each other, the electronic control module with good hardware can shield the interference between the signals, but at the same time the cost will also increase. If the interference between the signals does not cause the load to act, it is acceptable, which can also reduce the cost. For example, when a certain signal is at a high level, the signal to be tested will also be pulled high. Since the pull-up time is ≤20ms (short time), the signal to be tested will not cause the load to act accordingly, and the test can be considered to have passed. If it is >20ms, it will not pass. Figure 4A This is a schematic diagram of the data uploaded from the microcontroller to the host computer. Figure 4B This is a schematic diagram of a high and low level string array. The data uploaded from the microcontroller to the host computer is as follows: Figure 4A As shown, the obtained high and low level string arrays are as follows Figure 4B As shown, the red box is the interference level.

[0061] In an embodiment of the present invention, when processing interfered data, two judgments should be made before the above step S4. The first judgment is to determine whether the element of the first string array is "0" or "1" (i.e., whether there is interference); the second judgment is to determine whether the interference time is ≤20ms (i.e., whether the interference is within an acceptable range). Figure 5A , 5B 5C is a schematic diagram of filtering a discrete digital signal corresponding to a test content according to an embodiment of the present invention, and the corresponding program code is as follows Figure 5A , 5B and 5C.

[0062] In the embodiment of the present invention, the period for collecting one sampling point is 2ms, and when the interference time is ≤20ms, the number of sampling points is ≤10. The duration of the high and low levels depends on the number of sampling points, and the number of actions depends on the number of high and low character strings (i.e., "1" character strings). If there are n actions, there should be 2n+1 high and low character string arrays.

[0063] In the embodiment of the present invention, for example, the host computer obtains the data sent by the single-chip microcomputer, which may include: 8 1 0 1 3 3 04 2 33 6 6 6 2 8 0 0 8 6 32 3 16 2996 3015 2987 2983 3014 2975 2996 3023 30433009 2975 2992 2990 2989 6 1 1 1 16 1 8 2 3 0 1 4 0 8 6.

[0064] In the embodiment of the present invention, as an optional solution, a value of the discrete digital signal greater than or equal to 200 is a high level, and a value less than 200 is a low level.

[0065] As another optional solution, the data of the initial conditions of test content 1, the anti-theft alarm and car search function of test content 2, and the remote control tailgate unlocking and releasing the anti-theft alarm of test content 3 are similar to the above “8 1 0 1 3 3 0 4 233 6 6 6 2 8 0 0 8 6 32 3 16 2996 3015 2987 2983 3014 2975 2996 3023 30433009 2975 2992 2990 2989 6 1 1 1 16 1 8 2 3 0 1 4 0 8 6", the difference is that for example, the initial condition requires the high level to last for 250ms, while the anti-theft alarm lasts for 450ms, or the initial condition requires the collected value to be lower than 50 as a low level, while the tailgate unlocking and releasing the anti-theft alarm is lower than 200 as a low level, or the anti-theft alarm must have 10 high and low level arrays and the tailgate unlocking and releasing the anti-theft alarm must have 20 times. The duration and number of changes of these high and low levels are all pre-designed test contents, and the specific values ​​can be set according to the actual situation.

[0066] S2. The host computer separates all sampling points into arrays of single elements, and compares them with a single-element array of the same dimension whose value is the first threshold, to obtain a single-element array of 0, 1 with the same dimension.

[0067] In the embodiment of the present invention, 0 represents a low level and 1 represents a high level.

[0068] In the embodiment of the present invention, the first threshold value can be set according to the actual situation of the hardware circuit. For example, the first threshold value may be 200.

[0069] Fig. 6A , 6B 6C is a schematic diagram of processing a discrete digital signal corresponding to a test content into a high and low level signal according to an embodiment of the present invention, Fig. 6A is the program code corresponding to step S2.

[0070] S3. The host computer integrates the single-element arrays of 0 and 1 into a string to generate a high and low level string array.

[0071] In the embodiment of the present invention, the single element arrays of 0 and 1 are integrated into a string, and then a letter or symbol is used to replace "1 0" and "0 1" ("#" is used in the embodiment of the present application), and then the string is split with "#" to obtain the high and low level string arrays. Figure 6B is the program code corresponding to step S3.

[0072] S4. The host computer calculates the number of 0s or 1s contained in the high and low level string arrays to detect the number of actions and duration of actions of the electronic control module.

[0073] In the embodiment of the present invention, the dimensions of the high and low level string arrays and the number of 0s or 1s contained in the arrays are calculated. A high level indicates an action, and a low level indicates no action. If a 3-dimensional array has only one group of high levels, it means there is only one action. If it is a 2n+1-dimensional array, there are n actions. If the duration of the high level is calculated, the second group of high level string elements needs to be converted into a single element array and then the dimension is calculated, and then multiplied by the sampling period to obtain the duration of the action. Figure 6C is the program code corresponding to step S4.

[0074] The embodiment of the present invention also has a nested double-loop automated testing function, an expandable user event function and a timing function.

[0075] ①It has nested double-loop automated testing function: From Table 1 or Figure 2 It can be seen that the entire test structure is completed by the outer loop (the first item to the last item) and the inner loop (test content 1 to test content 3 of each item) nested and alternating. However, if a test result in the inner loop fails, such as test result 2 fails, test content 3 will not be tested, or a test does not have test content 3 at all, it is necessary to jump to the outer loop for the next test.

[0076] Both the inner loop and the outer loop are implemented through the shift register, that is, the next test state is inserted into the first element of the test state array and the test state array is placed in the shift register. In this way, when the next test state is about to come, the first element in the array is extracted, and the system can identify the current test state. For example, after testing the test content of the selector label corresponding to test content 1, it will come to the selector label "test result 1". Figure 1 The test pass and fail results are "A1" and "A0". If it is "A1", the selector label corresponding to the test content 2 is assigned to the shift register. If it is "A0", the selector label of the next test item is assigned to the shift register. In this way, the system can automatically identify the next action direction and realize automation.

[0077] ②Extensible user event function; The five user events in the embodiment of the present invention can be placed in the "No Action" selector tag as an event structure. When performing a function test or a key test, a trigger condition is added to assign the "No Action" selector tag to the shift register, so that it can jump to the "No Action" state and wait for the user to press the corresponding button to execute the corresponding user demand. In this way, if there are more user events, the newly added user events can be added to the event structure, and then the corresponding trigger conditions can be added.

[0078] The following only lists the functional development of the "Pause Test" user event: if you want to do a key test before the functional test is completed, the user event at this time is "Pause Test". It is not necessary to monitor whether the "Pause Test" button is pressed in each state (selector label), because there is no requirement to seamlessly connect to the key test after the button is pressed. After the "Test Content 3" is completed, you can not directly enter the next test, but first write the "multi-column list box" and then "mark in red" the failed items, and then go to the next test, that is, each test must pass the "mark in red" selector label. The embodiment of the present invention monitors whether the "Pause Test" button is pressed and puts it in the "mark in red" selector label. If the "Pause Test" button is pressed, the "No Action" selector label is assigned to the shift register (if it is not pressed, the selector label for extracting the next test item is assigned to the shift register). In this way, after the button is pressed at any time, when the program reaches the "mark in red" selector label, it will recognize it and jump to the "No Action" selector label. After that, the user presses the "Key Test" button to enter the key test.

[0079] ③Timing function.

[0080] When testing, it is often necessary to calculate whether the time required for a certain test meets the test requirements. The following briefly introduces how to calculate the time required for the automatic relocking test content. Figure 7 A schematic diagram of calculating the time required for the test content (automatic relocking) provided in one embodiment of the present invention, such as Figure 7 As shown, when the program runs to the selector label "auto re-lock", we use whether the selector label stored in the shift register is equal to the string "auto re-lock" to determine whether the test has started. If they are equal, the timer is started. After the test is completed, the single-chip machine uploads the test data to the host computer. In the embodiment of the present invention, the host computer receives "&" sent by four single-chip computers, indicating that the data has been received, so another timer is started at this time, and the test time of the test content can be obtained by subtracting the time of the two timers.

[0081] In the technical solution provided by the embodiment of the present invention, in response to the start test instruction input by the user, the test data of the electronic control module test is obtained; the test piece number and the first element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test content of the test piece number and the first element of the test item according to the test piece number and the test item; the test data corresponding to the test content sent by the single-chip microcomputer is obtained; and the test data corresponding to the test content is processed and judged. In the technical solution provided by the embodiment of the present invention, the automated test of the electronic control module can be realized, the efficiency and accuracy of the electronic control module test can be improved, and the test cost can be reduced.

[0082] In the technical solution provided by the embodiment of the present invention, the electronic control modules control the action of the load through high and low levels, the number of high and low level changes to control the number of load actions and the duration of high and low levels to control the duration of load actions. The host computer test function of the embodiment of the present invention includes the above-mentioned test, so the host computer provided by the embodiment of the present invention can test all electronic control modules.

[0083] The technical solution provided in the embodiment of the present invention can be used to test the hardware function of an electronic control module whose signal interference shielding capability is not perfect but does not affect the performance.

[0084] An embodiment of the present invention provides a test system for an electronic control module. Figure 8 A schematic diagram of a test system for an electronic control module provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the system includes: a host computer 20, a single-chip microcomputer 10 and an electronic control module 30. The host computer 20 is connected to the single-chip microcomputer 10 through serial communication, and can be connected using a Universal Serial Bus (USB) to DuPont cable. The single-chip microcomputer 10 and the electronic control module 30 are connected through wireless communication and input / output (I / O) ports.

[0085] The host computer 20 is used to obtain the test data of the electronic control module test in response to the start test instruction input by the user; and send the test piece number and the first element of the test item of the electronic control module test to the single chip microcomputer.

[0086] The single chip computer 10 is used to obtain test data corresponding to the test content of the first element of the test item number and the test item according to the test item number and the test item.

[0087] The host computer 20 is used to obtain the test data corresponding to the test content sent by the single chip microcomputer; and process and judge the test data corresponding to the test content.

[0088] In an embodiment of the present invention, the host computer 20 is used to extract the first element of the test content and use the first element of the test content as the next test state; determine whether the test data corresponding to the test content is qualified; if it is determined that the test data corresponding to the test content is qualified, and the test piece number and test item of the electronic control module test have the next element, send the test piece number and the next element of the test item of the electronic control module test to the single-chip microcomputer 10.

[0089] The single chip computer 10 is used to obtain test data corresponding to the test content of the next element of the test piece number and the test item according to the test piece number and the test item.

[0090] The host computer 20 is used to obtain the test data corresponding to the test content of the next element of the test item and the test piece number sent by the single chip computer 10; and process and judge the test data corresponding to the test content of the next element of the test item and the test piece number.

[0091] In the embodiment of the present invention, if it is determined that the test data corresponding to the test content is unqualified, the host computer 20 is further configured to send the next test piece number and the first element of the test item of the electronic control module test to the single chip microcomputer 10 .

[0092] The single chip computer 10 is used to obtain the test data corresponding to the test content of the first element of the next test piece number and the test item according to the next test piece number and the test item.

[0093] The host computer 20 is used to obtain the test data corresponding to the test content of the next test piece number and the first element of the test item sent by the single chip computer 10; and process and judge the test data corresponding to the test content corresponding to the next test piece number and the first element of the test item.

[0094] In the embodiment of the present invention, the electronic control module test includes a function test and / or a key test.

[0095] In the embodiment of the present invention, the host computer 20 is used to process the discrete digital signal corresponding to the test content into high and low level signals to detect the number of actions and the duration of actions of the electronic control module 30 .

[0096] In the embodiment of the present invention, the host computer 20 is used to separate all sampling points into arrays of single elements, compare them with a single-element array of the same dimension whose value is the first threshold, and obtain a single-element array of 0 and 1 of the same dimension; integrate the single-element array of 0 and 1 into a string to generate a high and low level string array; calculate the number of 0 or 1 contained in the high and low level string arrays to detect the number of actions and the duration of the actions of the electronic control module 30.

[0097] In the embodiment of the present invention, the host computer 20 is used to filter the discrete digital signal corresponding to the test content, and process the discrete digital signal corresponding to the test content into high and low level signals.

[0098] In the technical solution provided by the embodiment of the present invention, in response to the start test instruction input by the user, the test data of the electronic control module test is obtained; the test piece number and the first element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test content of the test piece number and the first element of the test item according to the test piece number and the test item; the test data corresponding to the test content sent by the single-chip microcomputer is obtained; and the test data corresponding to the test content is processed and judged. In the technical solution provided by the embodiment of the present invention, the automated test of the electronic control module can be realized, the efficiency and accuracy of the electronic control module test can be improved, and the test cost can be reduced.

[0099] An embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the embodiment of the above-mentioned electronic control module testing method. For a specific description, please refer to the embodiment of the above-mentioned electronic control module testing method.

[0100] An embodiment of the present invention provides a host computer, including a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and when the program instructions are loaded and executed by the processor, the steps of the embodiment of the test method of the above-mentioned electronic control module are implemented. For a specific description, please refer to the embodiment of the test method of the above-mentioned electronic control module.

[0101] Fig. 9 A schematic diagram of a host computer provided by an embodiment of the present invention. Fig. 9 As shown, the host computer 20 of this embodiment includes: a processor 21, a memory 22, and a computer program 23 stored in the memory 22 and executable on the processor 21. When the computer program 23 is executed by the processor 21, the test method applied to the electronic control module in the embodiment is implemented. To avoid repetition, they are not described one by one here.

[0102] The host computer 20 includes, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that Fig. 9 It is only an example of the host computer 20 and does not constitute a limitation of the host computer 20. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the host computer may also include input and output devices, network access devices, buses, etc.

[0103] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0104] The memory 22 may be an internal storage unit of the host computer 20, such as a hard disk or memory of the host computer 20. The memory 22 may also be an external storage device of the host computer 20, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the host computer 20. Further, the memory 22 may also include both an internal storage unit of the host computer 20 and an external storage device. The memory 22 is used to store computer programs and other programs and data required by the host computer. The memory 22 may also be used to temporarily store data that has been output or is to be output.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0106] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0108] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0109] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for testing an electronic control module, characterized in that: include: In response to a start test instruction input by a user, acquiring test data of an electronic control module test; Sending the test piece number and the first element of the test item of the electronic control module test to the single-chip microcomputer, so that the single-chip microcomputer obtains test data corresponding to the test piece number and the test content of the first element of the test item according to the test piece number and the test item; Acquire test data corresponding to the test content sent by the single chip microcomputer; The test data corresponding to the test content is processed and judged.

2. The method according to claim 1, characterized in that The processing and judging of the test data corresponding to the test content includes: Extracting the first element of the test content, and using the first element of the test content as the next test state; Determine whether the test data corresponding to the test content is qualified; If it is determined that the test data corresponding to the test content is qualified, and the test piece number and the test item of the electronic control module test have a next element, the test piece number and the next element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test piece number and the test content of the next element of the test item according to the test piece number and the test item; Acquire the test data corresponding to the test item number sent by the single chip microcomputer and the test content of the next element of the test item; The test data corresponding to the test piece number and the test content of the next element of the test item are processed and judged.

3. The method according to claim 2, characterized in that Also includes: If it is determined that the test data corresponding to the test content is unqualified, the next test piece number and the first element of the test item of the electronic control module test are sent to the single-chip microcomputer, so that the single-chip microcomputer can obtain the test data corresponding to the test content of the next test piece number and the first element of the test item according to the next test piece number and the test item; Acquire the test data corresponding to the test content of the next test piece number and the first element of the test item sent by the single chip microcomputer; The test data corresponding to the test content of the next test piece number and the first element of the test item is processed and judged.

4. The method according to claim 1, characterized in that: The electronic control module test includes a function test and / or a key test.

5. The method according to claim 1, characterized in that The obtaining of the test data corresponding to the test content sent by the single chip microcomputer includes: The discrete digital signal corresponding to the test content is processed into high and low level signals to detect the number of actions and action duration of the electronic control module.

6. The method according to claim 5, characterized in that The step of processing the discrete digital signal corresponding to the test content into a high-level or low-level signal to detect the number of actions and the duration of actions of the electronic control module includes: Separate all sampling points into arrays of single elements, and compare them with a single-element array of the same dimension and the value of the first threshold, to obtain a single-element array of 0, 1 of the same dimension; Integrate the single-element arrays of 0 and 1 into a string to generate high and low level string arrays; The number of 0s or 1s contained in the high and low level character string arrays is calculated to detect the number of actions and duration of actions of the electronic control module.

7. The method according to claim 5, characterized in that Also includes: The discrete digital signal corresponding to the test content is filtered and processed into high and low level signals.

8. A test system for an electronic control module, characterized in that: include: A host computer, a single-chip microcomputer and an electronic control module, wherein the host computer is connected to the single-chip microcomputer, and the single-chip microcomputer is connected to the electronic control module; The host computer is used to obtain test data of the electronic control module test in response to a start test instruction input by a user; and send the test piece number and the first element of the test item of the electronic control module test to the single chip microcomputer; The single chip computer is used to obtain test data corresponding to the test content of the first element of the test item and the test item according to the test item number and the test item; The host computer is used to obtain the test data corresponding to the test content sent by the single-chip computer; and process and judge the test data corresponding to the test content.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the test method for the electronic control module according to any one of claims 1 to 7.

10. A host computer, comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, the steps of the electronic control module testing method according to any one of claims 1 to 7 are implemented.