Industrial ECU communication method and device and readable storage medium

By switching node modes in industrial ECU communication and modifying parameters, the problems of insufficient communication delay and response time in the prior art are solved, more efficient data exchange and real-time control are achieved, and the performance and reliability of industrial automation systems are improved.

CN119882556APending Publication Date: 2025-04-25SHENZHEN SILICON MOUNTAIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510022603.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is difficult to meet the communication needs of higher accuracy and shorter response times in industrial automation, especially in real-time and dynamic allocation of communication loads.

Method used

After the ECU is added to the bus, the upper computer switches the node mode of the ECU, including the pre-operation mode and the operation mode. In these modes, the parameters of the ECU are modified, the parameters are adjusted using standard data frames, and communication is carried out through CAN packets.

Benefits of technology

Real-time acquisition of business information is realized, data calculation efficiency is improved through streaming calculation, data exchange efficiency between ECUs and overall system response speed is significantly improved, and performance and reliability of industrial automation control systems are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119882556A_ABST
    Figure CN119882556A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial ECU communication method and device and a readable storage medium, and the method comprises the steps: carrying out the switching control of a node mode of an ECU through an upper computer after the ECU is added into a bus, and the node mode of the EUC comprises a pre-operation mode and an operation mode; and when the node mode of the ECU is the pre-operation mode or the operation mode, modifying parameters of the ECU. According to the method and the device, a communication mechanism is optimized on the basis of a CANopen protocol, so that high requirements on communication delay, data precision and system reliability in industrial automation are better met. According to the improved scheme, the data exchange efficiency between the ECUs and the response speed of the whole system can be remarkably improved, and the performance and reliability of the industrial automatic control system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an industrial ECU communication method, equipment and a readable storage medium. Background Art

[0002] In modern industrial and automation control systems, the Electronic Control Unit (ECU) plays a vital role. ECU is an embedded computer specifically used to monitor and control electrical systems. It can receive data from multiple sensors, process information and send control signals to actuators to achieve precise control of the system. In various application scenarios, ECU is widely used in automobiles, industrial equipment and other automation control systems. Its functions include real-time monitoring, fault detection, system optimization, etc. to improve the reliability and performance of the overall system.

[0003] In order to enable multiple ECU devices to work together efficiently, it is usually necessary to implement an efficient and reliable communication method in the system. Controller Area Network (CAN) is a common fieldbus communication standard that is widely used in the industrial and automotive industries. The CAN protocol adopts a multi-master architecture, supports real-time data transmission, has high anti-interference and fault tolerance capabilities, and can provide high-reliability communication in harsh environments. CAN communication connects each node through a twisted pair transmission medium, which can effectively meet the data exchange needs between various ECUs.

[0004] Existing technologies usually rely on the communication management of the standard CANopen protocol. This approach lacks optimization for specific real-time scenarios, dynamic distribution of communication loads, and other scenarios, and is difficult to fully meet the requirements of higher precision and shorter response time in industrial automation. Summary of the invention

[0005] The main purpose of the present invention is to provide an industrial ECU communication method, device and readable storage medium, aiming to solve the above technical problems.

[0006] To achieve the above object, an industrial ECU communication method proposed by the present invention includes:

[0007] After the ECU joins the bus, the host computer switches and controls the node mode of the ECU, and the node mode of the EUC includes a pre-operation mode and an operation mode;

[0008] When the node mode of the ECU is a pre-operation mode or an operation mode, the parameters of the ECU are modified.

[0009] In one embodiment, when the node mode of the ECU is a pre-operation mode or an operation mode, the step of modifying the parameters of the ECU includes:

[0010] Retrieve the standard data frame of the host computer and transmit it to the ECU;

[0011] The parameters of the ECU are modified according to the standard data frame, and the standard data frame has a plurality of sequentially arranged byte codes.

[0012] In one embodiment, the method for modifying the parameters of the ECU according to the standard data frame includes:

[0013] Get the first bytecode to be executed;

[0014] Retrieving a two-bit bytecode and a three-bit bytecode according to the execution operation matched by the first bytecode, wherein the two-bit bytecode and the three-bit bytecode contain an index corresponding to each read and write data operation during the execution of the first bytecode;

[0015] And according to the execution operation determined by the first bytecode, the commands in the first bytecode are executed in sequence.

[0016] In one embodiment, the step of sequentially executing the commands in the first bytecode according to the execution operation determined by the first bytecode comprises:

[0017] Determine the index corresponding to the read / write data matched by the current instruction according to the meaning of the current instruction and match it with the two-bit byte code or the three-bit byte code;

[0018] Modify the parameters of the ECU according to the matched read and write data.

[0019] In one embodiment, after the step of modifying the parameters of the ECU when the node mode of the ECU is the pre-operation mode or the operation mode, the method further includes:

[0020] After the ECU parameters are modified, a CAN message is sent through the receiving node.

[0021] In one embodiment, the online message is sent when the node mode of the ECU is the initialization mode.

[0022] In one embodiment, the parameter synchronization signal is monitored when the node mode of the ECU is the operation mode.

[0023] In addition, to achieve the above-mentioned purpose, the present invention also provides an industrial ECU communication method, which includes: a memory, a processor, and an industrial ECU communication program stored in the memory and executable on the processor, and when the industrial ECU communication program is executed by the processor, the steps of the industrial ECU communication method as described above are implemented.

[0024] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which an industrial ECU communication program is stored, and when the industrial ECU communication program is executed by a processor, the steps of the industrial ECU communication method described above are implemented.

[0025] Beneficial effects that can be achieved by the present invention: An industrial ECU communication method proposed in an embodiment of the present invention obtains business information in real time; collects data sources in the business information according to business scenarios; performs streaming calculations on the data of the data sources and outputs the calculated results. Through real-time churn calculations, the changing state of data can be perceived in real time, which can greatly improve the calculation efficiency of data when the business changes.

[0026] In the technical solution of the present invention, the communication mechanism is optimized based on the CANopen protocol to better meet the high requirements for communication delay, data accuracy and system reliability in industrial automation. This improved solution can significantly improve the data exchange efficiency between ECUs and the response speed of the overall system, and enhance the performance and reliability of industrial automation control systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 the structures shown in these drawings without paying creative work.

[0028] Figure 1 It is a schematic diagram of the structure of a device in a hardware operating environment involved in an embodiment of the present invention;

[0029] Figure 2 The figure is a flow chart of a data calculation method based on business changes of the present invention.

[0030] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0031] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0032] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0033] The terminal of the embodiment of the present invention can be a PC, or it can be a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a portable computer, or other portable terminal devices with display function.

[0034] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0035] Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal may also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which will not be repeated here.

[0036] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0037] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an industrial ECU communication program.

[0038] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the industrial ECU communication program stored in the memory 1005 and perform the following operations:

[0039] After the ECU joins the bus, the host computer switches and controls the node mode of the ECU, and the node mode of the EUC includes a pre-operation mode and an operation mode;

[0040] When the node mode of the ECU is a pre-operation mode or an operation mode, the parameters of the ECU are modified.

[0041] Furthermore, the processor 1001 may call the industrial ECU communication program stored in the memory 1005, and further perform the following operations:

[0042] Retrieve the standard data frame of the host computer and transmit it to the ECU;

[0043] The parameters of the ECU are modified according to the standard data frame, and the standard data frame has a plurality of sequentially arranged byte codes.

[0044] Furthermore, the processor 1001 may call the industrial ECU communication program stored in the memory 1005, and further perform the following operations:

[0045] Get the first bytecode to be executed;

[0046] Retrieving a two-bit bytecode and a three-bit bytecode according to the execution operation matched by the first bytecode, wherein the two-bit bytecode and the three-bit bytecode contain an index corresponding to each read and write data operation during the execution of the first bytecode;

[0047] And according to the execution operation determined by the first bytecode, the commands in the first bytecode are executed in sequence.

