Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Modbus
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Modbus RTU === Modbus RTU (Remote Terminal Unit), which is the most common implementation available for Modbus, makes use of a compact, binary representation of the data for protocol communication. The RTU format follows the commands/data with a [[cyclic redundancy check]] checksum as an error check mechanism to ensure the reliability of data. A Modbus RTU message must be transmitted continuously without inter-character hesitations. Modbus messages are framed (separated) by idle (silent) periods. Each byte (8 bits) of data is sent as 11 bits:<ref name="Drury2009" />{{Sfn|MODBUS over Serial Line protocol|2006|p=12|ps=}} * 1 start bit * 8 bit data/message, least significant bit sent first * 1 bit parity * 1 stop bit The default is even parity, while odd or no parity may be implemented as additional options.{{Sfn|MODBUS over Serial Line protocol|2006|p=12|ps=}} A Modbus RTU frame then will be:{{Sfn|MODBUS over Serial Line protocol|2006|p=13|ps=, "2.5.1.1 MODBUS Message RTU Framing"}} {| class="wikitable" style="float:middle; margin:0 0 1em 1em;" !Slave address !Function Code !Data !CRC |- |1 byte |1 byte |0 β 252 bytes |2 bytes: 1 CRC low byte and 1 CRC high byte |} The CRC calculation is widely known as CRC-16-MODBUS, whose polynomial is ''x''<sup>16</sup> + ''x''<sup>15</sup> + ''x''<sup>2</sup> + 1 (normal hexadecimal algebraic polynomial being <code>8005</code> and reversed <code>A001</code>).{{Sfn|MODBUS over Serial Line protocol|2006|p=39|ps=}} Example of a Modbus RTU frame in hexadecimal: <code>01 04 02 FF FF B8 80</code> (CRC-16-MODBUS calculation for the 5 bytes from <code>01</code> to <code>FF</code> gives <code>80B8</code>, which is transmitted least significant byte first). To ensure frame integrity during the transmission, the time interval between two frames must be at least the transmission time of 3.5 characters, and the time interval between two consecutive characters must be no more than the transmission time of 1.5 characters.{{Sfn|MODBUS over Serial Line protocol|2006|p=13|ps=, "2.5.1.1 MODBUS Message RTU Framing"}} For example, with the default data rate of 19200 bit/s, the transmission times of 3.5 (t3.5) and 1.5 (t1.5) 11-bit characters are: <math>t3.5 = 3.5*\left( \frac{11*1000}{19200} \right)= 2.005 ms</math> <math>t1.5 = 1.5*\left( \frac{11*10^6}{19200} \right)= 859.375 \mu s</math> For higher data rates, Modbus RTU recommends to use the fixed values 750 ΞΌs for t1.5 and 1.750 ms for t3.5.{{Sfn|MODBUS over Serial Line protocol|2006|p=13|ps=, "2.5.1.1 MODBUS Message RTU Framing"}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)