A can communication system and a data processing method thereof, and a fan

CN123020265APending Publication Date: 2026-10-30CGN DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611094540.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]本发明提供一种CAN通信系统及其数据处理方法、风机,以解决CAN通信单元中的发送邮箱数量很少,存在高负荷通信场景下造成部分数据包发送失败的技术问题

Benefits of technology

[0015]本发明的有益效果:本发明提出的一种CAN通信系统及其数据处理方法、风机,首先,通过CAN通信单元接收各个从站设备的运行状态数据,并将各个运行状态数据分别与CAN通信单元的通信状态数据进行组合,形成对应上报数据。其次,通过处理单元,对上报数据中的通信状态数据进行判断,并在确认通信状态数据正常时,根据运行状态数据和预设的控制目标数据生成控制参数数据。然后,CAN通信单元还用于将控制参数数据形成数据包,并检测其内部的发送邮箱状态:当存在空闲的发送邮箱时,将数据包通过空闲的发送邮箱发送给从站设备;否则,持续检测发送邮箱状态,并将检测次数与预设的阈值次数进行比较,基于比较结果执行预设的发送异常处理。由此可见,在高负荷CAN通信时,可实现大量数据高效可靠发送。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020265A_ABST
    Figure CN123020265A_ABST
Patent Text Reader

Abstract

The application provides a CAN communication system, a data processing method thereof and a fan. The CAN communication system comprises a CAN communication unit configured to receive operation state data of each slave station device, and combine each operation state data with communication state data of the CAN communication unit to form corresponding reporting data; and a processing unit configured to generate control parameter data according to the operation state data and preset control target data when the communication state data is confirmed to be normal. The CAN communication unit is further configured to form a data packet from the control parameter data, and detect a sending mailbox state in the data packet. When there is an idle sending mailbox, the data packet is sent to the slave station device through the idle sending mailbox. Otherwise, the sending mailbox state is continuously detected, and the detection times are compared with a preset threshold number of times. Based on the comparison result, a preset sending exception processing is performed. The application can realize efficient and reliable sending of a large amount of data in high-load CAN communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of controller area network communication technology, and in particular to a CAN communication system and its data processing method, and a fan. Background Technology

[0002] In the field of wind power generation technology, the CAN communication unit in the wind turbine exchanges data with slave devices such as the pitch unit through the CAN bus.

[0003] The existing CAN communication unit is developed based on a microcontroller and uses a foreground / background approach for data transmission and reception. The foreground interrupt handles rapid data reception, while the background main loop continuously polls the transmit mailbox status. Once a data packet is detected, it is sent through the transmit mailbox. Because the number of transmit mailboxes in the CAN communication unit is small, they quickly become full under high-load communication scenarios. Even then, the main loop continues to poll the transmit mailbox status, causing data packets to fail to be written in a timely manner, resulting in some data packet transmission failures and severely impacting the real-time performance and reliability of communication. Therefore, improvements are needed. Summary of the Invention

[0004] This invention provides a CAN communication system and its data processing method, as well as a fan, to solve the technical problem that the number of transmitting mailboxes in the CAN communication unit is very small, resulting in the failure of some data packets to be transmitted under high-load communication scenarios.

[0005] This invention proposes a CAN communication system for use in wind turbines, wherein the wind turbines include multiple slave devices, and the CAN communication system includes: The CAN communication unit is connected to multiple slave devices via a CAN bus. It is used to receive the operating status data of each slave device and combine the operating status data of each slave device with the communication status data of the CAN communication unit to form corresponding reporting data. The processing unit is used to judge the communication status data in the reported data, and when the communication status data is confirmed to be normal, to generate control parameter data based on the operation status data and the preset control target data; The CAN communication unit is also used to form control parameter data into data packets and detect the status of its internal transmission mailbox. When an idle send mailbox is available, the data packet is sent to the slave device through the idle send mailbox; Otherwise, continuously monitor the sending mailbox status and compare the number of checks with a preset threshold number of checks, and perform preset sending exception handling based on the comparison result.

[0006] In one embodiment of the present invention, the CAN communication unit is further configured to pause detecting the status of the sending mailbox when there is no idle sending mailbox and the number of detections reaches a preset number of pauses or a multiple thereof, and to continue detecting the status of the sending mailbox after a preset pause duration, and to perform waiting-to-send processing on the data packets.

[0007] In one embodiment of the present invention, the CAN communication unit is further configured to compare the number of detections with a preset threshold number of detections: When the number of detections is greater than or equal to the threshold number, the data packet is discarded and a transmission failure message is recorded. Otherwise, continue to check the sending mailbox status and perform a wait-to-send process on the data packet.

[0008] In one embodiment of the present invention, the threshold number is 40,000 to 50,000 times, the number of pauses is 10,000 times, and the pause duration is 1ms to 2ms.

[0009] In one embodiment of the present invention, the CAN communication unit includes at least two CAN communication interfaces, each of which is connected to at least one of the slave devices.

[0010] In one embodiment of the present invention, the CAN communication unit is further configured to fill the running status data of the slave device received by each CAN communication interface into the corresponding CAN receive message queue. The CAN communication unit is also used to retrieve running status data sequentially from each CAN receive message queue, and combine each retrieved running status data with the communication status data of the CAN communication unit to form reporting data.

[0011] In one embodiment of the present invention, the CAN communication unit is further configured to, after receiving control parameter data, confirm the corresponding slave device, store the control parameter data in the CAN transmission message queue corresponding to the slave device, and sequentially retrieve the control parameter data from the CAN transmission message queue and encapsulate it into a data packet.

[0012] This invention also proposes a data processing method for a CAN communication system, applied in a wind turbine, wherein the wind turbine includes multiple slave devices, and the data processing method includes: The system receives operating status data from slave devices via the CAN communication unit and combines the operating status data with the communication status data from the CAN communication unit to form reported data. The processing unit judges the communication status data in the reported data, and when it confirms that the communication status data is normal, it generates control parameter data based on the operation status data and the preset control target data. The control parameter data is formed into data packets through the CAN communication unit, and the status of the transmit mailbox inside the CAN communication unit is detected. When an idle send mailbox is available, the data packet is sent to the slave device through the idle send mailbox; Otherwise, continuously monitor the sending mailbox status and compare the number of checks with a preset threshold number of checks, and perform preset sending exception handling based on the comparison result.

[0013] The present invention also proposes a fan comprising a CAN communication system as described above and a plurality of slave devices.

[0014] In one embodiment of the present invention, the slave device includes at least a pitch unit.

[0015] The beneficial effects of this invention are as follows: This invention proposes a CAN communication system and its data processing method, along with a wind turbine. First, the CAN communication unit receives operating status data from each slave device and combines this data with the communication status data from the CAN communication unit to form corresponding reported data. Second, the processing unit judges the communication status data in the reported data and, if the communication status data is confirmed to be normal, generates control parameter data based on the operating status data and preset control target data. Then, the CAN communication unit further forms the control parameter data into data packets and detects the status of the internal transmission mailbox: when an idle transmission mailbox exists, the data packet is sent to the slave device through the idle mailbox; otherwise, the transmission mailbox status is continuously monitored, and the number of monitoring iterations is compared with a preset threshold number. Based on the comparison result, preset transmission anomaly handling is executed. Therefore, under high-load CAN communication, efficient and reliable transmission of large amounts of data can be achieved. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0017] In the attached diagram: Figure 1 This is a structural block diagram of a CAN communication system provided in an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram illustrating the steps of a data processing method for a CAN communication system provided in an embodiment of the present invention.

[0019] Figure 3This is a connection block diagram between a fan and an engineering station provided in an embodiment of the present invention. Detailed Implementation

[0020] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0021] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0022] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0023] Please see Figures 1 to 3 This paper proposes a CAN communication system and its data processing method, applicable to wind turbines. In wind turbine control systems, CAN communication networks are widely used to connect processing unit 10 with multiple slave devices 30, such as pitch and yaw units. Processing unit 10 needs to acquire the real-time operating status of each slave device 30 and quickly send control parameters to ensure the safe and efficient operation of the wind turbine. Since the number of transmit mailboxes in CAN communication unit 20 is usually very limited, when the communication load is high, multiple data packets may simultaneously wait for transmit mailbox resources, resulting in some data packets not being sent in time. The CAN communication system proposed in this application can quickly send control parameter data using idle transmit mailboxes under normal operating conditions, meeting real-time requirements. Simultaneously, for the extreme case where the transmit mailbox is occupied for a long time, a compromise processing mechanism is designed. Instead of infinite loop waiting or simply discarding data, it continuously monitors the transmit mailbox status and records the number of checks. When the number of checks reaches a certain threshold, it actively allows the current data packet to temporarily wait, releasing process resources to ensure the execution of other tasks, thus achieving a balance between transmission efficiency and system stability. The following detailed explanation of the operation process of this CAN communication system is provided with specific examples.

[0024] Please see Figure 1 This invention proposes a CAN communication system for use in wind turbines. The wind turbine includes multiple slave devices, and the CAN communication system includes a processing unit 10 and a CAN communication unit 20.

[0025] During normal wind turbine operation, multiple slave devices 30 continuously report their respective operating status data to the CAN communication system via the CAN bus. The CAN communication unit 20 receives the operating status data from each slave device 30 via the CAN bus. Upon receiving operating status data from each slave device 30, the CAN communication unit 20 immediately combines this data with its own recorded communication status data to form a corresponding report. The communication status data includes information such as the current communication link quality, receive buffer occupancy rate, and bus load rate of the CAN communication unit 20. After combination, the CAN communication unit 20 transmits the report data to the processing unit 10. One end of the CAN communication unit 20 is connected to the processing unit 10 via Ethernet, and the other end is connected to the multiple slave devices 30 via two CAN communication interfaces to achieve bidirectional communication between the processing unit 10 and the slave devices 30.

[0026] Secondly, after receiving the reported data, the processing unit 10 first extracts the communication status data and determines whether the communication status data is within the normal range. If the communication status data shows that the CAN communication unit 20 is working normally, there are no serious errors on the bus, and the receive buffer has not overflowed, then the processing unit 10 confirms that the communication status data is normal. Based on this, the processing unit 10 executes a control algorithm according to the operating status data in the reported data and the preset control target data to generate control parameter data for adjusting the operating status of the slave device 30. The preset control target data can be a target value for the wind turbine blade angle or a target value for the rotational speed, etc. The processing unit 10 calculates the control parameter data by comparing the deviation between the current operating status and the target status, and sends the control parameter data back to the CAN communication unit 20.

[0027] After receiving the control parameter data, the CAN communication unit 20 encapsulates the control parameter data into a complete data packet according to the CAN communication protocol, preparing to send it to the corresponding slave device 30. Before transmission, the CAN communication unit 20 first checks the status of its internal transmit mailboxes to determine if there are any idle transmit mailboxes. If at least one idle transmit mailbox exists, the CAN communication unit 20 immediately sends the data packet to the idle transmit mailbox and automatically completes the subsequent CAN bus transmission process, thereby sending the control parameter data to the target slave device 30.

[0028] If the CAN communication unit 20 detects that all transmitting mailboxes are currently busy, meaning there are no free transmitting mailboxes available, then the CAN communication unit 20 enters a continuous detection mode. In this mode, the CAN communication unit 20 continuously checks the status of the transmitting mailboxes. If no free mailbox is found after each check, the detection count is accumulated, and the next check continues. Simultaneously, the CAN communication unit 20 compares the current detection count with a pre-set threshold count.

[0029] When the number of checks has not reached the threshold, the CAN communication unit 20 continues to cyclically check the status of the transmission mailbox, without giving up the current data packet transmission attempt. If the number of checks reaches or exceeds the threshold and no idle transmission mailbox is detected, the CAN communication unit 20 determines that the current transmission condition is abnormal and executes the preset transmission error handling. Transmission error handling may include discarding the current data packet, recording a transmission failure log, or putting the data packet back into the transmission waiting queue for later retry. Through the above mechanism, the CAN communication system can ensure continuous transmission attempts within a certain period of time under high CAN bus load and scarce transmission mailbox resources, while avoiding system deadlock caused by infinite waiting, ultimately achieving reliable transmission of control parameter data to the slave device 30.

[0030] Please see Figure 1 In one embodiment of the present invention, the communication process of the CAN communication system is divided into two stages: a configuration stage and an operation stage.

[0031] The configuration phase primarily involves configuring two independent CAN communication interfaces to accommodate different CAN bus networks. During the operation phase, the CAN communication unit 20 mainly enables bidirectional communication between the processing unit 10 and the slave device 30.

[0032] Specifically, during the configuration phase, after the CAN communication unit 20 successfully powers on and initializes, it first enters the configuration phase, actively sending configuration request information to the processing unit 10 every 100ms until it receives configuration response information from the processing unit 10. The configuration response information includes communication time parameters and characteristic parameters of the two CAN communication interfaces. After parsing the configuration information, the CAN communication unit 20 configures the two CAN communication interfaces according to the characteristic parameters of the corresponding communication interfaces, including baud rate and filtering mode. The two CAN communication interfaces are independent of each other. After configuration, the CAN communication unit 20 enters the operation phase.

[0033] During operation, the CAN communication unit 20 mainly completes the data communication between the processing unit 10 and each slave device 30.

[0034] For example, the CAN communication unit 20 periodically combines the data from each CAN slave device received from the two CAN communication interfaces and the CAN communication unit status information according to communication time parameters, and then sends them to the processing unit 10. Upon receiving this data, the processing unit 10 immediately replies with corresponding data. After receiving the reply data from the processing unit 10, the CAN communication unit 20 decomposes the data and sends out the data corresponding to the two CAN communication interfaces separately. Communication between the CAN communication unit 20 and the processing unit 10 is implemented via Ethernet. During the operation phase, it is periodic communication to maintain the connection between the two parties. If the communication times out, the CAN communication unit 20 switches from the operation phase to the configuration phase and re-requests configuration information from the processing unit 10.

[0035] Please see Figure 1 In one embodiment of the present invention, the CAN communication unit 20 includes at least two CAN communication interfaces, each of which is connected to at least one slave device 30.

[0036] Specifically, the CAN communication unit 20 is used to fill the operating status data of the slave device 30 received by each CAN communication interface into the corresponding CAN receive message queue.

[0037] The CAN communication unit 20 is also used to retrieve the running status data from each CAN receive message queue in sequence, and combine each retrieved running status data with the communication status data of the CAN communication unit 20 to form the reporting data.

[0038] For example, when CAN communication unit 20 receives data, the received data is organized and filled into its respective CAN receive message queue during the receive interrupts of the two CAN communication interfaces. In the CAN communication interface receive processing task, the data from the two CAN receive message queues and the CAN communication unit status information are periodically combined according to the communication time parameters, and then sent to processing unit 10 via Ethernet interface.

[0039] Specifically, the CAN communication unit 20 is also used to confirm the corresponding slave device 30 after receiving the control parameter data, store the control parameter data in the CAN transmission message queue corresponding to the slave device 30, and retrieve the control parameter data from the CAN transmission message queue in sequence and encapsulate it into a data packet.

[0040] For example, when CAN communication unit 20 transmits data, in the Ethernet receiving task, the data to be transmitted by the two CAN communication interfaces is organized and split, and then filled into their respective CAN transmission message queues. In the two CAN communication interface transmission processing tasks, the system continuously waits for the corresponding CAN transmission message queue. When the corresponding CAN transmission message queue is reached, the status of the corresponding CAN communication interface's transmission mailbox is immediately checked. If there is an idle mailbox, the data in the CAN transmission message queue is immediately transmitted; otherwise, the CAN transmission mailbox status is checked again.

