Query, Response, Data formats – Basler Electric BE1-700 Modbus Protocol User Manual
Page 23: Floating point data format (fp), Data formats -13, Floating point data format (fp) -13, Table 1-3. floating point format
![background image](https://www.manualsdir.com/files/773805/content/doc023.png)
9376700991 Rev D
BE1-700 Modbus™ Protocol
1-13
Preset Single Register (Write Single Holding Register)
A Preset Single Register query message requests a single register to be written. The BE1-700 will
perform the write when the device address is the same as the BE1-700's remote address.
Data will cease to be written if any of the following exceptions occur:
Query
•
Queries to write to Read Only registers result in an error response with Exception Code of Illegal
Data Address.
•
A query to write an unallowed value (out of range) to a register results in an error response with
Exception Code of "Illegal Data Value.”
Device Address
Function Code =
06 (hex)
Address Hi
Address Lo
Data Hi
Data Lo
CRC Hi error check
CRC Lo error check
The response message echoes the Query message after the register has been altered.
Response
Data Formats
BE1-700 data varies from one to four bytes in length. Single byte data resides in the holding register
least-significant byte with the most-significant byte set to zero. Floating point data and long integer data
(each 32-bits in length) place the two most-significant bytes in the higher holding register address of the
associated register pair.
Floating Point Data Format (FP)
The Modbus floating point data format uses two consecutive holding registers to represent a data value.
The first register contains the low-order 16 bits of the following 32 bit format:
•
MSB is the sign bit for the floating point value (0 = positive).
•
The next 8 bits are the exponent biased by 127 decimal.
•
The 23 LSBs comprise the normalized mantissa. The most-significant bit of the mantissa is
always assumed to be 1 and is not explicitly stored, yielding an effective precision of 24 bits.
The value of the floating point number is obtained by multiplying the binary mantissa times two raised to
the power of the unbiased exponent. The assumed bit of the binary mantissa has the value of 1.0, with
the remaining 23 bits providing a fractional value. Table 1-3 shows the floating point format.
Table 1-3. Floating Point Format
Sign
Exponent +127
Mantissa
1 bit
8 bits
23 bits
The floating point format allows for values ranging from approximately 8.43X10-37 to 3.38X1038. A
floating point value of all zeroes is the value zero. A floating point value of all ones (not a number)
signifies a value currently not applicable or disabled.
Example: The value 95,800 represented in floating point format is hexadecimal 47BB1C00. This number
will read from two consecutive holding registers as follows:
Holding Register
K (Hi Byte)
hex 1C
Value
K (Lo Byte)
hex 00
K+1 (Hi Byte)
hex 47
K+1 (Lo Byte)
hex BB