Electric control cabinet data acquisition system and method
By configuring the conversion between Modbus RTU protocol and CAN bus protocol in the vehicle-mounted electronic control cabinet, the gateway structure is simplified, solving the problems of inconvenient information collection and high cost in the existing technology, and realizing convenient information reading and low-cost real-time display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XCMG EXCAVATOR MACHINERY CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-14
Smart Images

Figure CN122386804A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electrical control cabinet data acquisition and display technology, specifically relating to an electrical control cabinet data acquisition system and method. Background Technology
[0002] In recent years, with the rapid development of industry, the emission requirements for construction machinery and equipment have become increasingly stringent, and the market has paid more and more attention to construction costs. In construction sites such as mines, ports, and steel plants, there are more and more construction machinery and equipment connected to external industrial power. Due to the maturity, safety and reliability of three-phase asynchronous motor technology, vehicle-mounted electrical control cabinets are indispensable.
[0003] In existing technologies, the information acquisition modules inside vehicle-mounted electronic control cabinets often integrate information acquisition modules for display, or add a serial bus master station to poll and request the acquisition of register information from each information acquisition module. Then, the serial bus master station transmits the information data to the gateway module in the form of serial bus frames. The gateway module converts the serial bus frames into CAN bus frames and transmits the information to the engineering machinery equipment for display.
[0004] It is evident that, due to the integrated display of information collected by the internal information acquisition modules of the vehicle-mounted electrical control cabinet, the cabinet door needs to be opened to read information from the displays of each module. This method is inefficient, inconvenient, and unsafe as the control cabinet uses industrial electricity. Adding a serial bus master station inside the vehicle-mounted electrical control cabinet polls and requests information from the registers of each acquisition module. The master station then transmits the data to the gateway module in the form of serial bus frames. The gateway module converts these frames into CAN bus frames and transmits the information to the construction machinery for display. However, this method is costly. Furthermore, the limited space within the control cabinet makes the placement of the serial bus master station difficult. When the information display requirements of the construction machinery change, the master station needs to upgrade its software to adjust the requested data items, leading to operational inconvenience. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a data acquisition system and method for electrical control cabinets. This system eliminates the need for a serial bus master station. By configuring each slave device and gateway on the serial bus, it enables the reading of data from the slave registers on all serial buses. The gateway structure is simple, requiring only a single serial port and a single CAN port to fulfill the functional requirements. The overall communication architecture is simple, low-cost, and easy to debug.
[0006] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:
[0007] In a first aspect, the present invention provides an electrical control cabinet data acquisition system, comprising:
[0008] Serial bus;
[0009] Independently configured first and second CAN buses;
[0010] A gateway includes a first serial port and a first CAN port, wherein the first serial port is connected to a serial bus and the first CAN port is connected to a first CAN bus.
[0011] Several slave devices, each slave device is connected to the serial bus through a corresponding second serial port;
[0012] The vehicle-mounted CAN controller includes a second CAN port and a third CAN port. The second CAN port is connected to the first CAN bus, and the third CAN port is connected to the second CAN bus.
[0013] In conjunction with the first aspect, optionally, the communication protocol of the second serial port of each slave device is uniformly set to the Modbus RTU protocol, each slave device is configured with a predetermined address, and the second serial port of each slave device is configured with a predetermined baud rate and parity method.
[0014] In conjunction with the first aspect, optionally, the communication protocol of the first serial port is set to the Modbus RTU protocol, and the baud rate and parity method of the first serial port are consistent with the baud rate and parity method of the second serial ports of each slave device on the serial bus; the first serial port is also configured with stop bits and serial bus frame time interval to ensure accurate reception of serial port data.
[0015] In conjunction with the first aspect, optionally, the frame type and baud rate of the first CAN port are consistent with those of the second CAN port, and the first CAN port is also configured with a CAN bus frame time interval.
[0016] In conjunction with the first aspect, optionally, the vehicle-mounted CAN controller polls the gateway via the second CAN port to send a request message for collecting information of slave devices on the serial bus, wherein the request message ID is the address of the slave device on the serial bus;
[0017] The gateway receives and converts the request message sent by the vehicle CAN controller into a serial bus frame according to the preset gateway communication protocol conversion rules, and polls each slave device on the serial bus to request data.
[0018] The gateway receives response data from each slave station on the serial bus and converts it into CAN bus frames according to the preset CAN message segmentation protocol rules and the preset gateway communication protocol conversion rules.
[0019] The vehicle-mounted CAN controller receives the CAN bus frames converted by the gateway, further parses and converts the received CAN bus frames into CAN bus frames that can be recognized by the vehicle-mounted instrument panel, and transmits them to the second CAN bus through the third CAN port.
[0020] In conjunction with the first aspect, optionally, the request message data format is: independent message identifier + read function code + starting position of the corresponding slave device data on the requested serial bus + number of registers of the corresponding slave device data on the requested serial bus.
[0021] In conjunction with the first aspect, optionally, the preset CAN message segmentation protocol rule is as follows:
[0022] 1) If the data length is less than or equal to 8 bytes, communication is carried out in the form of independent messages. The format of the independent message is defined as: independent message identifier + Modbus RTU protocol function code + data field;
[0023] 2) If the data length is greater than 8 bytes, communication shall be conducted using segmented messages. The format of the segmented message is specified as follows:
[0024] First segment message: First segment identifier + first segment sequence number in the whole message + Modbus RTU protocol function code + data field;
[0025] Intermediate segment message: Intermediate segment identifier + segment sequence number of the segment in the entire message + data field;
[0026] Last segment message: Last segment identifier + last segment sequence number in the whole message + data field;
[0027] The first segment identifier, the middle segment identifier, the last segment identifier, and the segment number are used to locate and filter data.
[0028] In conjunction with the first aspect, optionally, the preset gateway communication protocol conversion rules include:
[0029] 1) The serial bus frame address field and the CAN bus frame ID source address are mutually converted and filled;
[0030] 2) The data at the serial bus frame function code position and the Modbus RTU protocol function code position in the CAN bus frame data field are mutually converted and filled;
[0031] 3) The serial bus frame data field and the CAN bus frame data field, except for the segment information position and the Modbus RTU protocol function code position, are sequentially converted and filled with each other. The segment information includes the segment identifier and the segment sequence number.
[0032] In conjunction with the first aspect, optionally, the electrical control cabinet data acquisition system further includes: an on-board instrument panel, the on-board instrument panel including a fourth CAN port, the fourth CAN port being connected to the second CAN bus, the on-board instrument panel performing fault alerts and displaying data based on the CAN bus frames received by the fourth CAN port.
[0033] In conjunction with the first aspect, optionally, the two ends of the serial bus, the first CAN bus, and the second CAN bus are respectively connected in parallel with terminating resistors of a preset resistance value.
[0034] In a second aspect, the present invention provides a data acquisition method applicable to the electrical control cabinet data acquisition system described in any one of the first aspects, comprising:
[0035] The vehicle-mounted CAN controller uses the second CAN port to poll and send a request message to the gateway to collect information of slave devices on the serial bus. The request message ID is the address of the slave device on the serial bus.
[0036] The gateway receives and converts the request messages sent by the vehicle CAN controller into serial bus frames according to the preset gateway communication protocol conversion rules, and polls each slave device on the serial bus to request data.
[0037] The gateway receives response data from each slave station on the serial bus and converts it into CAN bus frames according to the preset CAN message segmentation protocol rules and the preset gateway communication protocol conversion rules.
[0038] The vehicle CAN controller receives the CAN bus frames converted by the gateway, further parses and converts the received CAN bus frames into CAN bus frames that can be recognized by the vehicle instrument panel, and transmits them to the second CAN bus through the third CAN port.
[0039] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0040] The present invention proposes a data acquisition system and method for electrical control cabinets, which does not require the installation of a serial bus master station. By specifically configuring each slave device and gateway on the serial bus, it can realize the reading of data from the slave registers on all serial buses. The gateway structure is simple, requiring only a single serial port and a single CAN port to meet the functional requirements. The overall communication architecture is simple, low in cost, and easy to debug. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:
[0042] Figure 1 This is a schematic diagram of the structure of an electrical control cabinet data acquisition system according to an embodiment of the present invention;
[0043] Figure 2This is a flowchart illustrating a data acquisition method for an electrical control cabinet according to an embodiment of the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the present invention or its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may include different values. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0046] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0047] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0048] The application principle of the present invention will be described in detail below with reference to the accompanying drawings.
[0049] Example 1
[0050] This invention provides a data acquisition system for electrical control cabinets, such as... Figure 1 As shown, it includes:
[0051] Serial bus;
[0052] Independently configured first and second CAN buses;
[0053] A gateway includes a first serial port and a first CAN port, wherein the first serial port is connected to a serial bus and the first CAN port is connected to a first CAN bus.
[0054] Several slave devices, each slave device is connected to the serial bus through a corresponding second serial port;
[0055] The vehicle-mounted CAN controller includes a second CAN port and a third CAN port. The second CAN port is connected to the first CAN bus, and the third CAN port is connected to the second CAN bus.
[0056] Based on the above solution, there is no need to install a serial bus master station. By configuring each slave device and gateway on the serial bus, data reading from the slave registers on all serial buses can be achieved. The gateway structure is simple, requiring only a single serial port and a single CAN port to fulfill the function. The overall communication architecture is simple, low-cost, and easy to debug.
[0057] In one specific embodiment of the present invention, the communication protocol of the second serial port of each slave device is uniformly set to Modbus RTU protocol, each slave device is configured with a predetermined address, and the second serial port of each slave device is configured with a predetermined baud rate and parity method.
[0058] Based on the above scheme, it can be ensured that after the gateway is configured, the gateway can normally request the real-time collected information data stored in the registers of each slave device on the serial bus through the Modbus RTU protocol.
[0059] In one specific embodiment of the present invention, the communication protocol of the first serial port is set to the Modbus RTU protocol, and the baud rate and parity method of the first serial port are consistent with the baud rate and parity method of the second serial ports of each slave device on the serial bus; the first serial port is also configured with stop bits and serial bus frame time interval to ensure accurate reception of serial port data.
[0060] The above scheme provides a detailed description of the specific configuration of the first serial port, which can ensure that the real-time acquired information data stored in the registers of each slave device on the serial bus can be requested normally.
[0061] In one specific embodiment of the present invention, the frame type and baud rate of the first CAN port are consistent with those of the second CAN port, and the first CAN port is also configured with a CAN bus frame time interval.
[0062] The above scheme provides a detailed description of the specific configuration of the first CAN port, which is used to ensure that the real-time acquired information data stored in the registers of each slave device on the normal request serial bus is received.
[0063] In one specific embodiment of the present invention, the vehicle CAN controller sends a request message to the gateway for collecting information of slave devices on the serial bus through the second CAN port, and the request message ID is the address of the slave device on the serial bus.
[0064] The gateway receives and converts the request message sent by the vehicle CAN controller into a serial bus frame according to the preset gateway communication protocol conversion rules, and polls each slave device on the serial bus to request data.
[0065] The gateway receives response data from each slave station on the serial bus and converts it into CAN bus frames according to the preset CAN message segmentation protocol rules and the preset gateway communication protocol conversion rules.
[0066] The vehicle-mounted CAN controller receives the CAN bus frames converted by the gateway, further parses and converts the received CAN bus frames into CAN bus frames that can be recognized by the vehicle-mounted instrument panel, and transmits them to the second CAN bus through the third CAN port.
[0067] Based on the above scheme, the data reading of slave device registers on all serial buses was realized.
[0068] In one specific embodiment of the present invention, the request message data format is: independent message identifier + read function code + starting position of the corresponding slave device data on the requested serial bus + number of registers of the corresponding slave device data on the requested serial bus.
[0069] In one specific embodiment of the present invention, the preset CAN message segmentation protocol rule is as follows:
[0070] 1) If the data length is less than or equal to 8 bytes, communication is carried out in the form of independent messages. The format of the independent message is defined as: independent message identifier + Modbus RTU protocol function code + data field;
[0071] 2) If the data length is greater than 8 bytes, communication shall be conducted using segmented messages. The format of the segmented message is specified as follows:
[0072] First segment message: First segment identifier + first segment sequence number in the whole message + Modbus RTU protocol function code + data field;
[0073] Intermediate segment message: Intermediate segment identifier + segment sequence number of the segment in the entire message + data field;
[0074] Last segment message: Last segment identifier + last segment sequence number in the whole message + data field;
[0075] The first segment identifier, the middle segment identifier, the last segment identifier, and the segment number are used to locate and filter data.
[0076] In one specific embodiment of the present invention, the preset gateway communication protocol conversion rule includes:
[0077] 1) The serial bus frame address field and the CAN bus frame ID source address are mutually converted and filled;
[0078] 2) The data at the serial bus frame function code position and the Modbus RTU protocol function code position in the CAN bus frame data field are mutually converted and filled;
[0079] 3) The serial bus frame data field and the CAN bus frame data field, except for the segment information position and the Modbus RTU protocol function code position, are sequentially converted and filled with each other. The segment information includes the segment identifier and the segment sequence number.
[0080] In one specific embodiment of the present invention, the electrical control cabinet data acquisition system further includes: an on-board instrument, the on-board instrument including a fourth CAN port, the fourth CAN port being connected to the second CAN bus, and the on-board instrument performing fault alerts and displaying data based on the CAN bus frames received by the fourth CAN port.
[0081] Based on the above solution, the construction machinery equipment can display the information in the vehicle instrument panel in the cab in real time according to the information display requirements of the vehicle-mounted electronic control cabinet. If necessary, all information in the vehicle-mounted electronic control cabinet can be collected and displayed, which has good human-machine interaction and facilitates fault diagnosis.
[0082] In one specific embodiment of the present invention, the two ends of the serial bus, the first CAN bus and the second CAN bus are respectively connected in parallel with a terminating resistor of a preset resistance value.
[0083] In the above scheme, by connecting terminating resistors in parallel across the serial bus, the first CAN bus, and the second CAN bus, signal reflection can be effectively suppressed, ensuring stable communication without frame loss or garbled characters. In specific implementation, the preset resistance value can be set to 120Ω. The preset resistance value can be set according to actual needs; this invention does not impose excessive requirements on it.
[0084] The working process of the electrical control cabinet data acquisition system in this embodiment of the invention will be described in detail below with reference to a specific implementation method.
[0085] like Figure 1 As shown, in the electrical control cabinet data acquisition system proposed in this embodiment, each slave device (i.e. Figure 1 The slave devices 01, 02, ..., n communicate with the first serial port of the gateway on an RS-485 bus, with 120Ω terminating resistors connected in parallel at both ends of the RS-485 bus. The first CAN port of the gateway communicates independently with one of the CAN ports (second CAN port) of the vehicle CAN controller on the first CAN bus, with 120Ω terminating resistors connected in parallel at both ends of the CAN bus. The other CAN port (third CAN port) of the vehicle CAN controller communicates with CAN devices such as vehicle instruments on the second CAN bus, with 120Ω terminating resistors also connected in parallel at both ends of the second CAN bus.
[0086] like Figure 2 As shown, the data acquisition method of the electrical control cabinet data acquisition system in this embodiment includes,
[0087] Step 1: Set the communication protocol of each slave device on the serial bus to the Modbus RTU protocol, and assign an address to each slave device on the serial bus. Further, set the baud rate and parity method of the second serial port on each slave device on the serial bus to ensure that after the gateway is configured, the gateway can normally request the real-time collected information data stored in the registers of each slave device on the serial bus through the Modbus RTU protocol.
[0088] Step 2: Configure the serial bus frame and CAN bus frame to be bidirectional. Specifically: the gateway serial port communication protocol is set to Modbus RTU protocol. To ensure that the real-time acquired information data stored in the registers of each slave device on the serial bus can be requested normally, the communication baud rate and parity method of the gateway's first serial port are consistent with the communication baud rate and parity method of the second serial port of each slave device on the serial bus. Furthermore, to ensure accurate data reception of the gateway's first serial port, stop bits and serial bus frame time intervals are set; the frame type and baud rate of the first CAN port are consistent with the frame type and baud rate of the second CAN port of the vehicle CAN controller, and the CAN bus frame time interval of the first CAN port is set.
[0089] Step 3: Configure the CAN message on the gateway's CAN port side as a segmented protocol. The specific segmented protocol is as follows: 1) When the data length is no more than 8 bytes, communication is carried out in the form of independent messages. The format of this independent message is defined as: independent message identifier + Modbus RTU protocol function code + data field; 2) When the data length is greater than 8 bytes, segmented message processing is adopted. The format of the segmented message is defined as: First segment message: first segment identifier + segment number of the first segment in the whole message + Modbus RTU protocol function code + data field; Middle segment message: middle segment identifier + segment number of the segment in the whole message + data field; Last segment message: last segment identifier + segment number of the last segment in the whole message + data field.
[0090] Step 4: Set the gateway communication protocol conversion rules as follows: 1) Convert and fill the serial bus frame address field with the CAN bus frame ID source address; 2) Convert and fill the data in the serial bus frame function code position with the Modbus RTU protocol function code position in the CAN bus frame data field; 3) Convert and fill the serial bus frame data field with the other positions in the CAN bus frame data field except for the segment information position and the Modbus RTU protocol function code position in sequence. The segment information includes the segment identifier and the segment sequence number.
[0091] Step 5: The vehicle CAN controller polls the gateway through one of the CAN ports (i.e., the second CAN port) and sends a request message to collect information of the slave devices on the serial bus. The request message ID is the address of the slave on the serial bus, and the request message data format is: independent message identifier + corresponding "read" function code of Modus RTU protocol + starting position of the data of the corresponding slave device on the requested serial bus + number of registers of the data of the corresponding slave device on the requested serial bus.
[0092] Step 6: The gateway receives and converts the polling request message from the vehicle CAN controller into a serial bus frame according to the gateway communication protocol conversion rules set in Step 4, and then polls each slave device on the serial bus to request data.
[0093] Step 7: The gateway receives the response data from each slave device on the serial bus and converts it into a CAN bus frame according to the CAN message segmentation protocol rules specified in Step 3 and the gateway communication protocol conversion rules specified in Step 4.
[0094] Step 8: The vehicle CAN controller receives the CAN bus frame converted by the gateway, further parses and converts the received data information into a CAN bus frame that can be recognized by the vehicle instrument panel, and transmits it to the vehicle instrument panel through another CAN port (i.e., the third CAN port). The vehicle instrument panel displays fault information and provides fault reminders based on the received data information.
[0095] Example 2
[0096] This invention provides a data acquisition method for an electrical control cabinet data acquisition system applicable to any one of Embodiment 1, comprising the following steps:
[0097] (1) The vehicle CAN controller uses the second CAN port to poll and send a request message to the gateway to collect information of slave devices on the serial bus. The request message ID is the address of the slave device on the serial bus.
[0098] (2) The gateway receives and converts the request message sent by the vehicle CAN controller into a serial bus frame according to the preset gateway communication protocol conversion rules, and polls each slave device on the serial bus to request data;
[0099] (3) The gateway receives the response data fed back by each slave station on the serial bus and converts it into CAN bus frames according to the preset CAN message segmentation protocol rules and the preset gateway communication protocol conversion rules.
[0100] (4) The vehicle CAN controller receives the CAN bus frame converted by the gateway, and further parses and converts the received CAN bus frame into a CAN bus frame that is recognized by the vehicle instrument, and transmits it to the second CAN bus through the third CAN port.
[0101] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only used to facilitate the description of the present invention and to simplify the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the scope of protection of the present invention.
[0102] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A data acquisition system for an electrical control cabinet, characterized in that, include: Serial bus; Independently configured first and second CAN buses; A gateway includes a first serial port and a first CAN port, wherein the first serial port is connected to a serial bus and the first CAN port is connected to a first CAN bus. Several slave devices, each slave device is connected to the serial bus through a corresponding second serial port; The vehicle-mounted CAN controller includes a second CAN port and a third CAN port. The second CAN port is connected to the first CAN bus, and the third CAN port is connected to the second CAN bus.
2. The electrical control cabinet data acquisition system according to claim 1, characterized in that: The communication protocol of the second serial port of each slave device is uniformly set to Modbus RTU protocol. Each slave device is configured with a predetermined address, and the second serial port of each slave device is configured with a predetermined baud rate and parity method.
3. The electrical control cabinet data acquisition system according to claim 2, characterized in that: The communication protocol of the first serial port is set to Modbus RTU protocol, and the baud rate and parity of the first serial port are consistent with the baud rate and parity of the second serial ports of each slave device on the serial bus; the first serial port is also configured with stop bits and serial bus frame time interval to ensure accurate reception of serial data.
4. The electrical control cabinet data acquisition system according to claim 1, characterized in that: The frame type and baud rate of the first CAN port are consistent with those of the second CAN port, and the first CAN port is also configured with a CAN bus frame time interval.
5. The electrical control cabinet data acquisition system according to claim 4, characterized in that: The vehicle-mounted CAN controller sends a request message to the gateway via the second CAN port to collect information of the slave devices on the serial bus. The request message ID is the address of the slave device on the serial bus. The gateway receives and converts the request message sent by the vehicle CAN controller into a serial bus frame according to the preset gateway communication protocol conversion rules, and polls each slave device on the serial bus to request data. The gateway receives response data from each slave station on the serial bus and converts it into CAN bus frames according to the preset CAN message segmentation protocol rules and the preset gateway communication protocol conversion rules. The vehicle-mounted CAN controller receives the CAN bus frames converted by the gateway, further parses and converts the received CAN bus frames into CAN bus frames that can be recognized by the vehicle-mounted instrument panel, and transmits them to the second CAN bus through the third CAN port.
6. The electrical control cabinet data acquisition system according to claim 5, characterized in that: The request message data format is: independent message identifier + read function code + starting position of the corresponding slave device data on the requested serial bus + number of registers of the corresponding slave device data on the requested serial bus.
7. The electrical control cabinet data acquisition system according to claim 5, characterized in that: The preset CAN message segmentation protocol rules are as follows: 1) If the data length is less than or equal to 8 bytes, communication is carried out in the form of independent messages. The format of the independent message is defined as: independent message identifier + Modbus RTU protocol function code + data field; 2) If the data length is greater than 8 bytes, communication shall be conducted using segmented messages. The format of the segmented message is specified as follows: First segment message: First segment identifier + first segment sequence number in the whole message + Modbus RTU protocol function code + data field; Intermediate segment message: Intermediate segment identifier + segment sequence number of the segment in the entire message + data field; Last segment message: Last segment identifier + last segment sequence number in the whole message + data field; The first segment identifier, the middle segment identifier, the last segment identifier, and the segment number are used to locate and filter data.
8. The electrical control cabinet data acquisition system according to claim 7, characterized in that: The preset gateway communication protocol conversion rules include: 1) The serial bus frame address field and the CAN bus frame ID source address are mutually converted and filled; 2) The data at the serial bus frame function code position and the Modbus RTU protocol function code position in the CAN bus frame data field are mutually converted and filled; 3) The serial bus frame data field and the CAN bus frame data field, except for the segment information position and the Modbus RTU protocol function code position, are sequentially converted and filled with each other. The segment information includes the segment identifier and the segment sequence number.
9. The electrical control cabinet data acquisition system according to claim 5, characterized in that: The electrical control cabinet data acquisition system also includes: an on-board instrument panel, which includes a fourth CAN port connected to the second CAN bus. The on-board instrument panel displays fault information and data based on the CAN bus frames received by the fourth CAN port.
10. The electrical control cabinet data acquisition system according to claim 1, characterized in that: The serial bus, the first CAN bus, and the second CAN bus are each connected in parallel with a terminating resistor of a preset resistance value.
11. A data acquisition method applicable to the electrical control cabinet data acquisition system according to any one of claims 1-10, characterized in that, include: The vehicle-mounted CAN controller uses the second CAN port to poll and send a request message to the gateway to collect information of slave devices on the serial bus. The request message ID is the address of the slave device on the serial bus. The gateway receives and converts the request messages sent by the vehicle CAN controller into serial bus frames according to the preset gateway communication protocol conversion rules, and polls each slave device on the serial bus to request data. The gateway receives response data from each slave station on the serial bus and converts it into CAN bus frames according to the preset CAN message segmentation protocol rules and the preset gateway communication protocol conversion rules. The vehicle CAN controller receives the CAN bus frames converted by the gateway, further parses and converts the received CAN bus frames into CAN bus frames that can be recognized by the vehicle instrument panel, and transmits them to the second CAN bus through the third CAN port.