Ordering the same bytes in a “C D A B” sequence is known as a “word swap”. When interpreted as an IEEE 744 floating point data type, the result is quite different: For example, ordering the 4 bytes of data that represent 123456.00 in a “B A D C” sequence in known as a “byte swap”. Therefore the most important consideration when dealing with 32-bit data is that data is addressed in the proper order.įor example, the number 123456.00 as defined in the IEEE 754 standard for single-precision 32-bit floating point numbers appears as follows: The affects of various byte orderings are significant. However, the IEEE standard has no clear cut definition of byte order of the data payload. Modbus itself does not define a floating point data type but it is widely accepted that it implements 32-bit floating point data using the IEEE-754 standard. It is within these 4 bytes of data that single-precision floating point data can be encoded into a Modbus RTU message. This implementation settled on using two consecutive 16-bit registers to represent 32 bits of data or essentially 4 bytes of data. Consequently, special considerations were required when implementing 32-bit data elements. The protocol itself was designed based on devices with a 16-bit register length. Such convenience does not come without some complications, however, and Modbus RTU Message Protocol is no exception. In essence, the protocol is the foundation of the entire Modbus network. The protocol itself controls the interactions of each device on a Modbus network, how device establishes a known address, how each device recognizes its messages and how basic information is extracted from the data. The point-to-point Modbus protocol is a popular choice for RTU communications if for no other reason that it’s basic convenience.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |