IEEE 754 32bit floating point value.


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Adding to the confusion to try and shead some light. You say the number you get back could be 751, which would equal 75.1. how is this sent? is it :
    00000001 01110111, or is it
    00000111 01010001?

    The first being stright binary and the second being packed BCD I will assume the first. Now when you say you need a 32 bit, floating point answer, seems to me there must be some format to this. for instance, does the device you are sending it to expect the decimal to be in any special place? is it good with a 5 place decimal or does it assume 2 place? how does the receiving end expect to see the number? I mean 32 bit for tempreture is a bit much I think, could be 32767.32767 to -32767.32767 degrees! or something like that. Either way I don't want to live there!!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Sep 2008
    Posts
    27


    Did you find this post helpful? Yes | No

    Default

    I used this information to read floats from an AB plc and it worked fine. There is a subroutine for Int to Float.
    http://melabs.com/resources/fp.htm
    Last edited by Cobra_Phil; - 6th December 2010 at 15:23.

  3. #3
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    thanks for the replys everyone,
    Ive been gone for a while and havent had time to suddy it all yet. Ill get back to it.
    Thanks
    Nick

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shawn View Post
    thanks for the replys everyone,
    Ive been gone for a while and havent had time to suddy it all yet. Ill get back to it.
    Thanks
    Nick
    Shawn,

    It looks like we were trying to reinvent the wheel. Everything that you need is provided in the melabs.com link that Cobra_Phil mentions above.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts