• 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

    Calculation using ^ (to the power of) in a Meta Data Point

    User help
    2
    4
    1.2k
    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.
    • S
      Steve-O
      last edited by Steve-O

      Hi peeps, I am struggling to create a meta data point with a (^) to the power of in its formula.

      The formula being used in excel is = (610.7*10^((7.5x23)/(237.3+23))/1000)
      which returns = 2.8 (Correct answer)

      The ^ means 'To the power of'
      The 23 is my Temp

      After some attempts to get the calculation working using Math.pow I decided to try a simple formula Math.pow(2, Temp) and it returns NAN where if I use 23 Instead of Temp it returns 8388608. So I'm guessing its the Math.pow conflicting with external data points (Temp)

      Could someone please help get a valid calculation working in script that returns the 2.8 I'm trying to achieve ;-)

      Kind Regards and thanks in advance.

      1 Reply Last reply Reply Quote 0
      • ThomasEinastoT
        ThomasEinasto
        last edited by

        @steve-o said in Calculation using ^ (to the power of) in a Meta Data Point:

        (610.7*10^((7.5x23)/(237.3+23))/1000)

        Steve, what is your temp variable? Is it the name of your variable? Then you should use this:

        (610.7*Math.pow(10,((7.5*temp.value))/(237.3+23))/1000) 
        

        Following works as it should on math pow

        (610.7*Math.pow(10,((7.5*23))/(237.3+23))/1000) 
        // returns 2.808825816730143
        
        S 2 Replies Last reply Reply Quote 1
        • S
          Steve-O @ThomasEinasto
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • S
            Steve-O @ThomasEinasto
            last edited by

            @thomaseinasto Thanks Thomas , I made a silly mistake in the Calc, Its working as expected now. Cheers mate

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