Fan protocol switching method, equipment and system
Through the fan protocol switching method, the number of bytes in the message information is used to determine and establish a communication connection, so as to achieve compatibility between Modbus and ebmBUS protocols, solve the problem of high difficulty in developing the EBM fan upper computer control program, and improve the fan industry Integration and application flexibility in control systems.
Patent Information
- Application Number
- CN202411731881.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The ebmBUS protocol used by the existing EBM fans is incompatible with the widely used Modbus protocol, which makes it difficult to develop the upper computer control program, high learning cost, and complex debugging and troubleshooting, which limits the integration and application of the fan in industrial control systems.
Through the fan protocol switching method, the communication protocol used by the upper computer is determined by the number of bytes in the message information, the corresponding communication connection is established, and data conversion is performed, so that the fan can be compatible with the Modbus and ebmBUS protocols, and the upper computer and the fan are realized by the upper computer and the fan. communication between.
It reduces the difficulty of developing the EBM fan upper control program, improves the integration and application flexibility of the fan in industrial control systems, and simplifies the debugging and troubleshooting process.
Smart Images

Figure CN119211377A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of fan purification technology, and specifically to a fan protocol switching method, device and system. Background Art
[0002] Germany's ebm-papst Group is a world-leading manufacturer of fans and motors. Its EBM fans are widely used in the FFU (Fan Filter Unit) field of the purification industry and are deeply trusted by owners.
[0003] Existing EBM fans only communicate with the host computer based on the non-standard ebmBUS protocol. This non-standard protocol limits the flexibility and scalability of technicians in fan control to a certain extent. However, technicians have a deeper understanding and rich practical experience in the standard Modbus communication protocol.
[0004] Therefore, on the basis of the existing situation, the inventors of this application have found the following problems: the ebmBUS protocol used by existing EBM fans is incompatible with the widely used Modbus protocol, resulting in high learning costs and technical barriers for technicians when developing host computer control programs; the non-standard ebmBUS protocol lacks sufficient public information and development tool support, which makes the development process of the control program complicated and increases the difficulty of debugging and troubleshooting; in actual applications, due to the popularity of the standard Modbus protocol, many existing industrial control systems and host computer software support the Modbus protocol, while the non-standard ebmBUS protocol limits the integration and application of EBM fans in these systems.
[0005] In summary, when developing a control program for a host computer based on the non-standard ebmBUS protocol, the technical complexity is high and implementation is difficult.
[0006] Therefore, how to reduce the difficulty of developing the host computer control program for the EBM fan has become a technical problem that needs to be solved urgently. Summary of the invention
[0007] In view of the above problems, the embodiments of the present application provide a wind turbine protocol switching method, device and system for solving the problem of high difficulty in developing a host computer control program for the wind turbine in the prior art.
[0008] According to one aspect of an embodiment of the present application, a method for switching a wind turbine protocol is provided, the method comprising: receiving message information sent by the host computer in response to a communication request of the host computer; reading the number of message bytes of the message information; determining whether the number of message bytes is a first number; if the number of message bytes is the first number, establishing a first communication connection with the host computer, the first communication connection being a communication connection based on a first communication protocol; receiving first communication data based on the first communication protocol sent by the host computer; converting the first communication data into second communication data based on a second communication protocol; and sending the second communication data to the wind turbine.
[0009] Preferably, if the number of bytes in the message is the first number, after establishing the first communication connection with the host computer, the wind turbine protocol switching method also includes: receiving third communication data based on the second communication protocol sent by the wind turbine; converting the third communication data into fourth communication data based on the first communication protocol; and sending the fourth communication data to the host computer.
[0010] Preferably, the wind turbine protocol switching method also includes: if the number of message bytes is not the first number, establishing a second communication connection with the host computer, the second communication connection being a communication connection based on the second communication protocol; receiving fifth communication data based on the second communication protocol sent by the host computer; and forwarding the fifth communication data to the wind turbine.
[0011] Preferably, if the number of bytes of the message is not the first number, after establishing the second communication connection with the host computer, the wind turbine protocol switching method further includes: receiving sixth communication data based on the second communication protocol sent by the wind turbine; and forwarding the sixth communication data to the host computer.
[0012] According to another aspect of the embodiment of the present application, a wind turbine protocol switching device is also provided, and the wind turbine protocol switching device includes a first RS485 chip, a microcontroller unit MCU and a second RS485 chip; the first RS485 chip is electrically connected to the MCU, and is used to respond to a communication request of a host computer, receive message information sent by the host computer, and send the message information to the MCU; the MCU is used to receive the message information, read the number of message bytes of the message information, and determine whether the number of message bytes is a first number. If the number of message bytes is the first number, the first RS485 chip is controlled to establish a first communication connection with the host computer, and the first communication connection is a communication connection based on a first communication protocol; the first RS485 chip is also used to establish a first communication connection with the host computer, receive first communication data based on the first communication protocol sent by the host computer, and send the first communication data to the MCU; the MCU is electrically connected to the second RS485 chip, and is used to convert the received first communication data into second communication data based on the second communication protocol, and send the second communication data to the second RS485 chip; the second RS485 chip is used to be electrically connected to the wind turbine and send the received second communication data to the wind turbine.
[0013] Preferably, the second RS485 chip is also used to receive the third communication data based on the second communication protocol sent by the wind turbine, and send the third communication data to the MCU; the MCU is also used to convert the received third communication data into fourth communication data based on the first communication protocol when the first RS485 chip and the host computer are connected to each other based on the first communication protocol, and send the fourth communication data to the first RS485 chip; the second RS485 chip is also used to send the received fourth communication data to the host computer; and / or, the MCU is also used to control the first RS485 chip to establish a second communication connection with the host computer if the number of bytes of the message is not the first number, and the second communication connection is a communication connection based on the second communication protocol; the first RS485 chip is also used to perform a second communication connection with the host computer , receiving the fifth communication data based on the second communication protocol sent by the host computer, and sending the fifth communication data to the MCU; the MCU is also used to forward the fifth communication data to the second RS485 chip when the first RS485 chip and the host computer establish a communication connection based on the second communication protocol; the second RS485 chip is also used to send the received fifth communication data to the wind turbine; and / or, the second RS485 chip is also used to receive the sixth communication data based on the second communication protocol sent by the wind turbine, and send the sixth communication data to the MCU; the MCU is also used to forward the sixth communication data to the first RS485 chip when the first RS485 chip and the host computer establish a communication connection based on the second communication protocol; the first RS485 chip is also used to send the received sixth communication data to the host computer.
[0014] Preferably, the fan protocol switching device also includes an operation button; the operation button is electrically connected to the MCU, and is used to respond to the wind speed setting operation, generate a circuit signal corresponding to the wind speed setting operation, and send the circuit signal to the MCU; the MCU is also used to generate a wind speed setting instruction corresponding to the wind speed setting operation based on the received circuit signal, and send the wind speed setting instruction to the second RS485 chip; the second RS485 chip is also used to send the received wind speed setting instruction to the fan to adjust the speed of the fan.
[0015] Preferably, the wind turbine protocol switching device also includes a display component; the MCU is electrically connected to the display component and is also used to generate wind speed display information corresponding to the wind speed setting operation based on the received circuit signal, and send the wind speed display information to the display component; the display component is also used to display the wind speed display information.
[0016] Preferably, the second RS485 chip is also used to receive fault information sent by the fan and send the fault information to the MCU, the fault information including fault type information; the MCU is also used to identify the fault type information in the received fault information, generate fault display information according to the fault type information, and send the fault display information to the display component; the display component is also used to display the fault display information.
[0017] According to another aspect of the embodiment of the present application, a wind turbine protocol switching system is also provided, the wind turbine protocol switching system includes a host computer, a wind turbine protocol switching device and a wind turbine, the wind turbine protocol switching device and the wind turbine establish a communication connection based on a second communication protocol; the host computer is used to send a communication request and message information to the wind turbine protocol switching device; the wind turbine protocol switching device is used to respond to the communication request of the host computer, receive the message information sent by the host computer, read the number of message bytes of the message information, and determine whether the number of message bytes is a first number. If the number of message bytes is the first number, establish a first communication connection with the host computer, and the first communication connection is a communication connection based on the first communication protocol; the host computer is also used to send first communication data based on the first communication protocol to the wind turbine protocol switching device; the wind turbine protocol switching device is also used to receive the first communication data sent by the host computer, convert the first communication data into second communication data based on the second communication protocol, and send the second communication data to the wind turbine; the wind turbine is used to receive the second communication data sent by the wind turbine protocol switching device.
[0018] The embodiment of the present application determines whether the communication protocol used by the host computer is the first communication protocol through the number of message bytes in the message information. When the host computer communicates based on the first communication protocol and the fan communicates based on the second communication protocol, it is necessary to first convert the first communication data based on the first communication protocol sent by the host computer into second communication data based on the second communication protocol, and then send the second communication data to the fan, so that the fan communicating based on the second communication protocol can receive the communication data sent by the host computer communicating based on the first communication protocol, so that in actual use, the host computer can be developed based on the Modbus communication protocol, and the fan communicating based on the ebmBUS protocol can receive the communication data sent by the host computer communicating based on the Modbus communication protocol, thereby reducing the difficulty of developing the host computer control program for the EBM fan.
[0019] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.
[0021] Figure 1 A schematic diagram of the structure of a wind turbine protocol switching system provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of the structure of a wind turbine protocol switching system provided by another embodiment of the present application is shown; Figure 3 A schematic diagram of the structure of a wind turbine protocol switching system provided by another embodiment of the present application is shown; Figure 4 A schematic flow chart of a wind turbine protocol switching method provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0023] The present application is applicable to switching various types of fan protocols, for example, EBM fans and FFU fans. The following describes the embodiments of the present application using the EBM fan as an example.
[0024] See also Figure 1~Figure 4 The wind turbine protocol switching system 1 includes a host computer 30, a wind turbine protocol switching device 10 and a wind turbine 20, wherein the wind turbine protocol switching device 10 and the wind turbine 20 establish a communication connection based on a second communication protocol; the host computer 30 is used to send a communication request and message information to the wind turbine protocol switching device 10; the wind turbine protocol switching device 10 is used to respond to the communication request of the host computer 30, receive the message information sent by the host computer 30, read the message byte number of the message information, and determine whether the message byte number is a first number. If the message byte number is the first number, a first communication connection is established with the host computer 30, and the first communication connection is a communication connection based on the first communication protocol; the host computer 30 is also used to send first communication data based on the first communication protocol to the wind turbine protocol switching device 10; the wind turbine protocol switching device 10 is also used to receive the first communication data sent by the host computer 30, convert the first communication data into second communication data based on the second communication protocol, and send the second communication data to the wind turbine 20; the wind turbine 20 is used to receive the second communication data sent by the wind turbine protocol switching device 10.
[0025] The wind turbine protocol switching device 10 includes a first RS485 chip 110, a microcontroller unit MCU120, and a second RS485 chip 130; the first RS485 chip 110 is electrically connected to the MCU120, and is used to respond to a communication request of the host computer 30, receive message information sent by the host computer 30, and send the message information to the MCU120; the MCU120 is used to receive the message information, read the message byte number of the message information, and determine whether the message byte number is the first number. If the message byte number is the first number, the first RS485 chip 110 is controlled to establish a first communication connection with the host computer 30, and the first communication The connection is a communication connection based on a first communication protocol; the first RS485 chip 110 is also used to establish a first communication connection with the host computer 30, receive first communication data based on the first communication protocol sent by the host computer 30, and send the first communication data to the MCU120; the MCU120 is electrically connected to the second RS485 chip 130, and is used to convert the received first communication data into second communication data based on the second communication protocol, and send the second communication data to the second RS485 chip 130; the second RS485 chip 130 is used to be electrically connected to the fan 20, and send the received second communication data to the fan 20.
[0026] Furthermore, the electronic components inside the wind turbine protocol switching device 10 are connected to an external circuit through a DC module 150 for power supply.
[0027] For EBM type wind turbines, the first communication protocol is the Modbus protocol, and the second communication protocol is the ebmBUS protocol.
[0028] Among them, the ebmBUS protocol is a non-standard communication protocol defined by EBM based on the RS485 communication interface. After decades of improvement and development, based on the principle of upward compatibility, this communication protocol has become very complicated; the Modbus protocol is a serial communication protocol widely used in the field of industrial control, supporting a variety of physical interfaces and data types, including RS-232, RS-485 and Ethernet, etc. The Modbus protocol has been widely used in the field of industrial control due to its openness, flexibility and wide applicability.
[0029] The half-duplex communication standard of RS-485 requires a master-slave communication mode to ensure the order and reliability of data transmission. Therefore, when the devices communicate, the master device (host computer 30) needs to actively initiate communication requests, and the slave device (fan 20) needs to respond to these requests.
[0030] The message format sent by the host computer 30 in accordance with the standard Modbus protocol is: "[machine address] [function code] [starting address high] [starting address low] [register number] [register] [CRC low] [CRC high]", wherein each "[]" contains a byte content, that is, the message byte number of the Modbus message is 8. For EBM type wind turbines, the first number can be set to 8.
[0031] The format of the ebmBUS message sent by the host computer 30 is: "[leader][command+machine address][group address][data 1][data 2][check]", wherein each "[]" contains one byte of content, that is, the ebmBUS message has 6 message bytes.
[0032] Therefore, the fan protocol switching device 10 can determine which communication protocol the host computer uses by analyzing the number of message bytes in the message information sent by the host computer 30, and then automatically convert the switching protocol through the chip program in the MCU120 to determine whether to communicate with the host computer 30 based on the ebmBUS protocol or the Modbus protocol.
[0033] By judging the communication protocol used by the upper computer 30 according to the number of message bytes in the message information, the judgment can be completed quickly and accurately, thereby improving communication efficiency and communication quality.
[0034] For details, please refer to Figure 2 and Figure 3 Preferably, the second RS485 chip 130 is also used to receive the third communication data based on the second communication protocol sent by the fan 20, and send the third communication data to the MCU120; the MCU120 is also used to convert the received third communication data into the fourth communication data based on the first communication protocol when the first RS485 chip 110 and the host computer 30 establish a communication connection based on the first communication protocol, and send the fourth communication data to the first RS485 chip 110; the second RS485 chip 130 is also used to send the received fourth communication data to the host computer 30.
[0035] See also Figure 2If the wind turbine protocol switching system 1 determines that the communication protocol used by the host computer 30 to send data is the Modbus protocol through the number of message bytes, it can be clearly seen that the wind turbine 20 is based on the ebmBUS protocol, and the host computer 30 communicates based on the Modbus protocol, and the wind turbine protocol switching system 1 needs to perform protocol conversion: the wind turbine protocol switching system 1 needs to convert the first communication data based on the Modbus protocol received and sent by the host computer 30 into the second communication data based on the ebmBUS protocol, and then send the second communication data to the wind turbine 20; further, when the wind turbine protocol switching system 1 determines that the communication protocol used by the host computer 30 to send data is the Modbus protocol, the wind turbine 20 generates the third communication data based on the ebmBUS protocol to be sent to the host computer 30, and the wind turbine protocol switching system 1 needs to convert the third communication data based on the ebmBUS protocol received and sent by the wind turbine 20 into the fourth communication data based on the Modbus protocol, and then send the fourth communication data to the host computer 30, so as to realize the communication between the wind turbine 20 and the host computer 30.
[0036] Preferably, the MCU120 is further used to control the first RS485 chip 110 to establish a second communication connection with the host computer 30 if the number of bytes of the message is not the first number, and the second communication connection is a communication connection based on the second communication protocol; the first RS485 chip 110 is further used to establish a second communication connection with the host computer 30, receive fifth communication data based on the second communication protocol sent by the host computer 30, and send the fifth communication data to the MCU120; the MCU120 is further used to forward the fifth communication data to the second RS485 chip 110 when the first RS485 chip 110 is connected to the host computer 30 for communication based on the second communication protocol. S485 chip 130; the second RS485 chip 130 is also used to send the received fifth communication data to the fan 20; and / or, the second RS485 chip 130 is also used to receive the sixth communication data based on the second communication protocol sent by the fan 20, and send the sixth communication data to MCU120; MCU120 is also used to forward the sixth communication data to the first RS485 chip 110 when the first RS485 chip 110 and the host computer 30 establish a communication connection based on the second communication protocol; the first RS485 chip 110 is also used to send the received sixth communication data to the host computer 30.
[0037] See also Figure 3If the wind turbine protocol switching system 1 determines that the communication protocol used by the host computer 30 to send data is the ebmBUS protocol through the number of message bytes, it can be clearly seen that the wind turbine 20 is based on the ebmBUS protocol, and the host computer 30 also communicates based on the ebmBUS protocol, and the wind turbine protocol switching system 1 only performs data forwarding work: the wind turbine protocol switching system 1 forwards the fifth communication data based on the ebmBUS protocol received and sent by the host computer 30 to the wind turbine 20; further, when the wind turbine protocol switching system 1 determines that the communication protocol used by the host computer 30 to send data is the ebmBUS protocol, the wind turbine 20 generates the sixth communication data based on the ebmBUS protocol to be sent to the host computer 30, and the wind turbine protocol switching system 1 forwards the sixth communication data based on the ebmBUS protocol received and sent by the wind turbine 20 to the host computer 30, thereby ensuring normal communication between the wind turbine 20 and the host computer 30.
[0038] After the host computer 30 disconnects the communication connection with the wind turbine protocol switching system 1, the MCU 120 determines that the communication is over and stops. Figure 2 The protocol conversion program shown in the figure is running, or it is stopped as Figure 3 The forwarding program shown is running.
[0039] When the upper computer 30 communicates based on the Modbus protocol through the fan protocol switching system 1, the protocol conversion program can be executed by MCU120 to realize the communication between the upper computer 30 and the fan 20. When the upper computer 30 communicates based on the ebmBUS protocol, the forwarding program can be executed by MCU120 to realize the communication between the upper computer 30 and the fan 20, so that the fan protocol switching system 1 can process the communication signal based on the ebmBUS protocol or the Modbus protocol sent by the upper computer 30, so that the upper computer 30 can communicate with the EBM fan 20 based on the two protocols.
[0040] The existing EBM fan 20 interface module is just a simple module that facilitates users to access 485 signals and 220V power supply. When there is no communication with the host computer 30, it is impossible to set and adjust the speed. In many cases, it will be very inconvenient for users. In order to improve the convenience of user use, preferably, the fan protocol switching device 10 also includes an operation button; the operation button is electrically connected to the MCU120, and is used to respond to the wind speed setting operation, generate a circuit signal corresponding to the wind speed setting operation, and send the circuit signal to the MCU120; the MCU120 is also used to generate a wind speed setting instruction corresponding to the wind speed setting operation according to the received circuit signal, and send the wind speed setting instruction to the second RS485 chip 130; the second RS485 chip 130 is also used to send the received wind speed setting instruction to the fan 20 to adjust the speed of the fan 20.
[0041] The circuit signal generated on the operation button is converted into a wind speed setting instruction by the MCU 120 and sent to the EBM fan 20, thereby changing the state of the fan 20, wherein the wind speed setting instruction may be in the form of a message.
[0042] Specifically, the wind speed setting instructions can refer to: “u8i=FanSpeedDataPor(1,u16SetTargetVal); UartEBMSendValPor(5,0x40,0x35,u8FanReadID,u8FanReadGroup,u8i,0,0)".
[0043] Among them, u16SetTargetVal is the target value for speed setting, for example: 1000, which means 1000 revolutions per minute; u8i is the speed setting value after ebmBUS protocol conversion; u8FanReadID is the target fan ID; u8FanReadGroup is the target fan group ID.
[0044] Preferably, the fan protocol switching device 10 also includes a display component; MCU120, which is electrically connected to the display component, is also used to generate wind speed display information corresponding to the wind speed setting operation according to the received circuit signal, and send the wind speed display information to the display component; the display component is also used to display the wind speed display information so that the user can understand the operating speed of the fan 20.
[0045] The display component may be a 4-digit digital tube or an electronic display screen.
[0046] Preferably, the second RS485 chip 130 is also used to receive fault information sent by the fan 20, and send the fault information to the MCU120, the fault information including fault type information; the MCU120 is also used to identify the fault type information in the received fault information, generate fault display information according to the fault type information, and send the fault display information to the display component; the display component is also used to display the fault display information to facilitate the user to troubleshoot the fault in the fan 20.
[0047] The fault information reported by the fan 20 and received by the MCU 120 can be referred to as follows: "if(u8UartEBMBufRxd[0]==0x51) / / Judge the command word { if(u8UartEBMComm==0x00) { switch (u8UartEBMBufRxd[4]) { case 0: u8UartErr0=u8UartEBMBufRxd[3]; / / Error 1 break; case 1: u8UartErr1=u8UartEBMBufRxd[3]; / / Error 2 break; case 2: u8UartErr2=u8UartEBMBufRxd[3]; / / Error 3 u8DisErrBuff=FanErrPor(); / / Convert to the value displayed by the digital tube break; } } }".
[0048] The embodiment of the present application determines whether the communication protocol used by the upper computer 30 is the first communication protocol by the number of message bytes in the message information. When the upper computer 30 communicates based on the first communication protocol and the fan 20 communicates based on the second communication protocol, it is necessary to first convert the first communication data based on the first communication protocol sent by the upper computer 30 into second communication data based on the second communication protocol, and then send the second communication data to the fan 20, so that the fan 20 that communicates based on the second communication protocol can receive the communication data sent by the upper computer 30 that communicates based on the first communication protocol, so that in actual use, the upper computer 30 can be developed based on the Modbus communication protocol, and the fan 20 that communicates based on the ebmBUS protocol can receive the communication data sent by the upper computer 30 that communicates based on the Modbus communication protocol, thereby reducing the difficulty of developing the upper computer control program for the EBM fan 20.
[0049] According to another aspect of the embodiment of the present application, a wind turbine protocol switching method is also provided, such as Figure 4 As shown, the wind turbine protocol switching method includes: S410 , in response to a communication request from the host computer 30 , receiving message information sent by the host computer 30 .
[0050] S420, reading the number of message bytes of the message information.
[0051] S430, determine whether the number of bytes in the message is the first number. If the number of bytes in the message is the first number, jump to S441 and execute steps S441 to S447; if the number of bytes in the message is not the first number, jump to S451 and execute steps S451 to S455.
[0052] Furthermore, it is also possible to determine whether the number of bytes in the message is the first number or the second number. If the number of bytes in the message is the first number, execute step S441; if the number of bytes in the message is the second number, execute step S451.
[0053] S441, establishing a first communication connection with the host computer 30, where the first communication connection is a communication connection based on a first communication protocol.
[0054] S442, receiving first communication data based on the first communication protocol sent by the host computer 30.
[0055] S443: Convert the first communication data into second communication data based on a second communication protocol.
[0056] S444, sending the second communication data to the wind turbine 20.
[0057] S445 , receiving third communication data based on the second communication protocol sent by the wind turbine 20 .
[0058] S446, converting the third communication data into fourth communication data based on the first communication protocol.
[0059] S447, sending the fourth communication data to the host computer 30.
[0060] S451, establishing a second communication connection with the host computer 30, where the second communication connection is a communication connection based on a second communication protocol.
[0061] S452, receiving fifth communication data based on the second communication protocol sent by the host computer 30; S453 , forwarding the fifth communication data to the wind turbine 20 .
[0062] S454, receiving sixth communication data based on the second communication protocol sent by the wind turbine 20; S455, forwarding the sixth communication data to the host computer 30.
[0063] When the fan protocol switching device 10 establishes communication with the host computer 30 for the first time, S410~S430 needs to be executed to determine the communication protocol used by the host computer 30 during communication through the message information sent by the host computer 30. If it is the second communication protocol, the fan protocol switching device 10 performs data forwarding between the fan 20 and the host computer 30. In the subsequent communication process between the fan 20 and the host computer 30, the fan protocol switching device 10 cyclically executes S452~S455 to realize data forwarding; if the communication protocol of the host computer 30 is a communication protocol, the fan protocol switching device 10 performs data communication protocol conversion between the fan 20 and the host computer 30. In the subsequent communication process between the fan 20 and the host computer 30, the fan protocol switching device 10 cyclically executes S442~S447 to realize data communication protocol conversion.
[0064] The execution of the method embodiments provided in the embodiments of the present application can refer to the execution of the above-mentioned wind turbine protocol switching system 1, which will not be repeated here.
[0065] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned wind turbine protocol switching method embodiment are implemented.
[0066] An embodiment of the present application provides a computer program, which can be executed by a processor to implement the steps in the above-mentioned wind turbine protocol switching method embodiment.
[0067] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in the above-mentioned wind turbine protocol switching method embodiment are implemented.
[0068] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present application described here, and the above description of specific languages is to disclose the best mode of implementation of the present application.
[0069] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0070] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed application requires more features than those explicitly recited in each claim.
[0071] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0072] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A wind turbine protocol switching method, characterized in that: The wind turbine protocol switching method comprises: In response to a communication request from a host computer, receiving message information sent by the host computer; Read the number of message bytes of the message information; Determining whether the number of bytes of the message is a first number; If the number of bytes of the message is the first number, establishing a first communication connection with the host computer, wherein the first communication connection is a communication connection based on a first communication protocol; Receiving first communication data based on the first communication protocol sent by the host computer; Converting the first communication data into second communication data based on a second communication protocol; The second communication data is sent to the wind turbine.
2. The wind turbine protocol switching method according to claim 1, characterized in that: After establishing the first communication connection with the host computer if the number of bytes of the message is the first number, the wind turbine protocol switching method further includes: receiving third communication data based on the second communication protocol sent by the wind turbine; converting the third communication data into fourth communication data based on the first communication protocol; The fourth communication data is sent to the host computer.
3. The wind turbine protocol switching method according to claim 1, characterized in that: The wind turbine protocol switching method also includes: If the number of bytes of the message is not the first number, establishing a second communication connection with the host computer, wherein the second communication connection is a communication connection based on the second communication protocol; Receiving fifth communication data based on the second communication protocol sent by the host computer; The fifth communication data is forwarded to the wind turbine.
4. The wind turbine protocol switching method according to claim 3, characterized in that: After establishing a second communication connection with the host computer if the number of bytes of the message is not the first number, the wind turbine protocol switching method further includes: receiving sixth communication data based on the second communication protocol sent by the wind turbine; The sixth communication data is forwarded to the host computer.
5. A wind turbine protocol switching device, characterized in that: The wind turbine protocol switching device includes a first RS485 chip, a micro control unit MCU and a second RS485 chip; The first RS485 chip is electrically connected to the MCU, and is used to respond to a communication request from a host computer, receive message information sent by the host computer, and send the message information to the MCU; The MCU is used to receive the message information, read the number of message bytes of the message information, determine whether the number of message bytes is a first number, and if the number of message bytes is the first number, control the first RS485 chip to establish a first communication connection with the host computer, where the first communication connection is a communication connection based on a first communication protocol; The first RS485 chip is further used to establish a first communication connection with the host computer, receive first communication data based on the first communication protocol sent by the host computer, and send the first communication data to the MCU; The MCU is electrically connected to the second RS485 chip, and is used for converting the received first communication data into second communication data based on the second communication protocol, and sending the second communication data to the second RS485 chip; The second RS485 chip is used to be electrically connected to the wind turbine and send the received second communication data to the wind turbine.
6. The wind turbine protocol switching device according to claim 5, characterized in that: The second RS485 chip is further used to receive third communication data based on the second communication protocol sent by the wind turbine, and send the third communication data to the MCU; The MCU is further used for converting the received third communication data into fourth communication data based on the first communication protocol when the first RS485 chip is connected to the host computer for communication based on the first communication protocol, and sending the fourth communication data to the first RS485 chip; The second RS485 chip is further used to send the received fourth communication data to the host computer; and / or, The MCU is further configured to control the first RS485 chip to establish a second communication connection with the host computer if the number of bytes of the message is not the first number, wherein the second communication connection is a communication connection based on the second communication protocol; The first RS485 chip is further used to perform a second communication connection with the host computer, receive fifth communication data based on the second communication protocol sent by the host computer, and send the fifth communication data to the MCU; The MCU is further configured to forward the fifth communication data to the second RS485 chip when the first RS485 chip is connected to the host computer for communication based on the second communication protocol; The second RS485 chip is further used to send the received fifth communication data to the wind turbine; and / or, The second RS485 chip is further used to receive sixth communication data based on the second communication protocol sent by the wind turbine, and send the sixth communication data to the MCU; The MCU is further configured to forward the sixth communication data to the first RS485 chip when the first RS485 chip is connected to the host computer for communication based on the second communication protocol; The first RS485 chip is further used to send the received sixth communication data to the host computer.
7. The wind turbine protocol switching device according to claim 5, characterized in that: The wind turbine protocol switching device also includes an operation button; The operation button is electrically connected to the MCU and is used to generate a circuit signal corresponding to the wind speed setting operation in response to the wind speed setting operation, and send the circuit signal to the MCU; The MCU is further configured to generate a wind speed setting instruction corresponding to the wind speed setting operation according to the received circuit signal, and send the wind speed setting instruction to the second RS485 chip; The second RS485 chip is further used to send the received wind speed setting instruction to the fan to adjust the rotation speed of the fan.
8. The wind turbine protocol switching device according to claim 7, characterized in that: The wind turbine protocol switching device also includes a display component; The MCU is electrically connected to the display component and is further used to generate wind speed display information corresponding to the wind speed setting operation according to the received circuit signal, and send the wind speed display information to the display component; The display component is also used to display the wind speed display information.
9. The wind turbine protocol switching device according to claim 8, characterized in that: The second RS485 chip is further used to receive fault information sent by the wind turbine and send the fault information to the MCU, wherein the fault information includes fault type information; The MCU is further used to identify fault type information in the received fault information, generate fault display information according to the fault type information, and send the fault display information to the display component; The display component is also used to display the fault display information.
10. A wind turbine protocol switching system, characterized in that: The wind turbine protocol switching system includes a host computer, a wind turbine protocol switching device and a wind turbine, wherein a communication connection based on a second communication protocol is established between the wind turbine protocol switching device and the wind turbine; The host computer is used to send a communication request and message information to the wind turbine protocol switching device; The wind turbine protocol switching device is used to respond to a communication request of a host computer, receive message information sent by the host computer, read the number of message bytes of the message information, determine whether the number of message bytes is a first number, and if the number of message bytes is the first number, establish a first communication connection with the host computer, wherein the first communication connection is a communication connection based on a first communication protocol; The host computer is further used to send first communication data based on the first communication protocol to the wind turbine protocol switching device; The wind turbine protocol switching device is further used to receive first communication data sent by the host computer, convert the first communication data into second communication data based on a second communication protocol, and send the second communication data to the wind turbine; The wind turbine is used to receive second communication data sent by the wind turbine protocol switching device.
Citation Information
Patent Citations
Modbus protocol-based analysis method, device and system
CN112995133A
Software-defined multi-protocol fusion LoRa gateway device and implementation method
CN114095312A
Communication method and device applied to power system, readable medium and electronic equipment
CN115766895A