A method, device, equipment and storage medium for logical display between program variables
By building an ECU control logic simulation model in the simulation software interface and displaying the running values of ECU program variables in real time, the problem of unintuitive measurement of ECU program variables in the existing technology is solved, and the efficiency of abnormal situation detection and testing is improved.
Patent Information
- Application Number
- CN202210226704.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2042-03-09
AI Technical Summary
The prior art cannot intuitively demonstrate control strategies in ECU program variable measurement, resulting in the test process being not intuitive enough and the efficiency of abnormal situation detection is inefficient.
By building an ECU control logic simulation model in the simulation software interface, generating the ECU program to be tested, and determining the set of variables to be displayed based on the variable description file and the simulation model, setting a running value display box in the simulation model, and collecting and displaying the running values of the variables in real time.
Make the ECU program testing process more intuitive, improve the efficiency of abnormal situations, and thus improve the testing efficiency.
Smart Images

Figure CN114638096B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation testing technologies, and particularly to a method, apparatus, device, and storage medium for logically displaying program variables. Background Art
[0002] The measurement of an Electronic Control Unit (ECU) program usually uses specialized measurement tools. For example, CANape or INCA commonly used in this industry.
[0003] In the prior art, CANape or INCA can measure the running values of variables in the ECU program in real time to monitor the running conditions of the variables in the ECU program. However, when CANape or INCA detects an abnormal situation, it can only display one or more variables and running values associated with the abnormal situation in its monitoring interface, and cannot display the control strategies associated with the above one or more variables. Since the purpose of developers or testers to measure ECU program variables is to find out whether there are control abnormal situations in the ECU program, and when a control abnormal situation is detected, based on the control strategies associated with the control abnormal situation, the existing ECU program is adjusted to obtain an ECU program with the control effect meeting the expectations.
[0004] Then, in the prior art, when using the above CANape or INCA to measure ECU program variables and an abnormal situation is detected, developers or testers still need to consult the associated control strategies based on the above one or more variables for offline analysis, which not only makes the testing process less intuitive but also increases the workload of troubleshooting abnormal situations. Summary of the Invention
[0005] Embodiments of this application provide a method, apparatus, device, and storage medium for logically displaying program variables to make the ECU program testing process more intuitive and improve the troubleshooting efficiency of abnormal situations.
[0006] The specific technical solutions provided by the embodiments of this application are as follows:
[0007] In a first aspect, embodiments of this application provide a method for logically displaying ECU program variables, including:
[0008] Generating a to-be-tested ECU program based on an ECU control logic simulation model built in a simulation software interface, where the ECU control logic simulation model is composed of at least two graphic modules connected according to a control logic;
[0009] Determine the set of variables to be displayed for the ECU program to be tested based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, where the variable description file includes the description information of each variable included in the ECU program to be tested;
[0010] Based on the set of variables to be displayed, within the preset range corresponding to the graphic module included in the ECU control logic simulation model, set the running value display boxes corresponding to the variables to be displayed;
[0011] In response to the start test instruction, continuously collect the running values of each variable included in the set of variables to be displayed, and display the running values in the running value display boxes corresponding to the variables to be displayed.
[0012] In the above method, by setting the running value display boxes for each variable included in the set of variables to be displayed, the running values of each variable obtained by the ECU controller when running the ECU program to be tested can be intuitively and dynamically displayed in the ECU control logic simulation model, so that developers or testers can more intuitively view the test process through the ECU control logic simulation model as the client interface, and when it is monitored that the running value of a certain variable or certain variables is abnormal, the corresponding control logic can be intuitively viewed in the ECU control logic simulation model to quickly find out the cause of the abnormal problem, improve the troubleshooting efficiency, and thus improve the test efficiency.
[0013] Optionally, the determining the set of variables to be displayed for the ECU program to be tested based on the variable description file of the ECU program to be tested and the ECU control logic simulation model includes:
[0014] Read each variable from the variable description file of the ECU program to be tested, and form the first variable set with the each variable;
[0015] Obtain each variable from the ECU control logic simulation model, and form the second variable set with the each variable;
[0016] Determine the intersection of the first variable set and the second variable set, and use the intersection as the set of variables to be displayed.
[0017] In the above method, since the ECU control logic simulation model is drawn according to the control logic, through the above screening operation, the set of variables to be displayed can be accurately determined, so as to accurately display the running values of the variables to be displayed in the ECU control logic simulation model, and then accurately and intuitively reflect the test process, so that developers or testers can accurately make judgments on the ECU program to be tested, improving the test efficiency.
[0018] Optionally, within a preset range corresponding to the graphic module included in the ECU control logic simulation model based on the set of variables to be displayed, set a running value display box for the variables to be displayed, including:
[0019] In the ECU control logic simulation model, set a variable value label for each variable to be displayed included in the set of variables to be displayed, where the variable value labels corresponding to different variables to be displayed are different;
[0020] Use the area where the variable value label is located as the running value display box for the corresponding variable to be displayed.
[0021] The above method can use the default label in the Simulink simulation software - the Simulink.Annotation label to add a running value display box for each variable to be displayed, so as to intuitively and dynamically display the running values of each variable to be displayed in the ECU control logic simulation model, thereby improving the test efficiency.
[0022] Optionally, after generating the ECU program to be tested, it further includes:
[0023] Input the ECU program to be tested into the ECU controller, so that the ECU controller runs the ECU program to be tested to obtain the running values of each variable included in the ECU program to be tested;
[0024] The continuously collecting the running values of each variable to be displayed included in the set of variables to be displayed includes:
[0025] Continuously communicate with the ECU controller through the CAN adapter and communication protocol to obtain the running values of each variable to be displayed included in the set of variables to be displayed.
[0026] The above method, through the CAN adapter and communication protocol, can real-time the running values of each variable obtained by the ECU controller running the ECU program to be tested, so as to facilitate directly and dynamically displaying the obtained running values in the ECU control logic simulation model subsequently, making the test process more intuitive and the troubleshooting of abnormal situations more convenient.
[0027] Optionally, the method further includes:
[0028] If there are already displayed running values in the running value display box, after obtaining the new running value of the corresponding variable to be displayed, update the already displayed running value based on the new running value.
[0029] The above method can intuitively and dynamically display the running values of each variable obtained by the ECU controller running the ECU program to be tested in the ECU control logic simulation model in real time. In this way, the testing process becomes more intuitive, facilitating the improvement of testing efficiency.
[0030] In a second aspect, an embodiment of the present application provides a device for logically displaying variables between ECU programs, including:
[0031] A generation module, configured to generate an ECU program to be tested based on an ECU control logic simulation model built in a simulation software interface, where the ECU control logic simulation model is composed of at least two graphic modules connected according to a control logic;
[0032] A determination module, configured to determine a set of variables to be displayed in the ECU program to be tested based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, where the variable description file includes description information of each variable included in the ECU program to be tested;
[0033] A setting module, configured to set a running value display box corresponding to the variable to be displayed within a preset range corresponding to the graphic module included in the ECU control logic simulation model based on the set of variables to be displayed;
[0034] An acquisition and display module, configured to continuously acquire the running values of each variable included in the set of variables to be displayed in response to a start test instruction, and display the running values in the running value display box corresponding to the variable to be displayed.
[0035] Optionally, for determining the set of variables to be displayed in the ECU program to be tested based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, the determination module is configured to:
[0036] Read each variable from the variable description file of the ECU program to be tested, and form the each variable into a first variable set;
[0037] Obtain each variable from the ECU control logic simulation model, and form the each variable into a second variable set;
[0038] Determine the intersection of the first variable set and the second variable set, and use the intersection as the set of variables to be displayed.
[0039] Optionally, for setting the running value display box corresponding to the variable to be displayed within a preset range corresponding to the graphic module included in the ECU control logic simulation model based on the set of variables to be displayed, the setting module is configured to:
[0040] In the ECU control logic simulation model, variable value labels are set for each variable to be displayed included in the set of variables to be displayed, where the variable value labels corresponding to different variables to be displayed are different;
[0041] The area where the variable value label is located is used as the running value display box for the corresponding variable to be displayed.
[0042] Optionally, after generating the ECU program to be tested, the generating module is further configured to:
[0043] Input the ECU program to be tested into the ECU controller, so that the ECU controller runs the ECU program to be tested, and obtain the running values of each variable included in the ECU program to be tested;
[0044] Continuously collect the running values of each variable to be displayed included in the set of variables to be displayed, and the collecting and displaying module is configured to:
[0045] Continuously communicate with the ECU controller through the CAN adapter and the communication protocol to obtain the running values of each variable to be displayed included in the set of variables to be displayed.
[0046] Optionally, the collecting and displaying module is further configured to:
[0047] If there are already displayed running values in the running value display box, after obtaining the new running value of the corresponding variable to be displayed, update the already displayed running value based on the new running value.
[0048] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0049] A memory for storing computer programs or instructions;
[0050] A processor for executing the computer programs or instructions in the memory, so that the method according to any one of the first aspects is executed.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of the method according to any one of the first aspects are implemented.
[0052] In addition, the technical effects brought by any implementation manner in the second aspect to the fourth aspect can refer to the technical effects brought by different implementation manners in the first aspect, which will not be elaborated here. Description of the Drawings
[0053] Figure 1 It is a schematic diagram of an application scenario in an embodiment of the present application;
[0054] Figure 2 It is a schematic flowchart of a method for logically displaying ECU program variables in an embodiment of the present application;
[0055] Figure 3 It is a schematic diagram of an application scenario for logically displaying ECU program variables in an embodiment of the present application;
[0056] Figure 4 It is a schematic flowchart of a process for determining a set of variables to be displayed and a running value display box in an embodiment of the present application;
[0057] Figure 5 It is a schematic flowchart of a process for implementing data acquisition and display functions in an embodiment of the present application;
[0058] Figure 6 It is a schematic diagram of the logical architecture for logically displaying ECU program variables in an embodiment of the present application;
[0059] Figure 7 It is a schematic diagram of the physical architecture of an electronic device in an embodiment of the present application. Detailed implementation manners
[0060] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0061] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here.
[0062] In order to solve the problems that the testing process in the prior art is not intuitive enough and the troubleshooting efficiency for abnormal situations is low, in the embodiments of the present application, based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, a set of variables to be displayed for the ECU program to be tested is determined. Among them, the ECU program to be tested is generated based on the ECU control logic simulation model built in the simulation software interface. The ECU control logic simulation model is composed of at least two graphic modules connected according to the control logic. The variable description file includes the description information of each variable included in the ECU program to be tested; then, based on the set of variables to be displayed, within the preset range corresponding to the graphic modules included in the ECU control logic simulation model, value display frames corresponding to the variables to be displayed are set; then, in response to the start testing instruction, the running values of each variable to be displayed included in the set of variables to be displayed are continuously collected, and the running values are displayed in the value display frames corresponding to the variables to be displayed; in this way, the real-time running values of the variables in the ECU program are dynamically displayed in the ECU control logic simulation model, making the testing process more intuitive. Thus, when it is determined that the running value of a certain variable or certain variables is abnormal, the control logic between the above-mentioned certain variable or certain variables can be intuitively viewed, thereby improving the troubleshooting efficiency for abnormal situations.
[0063] Refer to Figure 1 As shown, it is a schematic diagram of the application scenario in the embodiments of the present application. The schematic diagram of the application scenario includes an ECU controller, a CAN adapter, and a terminal device; among them,
[0064] The ECU controller is the object to be tested and is used to run the ECU program to be tested;
[0065] The CAN adapter is an interface converter and is used for communication between the ECU controller and the terminal device;
[0066] The terminal device is used to store the ECU control logic simulation model matching the program to be tested, communicate with the ECU controller through the CAN adapter, and display the real-time running value in the ECU controller in the ECU control logic simulation model in real time.
[0067] In the embodiments of the present application, the above-mentioned CAN adapter can be a third-party adapter such as ES581 or CANapeXL; the above-mentioned ECU control logic simulation model can be a simulink model built in the Simulink simulation software interface.
[0068] It should be noted that the Simulink simulation software is a visual simulation tool in MATLAB. It is a block diagram design environment based on MATLAB and is a software package for realizing dynamic system modeling, simulation, and comprehensive analysis. It is widely used in the modeling and simulation of linear systems, non-linear systems, digital control, and digital signal processing. In this Simulink environment, there is no need to write a large number of programs, and complex systems can be constructed only through simple and intuitive mouse operations.
[0069] The following further elaborates on the preferred embodiments of the present application in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. And without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0070] Refer to Figure 2 As shown, a method for logically displaying ECU program variables provided by an embodiment of the present application has the following specific process:
[0071] Step 200: Generate a to-be-tested ECU program based on an ECU control logic simulation model built in the simulation software interface. The ECU control logic simulation model is composed of at least two graphic modules connected according to the control logic.
[0072] In an embodiment of the present application, a developer or tester builds an ECU control logic simulation model in the simulation software interface. Then, the terminal device generates a corresponding to-be-tested ECU program based on the ECU control logic simulation model built by the developer or tester in the simulation software interface.
[0073] In an embodiment of the present application, after step 200 is executed, the terminal device inputs the to-be-tested ECU program into the ECU controller so that the ECU controller runs the to-be-tested ECU program to obtain the running values of each variable included in the to-be-tested ECU program.
[0074] In an embodiment of the present application, a developer or tester can obtain the above-mentioned ECU control logic simulation model in the following manner: First, based on the control logic, select the required corresponding graphic modules from the module library of the Simulink simulation software, and complete the modeling based on the selected graphic modules, thereby obtaining the above-mentioned ECU control logic simulation model.
[0075] Optionally, in an embodiment of the present application, the terminal device can also build the above-mentioned ECU control logic simulation model based on a script file written by a developer or tester. The specific manner of specifically building the ECU control logic simulation model is not limited.
[0076] Step 210: Based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, determine the set of variables to be displayed in the ECU program to be tested. This variable description file includes the description information of each variable included in the ECU program to be tested.
[0077] In the embodiments of the present application, when performing Step 210, specifically, by performing the following operations, determine the set of variables to be displayed in the ECU program to be tested:
[0078] Operation 1: Read each variable from the variable description file of the ECU program to be tested, and form the first variable set with each variable.
[0079] Under the prior art, the simulink simulation software can generate a corresponding code program based on the simulink model in the simulation software interface. At the same time, in actual applications, when generating the code program, a variable description file matching the generated code program can be generated, for example, an A2L file.
[0080] Then, in the embodiments of the present application, when performing Operation 1, read each variable from the variable description file matching the ECU program to be tested, and form the first variable set with each read variable.
[0081] Operation 2: Obtain each variable from the ECU control logic simulation model, and form the second variable set with each variable.
[0082] In the embodiments of the present application, when performing Operation 2, obtain each variable from the ECU control logic simulation model, and then form the second variable set with each obtained variable.
[0083] Operation 3: Determine the intersection of the first variable set and the second variable set, and use the intersection as the set of variables to be displayed.
[0084] In the embodiments of the present application, when performing Operation 3, compare the first variable set and the second variable set obtained by performing Operation 1 and Operation 2 respectively, so as to determine the intersection of the above first variable set and the second variable set, and use this intersection as the set of variables to be displayed. In this way, it can be ensured that each displayed variable is included in both the ECU control logic simulation model and the ECU program to be tested, thereby ensuring the accuracy and effectiveness of the running values of the variables displayed during subsequent testing.
[0085] It should be noted that in the embodiments of the present application, the above variables refer to physical quantities that are dynamically changing and can be measured.
[0086] Step 220: Based on the set of variables to be displayed, within the preset range corresponding to the graphic module included in the ECU control logic simulation model, set the running value display box for the corresponding variables to be displayed.
[0087] In the embodiment of the present application, by executing Step 220, a running display box is set for each variable to be displayed included in the set of variables to be displayed determined in Step 210, so that the running values of each variable to be displayed obtained subsequently can be displayed near the corresponding variable to be displayed, making the testing process more intuitive.
[0088] In practical applications, in the ECU control logic simulation model, variable value labels can be set for each variable to be displayed included in the set of variables to be displayed, where the variable value labels corresponding to different variables to be displayed are different; then, the area where the variable value labels are located is used as the running value display box for the corresponding variables to be displayed.
[0089] In the embodiment of the present application, the above-mentioned running value display box can be implemented by adding tags such as Simulink.Annotation in Simulink for each variable to be displayed included in the set of variables to be displayed, or can be obtained by adding annotations in any form for each variable to be displayed; the specific form of the above-mentioned running value display box is not limited to the above form, and no specific limitation is made here.
[0090] Step 230: In response to the start test instruction, continuously collect the running values of each variable to be displayed included in the set of variables to be displayed, and display the running values in the running value display box corresponding to the variable to be displayed.
[0091] In the embodiment of the present application, after executing Step 220, the ECU program to be tested can be started for testing. Specifically, when executing Step 230, in response to the start test instruction, automatically retrieve each variable to be displayed for which the running value display box has been set, continuously communicate with the ECU controller through the CAN adapter and communication protocol, and obtain the running values of each variable to be displayed included in the set of variables to be displayed; then, display each obtained running value in the running value display box corresponding to the variable to be displayed.
[0092] Optionally, in the embodiment of the present application, when executing Step 230, if there is a displayed running value in the running value display box, after obtaining the new running value of the corresponding variable to be displayed, update the displayed running value based on the new running value. In this way, the real-time running values of each variable to be displayed obtained by the ECU controller running the ECU program to be tested can be timely displayed in the ECU control logic simulation model, thereby making the testing process more intuitive, facilitating the troubleshooting of abnormal situations, and further improving the testing efficiency.
[0093] It should be noted that in the embodiments of the present application, before testing, the terminal device needs to perform a communication handshake negotiation with the ECU controller to determine the communication protocol between the terminal device and the ECU controller. Then, when step 230 is executed, through the CAN adapter and the pre-determined communication protocol, smooth communication between the terminal device and the ECU controller can be achieved.
[0094] In the embodiments of the present application, when step 230 is executed, it is determined whether a stop test instruction is received. If so, the test is stopped; otherwise, the running values of each variable to be displayed included in the variable set to be displayed are continuously collected, and the running values are displayed in the running value display box corresponding to the variable to be displayed.
[0095] For example, refer to Figure 3 As shown, take the testing of the ECU program to be tested between the terminal device and the ECU controller as an example.
[0096] Suppose a developer or tester builds an ECU control logic simulation model in the simulink simulation software of the terminal device.
[0097] Then, based on this ECU control logic simulation model, the terminal device generates the ECU program to be tested.
[0098] Then, in the ECU control logic simulation model, the terminal device sets the running value display box for each variable to be displayed included in the variable set to be displayed.
[0099] In specific implementation, refer to Figure 4 As shown, the terminal device realizes the functions of determining the variable set to be displayed and setting the running value display box for each variable to be displayed included in the variable set to be displayed in the ECU control logic simulation model by executing the following steps:
[0100] Step 400: Read each variable from the variable description file of the ECU program to be tested, and form the first variable set with each variable.
[0101] Step 410: Obtain each variable from the ECU control logic simulation model, and form the second variable set with each variable.
[0102] Step 420: Determine the intersection of the first variable set and the second variable set, and use the intersection as the variable set to be displayed.
[0103] Step 430: Based on the variable set to be displayed, set the running value display box for the corresponding variable to be displayed within the preset range corresponding to the graphic module included in the ECU control logic simulation model.
[0104] In the embodiment of the present application, after obtaining the set of variables to be displayed in step 420, when performing step 430, the function of adding labels in the Simulink simulation software can be used to add running value display boxes for each variable to be displayed.
[0105] Assume that the running value display box added for each display variable is a "Simulink.Annotation" label. Then, the area where the "Simulink.Annotation" label of each variable to be displayed is located is used as the running value display box corresponding to the variable to be displayed.
[0106] Also assume that the developer or tester clicks the start test button in the control interface of the terminal device.
[0107] Then, in the embodiment of the present application, referring to Figure 5 as shown, the terminal device realizes the data acquisition and display functions by executing the following steps:
[0108] Step 500: Respond to the start test instruction and retrieve the "Simulink.Annotation" label of each variable to be displayed included in the set of variables to be displayed.
[0109] Step 510: Continuously collect the running values of each variable to be displayed included in the set of variables to be displayed through the CAN adapter and the communication protocol.
[0110] Step 520: Display the running value in the "Simulink.Annotation" label corresponding to the variable to be displayed.
[0111] In the embodiment of the present application, when performing step 520, if there is a displayed running value in the running value display box, after obtaining the new running value of the corresponding variable to be displayed in step 510, update the displayed running value based on the new running value.
[0112] Step 530: Determine whether a stop test instruction is received. If so, execute step 540; otherwise, execute step 510.
[0113] Step 540: Respond to the stop test instruction and end the process.
[0114] In this way, the running values of each variable obtained by the ECU controller running the ECU program to be tested can be directly and dynamically displayed in the ECU control logic simulation model in real time. When it is detected that the running value of a certain variable or some variables is abnormal, the corresponding control logic can be intuitively viewed in the ECU control logic simulation model, and the cause of the abnormal problem can be quickly identified, thereby improving the troubleshooting efficiency and further improving the test efficiency.
[0115] Based on the same inventive concept, referring to Figure 6As shown in the figure, an ECU program variable logic display device is provided in an embodiment of the present application, including:
[0116] A generation module, configured to generate a to-be-tested ECU program based on an ECU control logic simulation model built in a simulation software interface, where the ECU control logic simulation model is composed of at least two graphic modules connected according to a control logic;
[0117] A determination module, configured to determine a set of variables to be displayed in the to-be-tested ECU program based on a variable description file of the to-be-tested ECU program and the ECU control logic simulation model, where the variable description file includes description information of each variable included in the to-be-tested ECU program;
[0118] A setting module, configured to set a running value display box corresponding to a variable to be displayed within a preset range corresponding to a graphic module included in the ECU control logic simulation model based on the set of variables to be displayed;
[0119] An acquisition and display module, configured to continuously acquire the running value of each variable to be displayed included in the set of variables to be displayed in response to a start test instruction, and display the running value in the running value display box corresponding to the variable to be displayed.
[0120] Optionally, for determining the set of variables to be displayed in the to-be-tested ECU program based on the variable description file of the to-be-tested ECU program and the ECU control logic simulation model, the determination module is configured to:
[0121] Read each variable from the variable description file of the to-be-tested ECU program, and form the each variable into a first variable set;
[0122] Obtain each variable from the ECU control logic simulation model, and form the each variable into a second variable set;
[0123] Determine the intersection of the first variable set and the second variable set, and use the intersection as the set of variables to be displayed.
[0124] Optionally, for setting the running value display box corresponding to the variable to be displayed within the preset range corresponding to the graphic module included in the ECU control logic simulation model based on the set of variables to be displayed, the setting module is configured to:
[0125] Set a variable value label for each variable to be displayed included in the set of variables to be displayed in the ECU control logic simulation model, where different variable value labels correspond to different variables to be displayed;
[0126] Use the area where the variable value label is located as the running value display box corresponding to the variable to be displayed.
[0127] Optionally, after generating the ECU program to be tested, the generating module is further configured to:
[0128] Input the ECU program to be tested into the ECU controller, so that the ECU controller runs the ECU program to be tested to obtain the running values of each variable included in the ECU program to be tested;
[0129] Continuously collect the running values of each variable to be displayed included in the set of variables to be displayed, and the collecting and displaying module is configured to:
[0130] Continuously communicate with the ECU controller through the CAN adapter and the communication protocol to obtain the running values of each variable to be displayed included in the set of variables to be displayed.
[0131] Optionally, the collecting and displaying module is further configured to:
[0132] If there are already displayed running values in the running value display box, after obtaining the new running value of the corresponding variable to be displayed, update the already displayed running value based on the new running value.
[0133] Refer to Figure 7 As shown, an electronic device is provided in an embodiment of the present application, including:
[0134] A memory for storing computer programs or instructions;
[0135] A processor for executing the computer programs or instructions in the memory, so that any one of the methods executed by the logical display device between ECU program variables in the above-mentioned various embodiments is executed.
[0136] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of any one of the methods executed by the logical display device between ECU program variables in the above-mentioned various embodiments are implemented.
[0137] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to this application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.
[0139] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.
[0141] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.
Claims
1. A method for logical display between ECU program variables, characterized in that: include: Generate an ECU program to be tested based on an ECU control logic simulation model built in a simulation software interface, wherein the ECU control logic simulation model is composed of at least two graphic modules connected according to the control logic; Based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, identical variables are screened to determine a set of variables to be displayed of the ECU program to be tested, wherein the variable description file includes description information of each variable included in the ECU program to be tested; In the ECU control logic simulation model, using the default label in the simulation software, setting a variable value label for each variable to be displayed included in the set of variables to be displayed, and using the area where each variable value label is located as a running value display box corresponding to the variable to be displayed, wherein different variables to be displayed have different corresponding variable value labels; In response to the start test instruction, the running value of each variable to be displayed included in the set of variables to be displayed is continuously collected, and the running value is displayed in the running value display box corresponding to the variable to be displayed, so as to present the logic between variables through the displayed running value.
2. The method according to claim 1, characterized in that The method of screening the same variables based on the variable description file of the ECU program to be tested and the ECU control logic simulation model to determine the set of variables to be displayed of the ECU program to be tested includes: Reading various variables from a variable description file of the ECU program to be tested, and forming the various variables into a first variable set; Acquire various variables from the ECU control logic simulation model, and form the various variables into a second variable set; An intersection of the first variable set and the second variable set is determined, and the intersection is used as the variable set to be displayed.
3. The method according to claim 1 or 2, characterized in that After generating the ECU program to be tested, the method further includes: Inputting the ECU program to be tested into an ECU controller so that the ECU controller runs the ECU program to be tested and obtains the running values of various variables included in the ECU program to be tested; The continuously collecting the running value of each variable to be displayed included in the set of variables to be displayed includes: Continuously communicate with the ECU controller through the CAN adapter and the communication protocol to obtain the running value of each variable to be displayed included in the set of variables to be displayed.
4. The method according to claim 3, characterized in that The method further comprises: If there is an operating value that has been displayed in the operating value display box, after obtaining a new operating value of the corresponding variable to be displayed, the operating value that has been displayed is updated based on the new operating value.
5. A logical display device between ECU program variables, characterized in that: include: A generation module, used to generate an ECU program to be tested based on an ECU control logic simulation model built in a simulation software interface, wherein the ECU control logic simulation model is composed of at least two graphic modules connected according to control logic; A determination module, configured to screen identical variables based on a variable description file of the ECU program to be tested and the ECU control logic simulation model, and determine a set of variables to be displayed of the ECU program to be tested, wherein the variable description file includes description information of each variable included in the ECU program to be tested; A setting module is used to set a variable value label for each variable to be displayed included in the set of variables to be displayed in the ECU control logic simulation model by using a default label in the simulation software, and use the area where each variable value label is located as a running value display box corresponding to the variable to be displayed, wherein different variables to be displayed have different corresponding variable value labels; The collection and display module is used to respond to the start test instruction, continuously collect the operating value of each variable to be displayed included in the set of variables to be displayed, and display the operating value in the operating value display box corresponding to the variable to be displayed, so as to present the logical relationship between the variables to be displayed through the displayed operating values.
6. The device according to claim 5, characterized in that Based on the variable description file of the ECU program to be tested and the ECU control logic simulation model, the same variables are screened to determine the set of variables to be displayed of the ECU program to be tested, and the determination module is used to: Reading various variables from a variable description file of the ECU program to be tested, and forming the various variables into a first variable set; Acquire various variables from the ECU control logic simulation model, and form the various variables into a second variable set; An intersection of the first variable set and the second variable set is determined, and the intersection is used as the variable set to be displayed.
7. An electronic device, characterized in that: include: Memory, used to store computer programs or instructions; A processor, configured to execute the computer program or instructions in the memory so that the method according to any one of claims 1 to 4 is executed.
8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Data presentation method, device, storage medium and processor
CN109215095A
Testing system, vehicle simulation device, testing device and testing method
CN113168370A
Data measurement method and device for electronic control unit
CN113254479A