[0048] Furthermore, the processor 1001 may call the industrial ECU communication program stored in the memory 1005, and further perform the following operations:

[0049] Determine the index corresponding to the read / write data matched by the current instruction according to the meaning of the current instruction and match it with the two-bit byte code or the three-bit byte code;

[0050] Modify the parameters of the ECU according to the matched read and write data.

[0051] Furthermore, the processor 1001 may call the industrial ECU communication program stored in the memory 1005, and further perform the following operations:

[0052] After the ECU parameters are modified, a CAN message is sent through the receiving node.

[0053] Furthermore, the processor 1001 may call the industrial ECU communication program stored in the memory 1005, and further perform the following operations:

[0054] When the node mode of the ECU is in initialization mode, an online message is sent.

[0055] Furthermore, the processor 1001 may call the industrial ECU communication program stored in the memory 1005, and further perform the following operations:

[0056] The parameter synchronization signal is monitored when the node mode of the ECU is in the operation mode.

[0057] The specific embodiments of the data storage device of the present invention are basically the same as the embodiments of the industrial ECU communication method described below, and will not be described in detail here.

[0058] Reference Figure 2 The present invention provides an industrial ECU communication method, the industrial ECU communication method comprising:

[0059] After the ECU joins the bus, the host computer switches and controls the node mode of the ECU, and the node mode of the EUC includes a pre-operation mode and an operation mode;

[0060] When the node mode of the ECU is a pre-operation mode or an operation mode, the parameters of the ECU are modified.

[0061] In this embodiment, after the ECU joins the bus, the host computer controls the mode of the ECU. The ECU has four modes: initialization mode, pre-operation mode, operation mode, and stop mode.

[0062] The ECU is in initialization mode when it first joins the bus. It cannot communicate by sending online messages. In pre-operation mode, parameters can be modified, and string tables and menu structure tables can be read and written. In operation mode, parameter values ​​can be monitored by synchronous signals in pre-operation mode. In stop mode, parameters cannot be operated, but heartbeat packets are still sent continuously, indicating that the device is online.

[0063] This application simplifies the CANopen protocol and retains only key functions, thereby reducing redundant communication content and system burden, making the ECU communication process more efficient and streamlined. This streamlined solution not only saves bandwidth resources, but also enhances the applicability and scalability of the protocol, and is particularly suitable for industrial application scenarios with high real-time requirements.

[0064] In the present application, when the node mode of the ECU is the pre-operation mode or the operation mode, the step of modifying the parameters of the ECU includes:

[0065] Retrieve the standard data frame of the host computer and transmit it to the ECU;

[0066] The parameters of the ECU are modified according to the standard data frame, and the standard data frame has a plurality of sequentially arranged byte codes.

[0067] Specifically, please refer to Table 1. The CAN standard data frame has 8 bytes of data and 11 bits of CAN_ID can be used for parameter transmission. The ECU divides the CAN_ID into 2 parts: the upper 4 bits are used to represent the function code of this data frame, and the lower 7 bits are used to represent the node ID number of the ECU, so a maximum of 127 ECU nodes can be connected to the bus for communication.

[0068]

[0069]

[0070] Table 1

[0071] The 0th byte of the CAN data frame represents the command character. There are four types of command characters: read, write, abnormal error, and successful response. The reading and writing of the command character includes the representation of the data size. Through the command character, you can know whether the data to be read or written is 1 byte or 4 bytes. The 1st and 2nd bytes of the CAN data frame represent the address of the parameter, that is, the address of the corresponding parameter in the EEPROM. The third byte defaults to 00. Currently, there is only one parameter for one address in the EEPROM, so the byte defaults to 0, indicating that this is the parameter. The 4th to 7th bytes represent the size of the data to be read or written, and the insufficient bytes are filled with 0 by default.

[0072] Among them, the parameter modification operation belongs to service data, which has the address of the designated receiving node and requires the designated receiving node to respond to the CAN message to confirm that it has been received. If there is no confirmation within the timeout, the sending node will resend the original message.