[0041] Please see Figure 1 In one embodiment of the present invention, the CAN communication unit 20 is further configured to pause detecting the sending mailbox status when there is no idle sending mailbox and the number of detections reaches a preset pause number or a multiple of the pause number, and resume detecting the sending mailbox status after a preset pause duration, and perform waiting-to-send processing on data packets. The preset pause number is less than a threshold number.

[0042] Specifically, when the CAN communication unit 20 detects that all transmitting mailboxes are in a busy state, and during continuous detection, it finds that the current detection count is exactly an integer multiple of the preset pause count, the CAN communication unit 20 actively pauses the detection of the transmitting mailbox status. The preset pause count can be pre-configured according to actual system requirements, for example, set to 10,000 times. When the detection count is an integer multiple of 10,000, 20,000, 30,000, etc., the CAN communication unit 20 no longer continues to continuously detect the transmitting mailboxes, but enters a brief waiting state.

[0043] In this waiting state, the CAN communication unit 20 pauses its attempts to send the current data packet and records the current number of detections. Simultaneously, the CAN communication unit 20 calls the operating system's task delay function to delay for a preset pause duration. The preset pause duration is typically set to a short, fixed time, such as one millisecond. During this period, the CAN communication unit 20 releases its access to process resources, allowing other low-priority processing tasks to execute, thus preventing a decline in overall system response performance due to continuous idle detection.

[0044] When the preset pause duration expires, the CAN communication unit 20 automatically exits the waiting state and resumes detecting the transmit mailbox status. At this time, the CAN communication unit 20 checks again for an available transmit mailbox. If an available transmit mailbox becomes available after the pause, the CAN communication unit 20 immediately sends the current data packet to the corresponding slave device 30 through that mailbox, completing the data transmission. If no available transmit mailbox is found, the CAN communication unit 20 continues the previous detection loop, repeating the process of pausing detection, waiting for the preset duration, and resuming detection when the number of subsequent detections reaches an integer multiple of the preset pause count. In this way, the CAN communication unit 20 performs a waiting-to-send process on the current data packet, ensuring that the data packet is not immediately discarded due to brief bus busyness, and avoiding system lag caused by unlimited idle detection, achieving a reasonable balance between transmission efficiency and system resource utilization.

[0045] Please see Figure 1 In one embodiment of the present invention, the CAN communication unit 20 is further configured to compare the number of detections with a preset threshold number of detections: When the number of detections is greater than or equal to the threshold number, the data packet is discarded and the transmission failure information is recorded; Otherwise, continue to check the sending mailbox status and perform a wait-to-send process on the data packet.

[0046] Specifically, the CAN communication unit 20 continuously compares the current number of detections with a preset threshold number. When the number of detections reaches or exceeds the threshold number, the CAN communication unit 20 determines that the current data packet transmission has failed, discards the data packet, and records the transmission failure information. When the number of detections has not yet reached the threshold number, the CAN communication unit 20 continues to perform the waiting-to-transmit process, including pausing detection when the number of detections is an integer multiple of a preset pause number and resuming detection after the pause duration. All integer multiples of the preset pause number are less than the preset threshold number.

[0047] As can be seen, through this phased processing strategy, the CAN communication system provides ample opportunities for each data packet to be sent, while also setting a clear failure limit to prevent a single data packet from consuming system resources indefinitely, thereby maintaining the overall system operating efficiency while ensuring communication reliability.

[0048] Please see Figure 1 In one embodiment of the present invention, specific numerical limits are set for the number of thresholds, the number of pauses, and the pause duration.

[0049] The threshold number of times is set to a value between 40,000 and 50,000, for example, 50,000 times based on actual engineering experience. The number of pauses is set to 10,000, and the pause duration is set to a value between 1 ms and 2 ms, for example, 1 ms. Specifically, the email status is checked from 0 to 50,000 times, and the duration of any pause without a set pause duration is less than 1 ms.

