The invention discloses a communication protocol
conversion method of a
hydrogen energy
cogeneration system, and belongs to the field of communication technology conversion in the
hydrogen energy industry. Hardware such as a CAN receiving and transmitting module, a protocol conversion unit and a 485 receiving and transmitting module is needed for supporting, and the protocol
conversion method is applied to the protocol conversion unit. The method comprises the following steps: analyzing and splitting a received CAN protocol frame at a
software level, extracting a frame ID and specific protocol content, and forming an address, a
function code and protocol content of a
Modbus RTU frame according to a field protocol method; similarly, in the scene of converting the
Modbus RTU protocol into the CAN protocol, firstly, the address, the
function code and the specific content in the
Modbus RTU protocol are analyzed, and the Modbus RTU protocol frame is redistributed according to the format size of the CAN frame. According to the invention, stable transmission and conversion of an
application layer protocol between the CAN protocol equipment and the 485 protocol equipment can be realized, and
cooperative work between the equipment can be realized.