[0073] In the above embodiment, the method for modifying the parameters of the ECU according to the standard data frame includes:

[0074] Get the first bytecode to be executed;

[0075] Retrieving a two-bit bytecode and a three-bit bytecode according to the execution operation matched by the first bytecode, wherein the two-bit bytecode and the three-bit bytecode contain an index corresponding to each read and write data operation during the execution of the first bytecode;

[0076] And according to the execution operation determined by the first bytecode, the commands in the first bytecode are executed in sequence.

[0077] In this embodiment, the instruction operation can be performed in sequence according to the instruction execution order of the first byte code. According to the meaning of the current instruction, the index corresponding to the read / write data matched by the current instruction is determined and matched with the two-bit byte code or the three-bit byte code, and finally the parameters of the ECU are modified according to the matched read / write data.

[0078] In order to further improve the response speed of the communication system, the present invention optimizes the index structure of the parameters, making the ECU more efficient in searching and reading parameters. This optimization greatly shortens the retrieval time of communication data and provides more convenient support for real-time control and parameter adjustment of the system.

[0079] Specifically, the string table and menu structure table have large data, and a single parameter operation cannot realize the reading operation. Block transmission read and write operations are performed on them. Block transmission is divided into three steps: request, transmission, and end. Request: Tell the ECU whether to read and write the string table or the menu structure table, the maximum number of frames received during the transmission process, and whether to perform CRC check. Transmission: The 0th byte indicates the frame of the transmission, and the following 7 bytes are all data. When the number of the first byte reaches the maximum number of received frames, wait for the host computer to respond. After the host computer responds, the value of the first byte starts to count again from 01 until the last frame of data. The highest bit of the last frame of data is 1, so the maximum number of received frames is 0x7F. End: The 0th byte of the end frame indicates how many data are valid in the last frame, the lowest 1 data is valid, and the highest 7 data are valid; the 1st and 2nd bytes indicate the CRC check value. If the CRC check value is incorrect, the host computer replies with an error code and the lower computer resends the data.

[0080] Based on the above embodiment, the CAN standard data frame has 8 bytes of data. If the size of a parameter is only 1 byte, then 1 frame of CAN data can obtain the data of 8 parameters at the same time. Based on this idea, a frame of CAN is divided into 8 bytes. If the first monitored parameter is 2 bytes in size, then the first parameter is placed at the position of the 0th byte and the 1st byte. This process is called mapping. 4 groups of different CANIDs are set in the ECU, which can be used to map the data of 4 CAN frames. After the mapping is completed, the host computer sends a SYNC synchronization signal to the bus. After receiving the synchronization signal, the ECU will send the mapped CAN frame to the bus.

[0081] The present invention supports data communication with a frame rate of 2 milliseconds, meeting the needs of industrial automation systems for high-real-time data interaction. High-frequency data updates enable the system to respond to control instructions and environmental changes in a shorter time, thereby improving the overall system's response speed and control accuracy.

[0082] This application implements a block transmission mechanism, which can transmit a large amount of string table data at one time, greatly improving the data transmission rate. Compared with the traditional byte-by-byte transmission method, block transmission not only reduces transmission delay, but also reduces data processing overhead, significantly improving the communication efficiency between ECUs, and is particularly suitable for the transmission of large amounts of parameters or string data.

[0083] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0084] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which an industrial ECU communication program is stored. When the industrial ECU communication program is executed by a processor, the following operations are implemented:

[0085] After the ECU joins the bus, the host computer switches and controls the node mode of the ECU, and the node mode of the EUC includes a pre-operation mode and an operation mode;

[0086] When the node mode of the ECU is a pre-operation mode or an operation mode, the parameters of the ECU are modified.

[0087] Furthermore, when the industrial ECU communication program is executed by the processor, the following operations are also implemented:

[0088] Retrieve the standard data frame of the host computer and transmit it to the ECU;

[0089] The parameters of the ECU are modified according to the standard data frame, and the standard data frame has a plurality of sequentially arranged byte codes.

[0090] Furthermore, when the industrial ECU communication program is executed by the processor, the following operations are also implemented:

[0091] Get the first bytecode to be executed;

[0092] Retrieving a two-bit bytecode and a three-bit bytecode according to the execution operation matched by the first bytecode, wherein the two-bit bytecode and the three-bit bytecode contain an index corresponding to each read and write data operation during the execution of the first bytecode;

[0093] And according to the execution operation determined by the first bytecode, the commands in the first bytecode are executed in sequence.

[0094] Furthermore, when the industrial ECU communication program is executed by the processor, the following operations are also implemented:

[0095] Determine the index corresponding to the read / write data matched by the current instruction according to the meaning of the current instruction and match it with the two-bit byte code or the three-bit byte code;

[0096] Modify the parameters of the ECU according to the matched read and write data.

[0097] Furthermore, when the industrial ECU communication program is executed by the processor, the following operations are also implemented:

[0098] After the ECU parameters are modified, a CAN message is sent through the receiving node.

[0099] Furthermore, when the industrial ECU communication program is executed by the processor, the following operations are also implemented:

[0100] When the node mode of the ECU is in initialization mode, an online message is sent.

[0101] Furthermore, when the industrial ECU communication program is executed by the processor, the following operations are also implemented:

[0102] The parameter synchronization signal is monitored when the node mode of the ECU is in the operation mode.

[0103] The specific embodiments of the computer-readable storage medium of the present invention are substantially the same as the embodiments of the above-mentioned industrial ECU communication method, and are not described in detail herein.

[0104] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

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

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0107] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An industrial ECU communication method, characterized in that: The industrial ECU communication method comprises: After the ECU joins the bus, the host computer switches and controls the node mode of the ECU, and the node mode of the EUC includes a pre-operation mode and an operation mode; When the node mode of the ECU is a pre-operation mode or an operation mode, the parameters of the ECU are modified.

2. The industrial ECU communication method according to claim 1, characterized in that: When the node mode of the ECU is a pre-operation mode or an operation mode, the step of modifying the parameters of the ECU comprises: Retrieve the standard data frame of the host computer and transmit it to the ECU; The parameters of the ECU are modified according to the standard data frame, and the standard data frame has a plurality of sequentially arranged byte codes.

3. The industrial ECU communication method according to claim 2, characterized in that: The method for modifying the parameters of the ECU according to the standard data frame includes: Get the first bytecode to be executed; Retrieving a two-bit bytecode and a three-bit bytecode according to the execution operation matched by the first bytecode, wherein the two-bit bytecode and the three-bit bytecode contain an index corresponding to each read and write data operation during the execution of the first bytecode; And according to the execution operation determined by the first bytecode, the commands in the first bytecode are executed in sequence.

4. The industrial ECU communication method according to claim 3, characterized in that: The step of sequentially executing the commands in the first bytecode according to the execution operation determined by the first bytecode comprises: Determine the index corresponding to the read / write data matched by the current instruction according to the meaning of the current instruction and match it with the two-bit byte code or the three-bit byte code; Modify the parameters of the ECU according to the matched read and write data.

5. The industrial ECU communication method according to claim 1, characterized in that: After the step of modifying the parameters of the ECU when the node mode of the ECU is the pre-operation mode or the operation mode, the method further comprises: After the ECU parameters are modified, a CAN message is sent through the receiving node.

6. The industrial ECU communication method according to claim 1, characterized in that: When the node mode of the ECU is in initialization mode, an online message is sent.

7. The industrial ECU communication method according to claim 1, characterized in that: The parameter synchronization signal is monitored when the node mode of the ECU is in the operation mode.

8. An industrial ECU communication device, characterized in that: The industrial ECU communication device comprises: a memory, a processor, and an industrial ECU communication program stored in the memory and executable on the processor. When the industrial ECU communication program is executed by the processor, the steps of the industrial ECU communication method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an industrial ECU communication program, and when the industrial ECU communication program is executed by a processor, the steps of the industrial ECU communication method according to any one of claims 1 to 7 are implemented.