[0050] When the CAN communication unit 20 detects that all transmit mailboxes are busy and need to continuously wait to transmit, it increments the detection count with each detection of the transmit mailbox status. Whenever the accumulated detection count reaches an integer multiple of 10,000 (i.e., 10,000, 20,000, 30,000, and 40,000), the CAN communication unit 20 actively pauses detection, waits 1ms, and then resumes detection. During this period, process resources are released, allowing other tasks to execute.

[0051] When the number of detections continues to accumulate to 50,000, since 50,000 has reached the threshold limit, the CAN communication unit 20 determines that the current data packet transmission has failed, discards the data packet, and records the transmission failure information. By setting the threshold limit to 50,000 times, the pause count to 10,000 times, and the pause duration to 1ms, the CAN communication system can effectively balance the sufficiency of transmission attempts and the timeliness of system response in high-load communication scenarios. It provides each data packet with a maximum of 50,000 detection opportunities, while inserting a 1ms active wait every 10,000 times to prevent long-term process occupation from causing overall performance degradation.

[0052] The CAN communication system proposed in this embodiment can flexibly and efficiently configure the communication interface characteristics of multiple CAN communication units 20. Under high load CAN communication, it can realize the efficient and reliable transmission of a large amount of data. It has the advantages of wide applicability, high compatibility, and applicability to all standard CAN protocol devices.

[0053] Please see Figure 2 The present invention also proposes a data processing method for a CAN communication system, which is applied to a wind turbine. The wind turbine includes multiple slave devices, and the data processing method includes the following steps.

[0054] Step S10: Receive the operating status data of the slave device through the CAN communication unit, and combine the operating status data with the communication status data of the CAN communication unit to form the reporting data.

[0055] Step S20: The processing unit judges the communication status data in the reported data, and when it is confirmed that the communication status data is normal, it generates control parameter data based on the running status data and the preset control target data.

[0056] Step S30: The control parameter data is formed into a data packet through the CAN communication unit, and the status of the transmission mailbox inside the CAN communication unit is detected.

[0057] Step S40: When there is an idle send mailbox, send the data packet to the slave device through the idle send mailbox.

[0058] Step S50: Otherwise, continue to check the sending mailbox status and compare the number of checks with the preset threshold number of checks, and perform preset sending exception handling based on the comparison result.

[0059] Therefore, it can be seen that CAN communication under high load can achieve efficient and reliable transmission of large amounts of data, and has wide applicability and high compatibility.

[0060] Please see Figure 3 In one embodiment of the present invention, the present invention also proposes a fan, including the CAN communication system, extended communication unit 21, RS communication unit 22, Profibus communication unit 23, IO interface, RS slave device 32, and Profibus slave device 33 described above.

[0061] Specifically, the wind turbine includes at least one pitch control unit among its multiple slave devices. As one of the core actuators of the wind turbine, the pitch control unit receives control parameter data, such as blade angle adjustment commands, from the CAN communication system via the CAN bus, and adjusts the blade angle accordingly to achieve power control and speed protection of the wind turbine. Simultaneously, the pitch control unit also reports its own operating status data, such as current blade angle, motor temperature, and fault codes, to the CAN communication system via the CAN bus, forming a complete closed-loop control link.

[0062] Of course, in addition to the pitch unit, the wind turbine may also include other types of slave equipment such as yaw unit and braking unit, among which the pitch unit is the key slave equipment 30.

[0063] The engineering station 100 is connected to the processing unit 10 and is used to send preset control target data, such as target values ​​for wind turbine blade angle or rotational speed, to the processing unit 10. It also receives wind turbine operating status information reported by the processing unit 10, enabling maintenance personnel to monitor the wind turbine's operating status and configure parameters in real time. Based on the control target data sent by the engineering station 100 and the operating status data obtained from the CAN communication system, the processing unit 10 generates control parameter data and then sends it to each slave device 300 via the CAN communication system.

[0064] In summary, this invention proposes a CAN communication system and its data processing method, as well as a wind turbine. First, the CAN communication unit receives operating status data from each slave device and combines this data with the communication status data from the CAN communication unit to form corresponding reported data. Second, the processing unit judges the communication status data in the reported data and, if the communication status data is confirmed to be normal, generates control parameter data based on the operating status data and preset control target data. Then, the CAN communication unit also forms the control parameter data into data packets and detects the status of the internal transmission mailbox: when an idle transmission mailbox exists, the data packet is sent to the slave device through the idle mailbox; otherwise, the transmission mailbox status is continuously monitored, and the number of monitoring iterations is compared with a preset threshold number. Based on the comparison result, preset transmission anomaly handling is executed. Therefore, under high-load CAN communication, efficient and reliable transmission of large amounts of data can be achieved.

[0065] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A CAN communication system, characterized in that, The system is used in wind turbines, which include multiple slave devices, and the CAN communication system includes: The CAN communication unit is connected to multiple slave devices via a CAN bus. It is used to receive the operating status data of each slave device and combine the operating status data of each slave device with the communication status data of the CAN communication unit to form corresponding reporting data. The processing unit is used to judge the communication status data in the reported data, and when the communication status data is confirmed to be normal, to generate control parameter data based on the operation status data and the preset control target data; The CAN communication unit is also used to form control parameter data into data packets and detect the status of its internal transmission mailbox. When an idle send mailbox is available, the data packet is sent to the slave device through the idle send mailbox; Otherwise, continuously monitor the sending mailbox status and compare the number of checks with a preset threshold number of checks, and perform preset sending exception handling based on the comparison result.

2. The CAN communication system according to claim 1, characterized in that, The CAN communication unit is also used to pause the detection of the sending mailbox status when there is no idle sending mailbox and the number of detections reaches a preset number of pauses or a multiple of the number of pauses, and to continue detecting the sending mailbox status after the preset pause duration is reached, and to perform waiting to send processing on the data packets.

3. The CAN communication system according to claim 2, characterized in that, The CAN communication unit is also used to compare the number of detections with a preset threshold number of detections: When the number of detections is greater than or equal to the threshold number, the data packet is discarded and a transmission failure message is recorded. Otherwise, continue to check the sending mailbox status and perform a wait-to-send process on the data packet.

4. The CAN communication system according to claim 3, characterized in that, The threshold number of times is 40,000 to 50,000, the number of pauses is 10,000, and the pause duration is 1ms to 2ms.

5. The CAN communication system according to claim 1, characterized in that, The CAN communication unit includes at least two CAN communication interfaces, and each of the CAN communication interfaces is connected to at least one of the slave devices.

6. The CAN communication system according to claim 5, characterized in that, The CAN communication unit is also used to fill the running status data of the slave device received by each CAN communication interface into the corresponding CAN receive message queue. The CAN communication unit is also used to retrieve running status data sequentially from each CAN receive message queue, and combine each retrieved running status data with the communication status data of the CAN communication unit to form reporting data.

7. The CAN communication system according to claim 5, characterized in that, The CAN communication unit is also used to confirm the corresponding slave device after receiving the control parameter data, store the control parameter data in the CAN transmission message queue corresponding to the slave device, and retrieve the control parameter data from the CAN transmission message queue in sequence and encapsulate it into a data packet.

8. A data processing method for a CAN communication system, characterized in that, The data processing method is applied in a wind turbine, which includes multiple slave devices, and includes: The system receives operating status data from slave devices via the CAN communication unit and combines the operating status data with the communication status data from the CAN communication unit to form reported data. The processing unit judges the communication status data in the reported data, and when it confirms that the communication status data is normal, it generates control parameter data based on the operation status data and the preset control target data. The control parameter data is formed into data packets through the CAN communication unit, and the status of the transmit mailbox inside the CAN communication unit is detected. When an idle send mailbox is available, the data packet is sent to the slave device through the idle send mailbox; Otherwise, continuously monitor the sending mailbox status and compare the number of checks with a preset threshold number of checks, and perform preset sending exception handling based on the comparison result.

9. A fan, characterized in that, It includes the CAN communication system as described in any one of claims 1 to 7 and a plurality of slave devices.

10. The fan according to claim 9, characterized in that, The slave station equipment includes at least a pitch unit.