
The architectural approach of ESP_Modbus includes one level above standard Modbus IO driver. Refer to the Modbus Organization’s with protocol specifications for specifics. The following document (and included code snippets) requires some familiarity with the Modbus protocol. It does not require a checksum calculation, as lower layers already provide checksum protection. Modbus TCP/IP or Modbus TCP - This is a Modbus variant used for communications over TCP/IP networks, connecting over port 502. Modbus ASCII messages are framed by leading colon (“:”) and trailing newline (CR/LF). The ASCII format uses a longitudinal redundancy check checksum. Modbus ASCII - This is used in serial communication and makes use of ASCII characters for protocol communication. The RS-485 interface communication is usually used for this type. Modbus messages are framed (separated) by idle (silent) periods.

A Modbus RTU message must be transmitted continuously without inter-character hesitations. Modbus RTU is the most common implementation available for Modbus. The RTU format follows the commands/data with a cyclic redundancy check checksum as an error check mechanism to ensure the reliability of data. Modbus RTU - This is used in serial communication and makes use of a compact, binary representation of the data for protocol communication.
