Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 4

说到mobus,其寄存器的结构非常特殊,16位的,

这种情况下,有很多初学者犯憷,不知道如何处理了。

特别是对于float,double等类型的,

发送数据,接收数据都很难办。 怎么学习modbus开发呢?除了前面推荐的清华出版的书籍之外,

现在推荐一个非常好用的工具:

http://www.binaryconvert.com/

提供各种数据类型的16进制和十进制之间的转换:


Online Binary-Decimal Converter
 
This converter allows you to convert numbers from decimal format to binary format and from binary format to decimal format. It supports the main variable data types used in most programming languages. It also floating point numbers (single and double precision) according to the standard IEEE754. Supported types are shown in the following table:
 
   
 
TYPE BITS MINIMUM MAXIMUM DECIMAL FORMAT  
               
  Unsigned char 8 0 255 Integer  
               
  Signed char 8 -128 127 Integer  
               
  Unsigned short 16 0 65535 Integer  
               
  Signed short 16 -32768 32767 Integer  
               
  Unsigned int 32 0 4294967295 Integer  
               
  Signed int 32 -2147483648 2147483647 Integer  
               
  Float (IEEE754) 32 -3.4028E+38 3.4028E+38 Real number  
               
  Double (IEEE754) 64 -1.7977E+308 1.7977E+308 Real number  
 
     
 
How to convert from decimal to binary?
 
Enter the number in decimal form in the corresponding field. For floating-point numbers, the following formats are valid:

128001.5766
1.280015766E5
  Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 4_第1张图片
       
The result is shown on the next page both in hexadecimal and in binary. Each bits is represented by a square (green = 1, gray = 0). The closest decimal value that can be represented by this binary expression is also shown in the field "Most accurate representation".   Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 4_第2张图片
 
How to convert from binary to decimal?
 
Enter the number in hexadecimal form or in binary form in the corresponding field.   Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 4_第3张图片
       
A bit can be toggled by clicking on the corresponding square.   Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 4_第4张图片
       
The decimal value is shown. For display purpose, the number of figures is limited to 30. However, all computations are performed with full precision without any rounding.   Modbus软件开发实战指南 之 开发自己的Modbus Poll工具 - 4_第5张图片

你可能感兴趣的:(Modbus)