title: How to convert a modbus 32-bit word to a C# float?
body: <p>how to convert modbus 32 bit word  into a float point  in c#?</p>
  
  <p>here is the code I have :</p>
  
  <pre><code>float Modbus_Floating(byte[] temp)
      {
          byte[] temp2 = new byte[4];
          temp2[0] = temp[3];
          temp2[1] = temp[2];
          temp2[2] = temp[1];
          temp2[3] = temp[0];
  
          float f = System.BitConverter.ToSingle(temp, 0);
  
          return f;
      }
  </code></pre>
  
  <p>it is not working,
  I am getting a big negative number
  I should get 36.7</p>
  
  <pre><code>    [0] 102 byte
      [1] 102 byte
      [2] 66  byte
      [3] 22  byte
  </code></pre>
  
  <p>but I am not getting that ..
  why ?</p>