Design of Floating Point Data Transmission Based on Modbus-RTU Protocal
To solve the problem of holding registers not being able to directly transfer high-precision floating-point numbers in the Modbus-RTU communication protocol,a common body data structure is designed,which defines joint variables,shares floating-point numbers with corresponding storage arrays in the same memory space.The sender transmits floating-point numbers using floating-point binary code,and the receiver reads the values within these 4 bytes in floating-point format,achieving the floating-point number transmission design of the Modbus-RTU protocol.This method has undergone multiple data transmission tests and can simultaneously send multiple floating-point numbers with different accuracies,making data transmission simple and efficient.This method can be applied to communication systems that require the use of Modbus RTU protocol for multiple floating-point data transmission with different accuracies.
Modbus-RTUtemperature PIDfloating point data transmissioncommon body data structureIEEE 754 specification