• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Data format conversion with meta data source

    User help
    2
    5
    2.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      alberto
      last edited by

      Hi all,

      I have a problem.
      How can I convert a value (x.value) into format IEEE 32 float?
      I have not found an example in the help to make a script, can someone please give me a hand?

      Thank you very much.

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        Values are stored internally as such anyway. But you can do things like this:

        var d = 3;
        return java.lang.Double.doubleToRawLongBits(d);
        

        This returns the bits of the FP value in a long integer.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • A
          alberto
          last edited by

          I'm sorry.

          I have not explained well.
          My problem is this:
          I have two word type 2 byte unsigned integer (for example, x.value and y.value) and I get a variable 32 IEEE float.
          How can I achieve this by writing a script in a meta data source?

          thank you very much

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            Still not sure i understand, but maybe you need something more like this: Float.intBitsToFloat()

            If not, maybe you can post an example of exactly what x and y are, and what you need them to become.

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • First post
              Last post