• 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

    How to force old not calculated metadata to be calculated ?

    User help
    2
    8
    2.7k
    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.
    • B
      bitelxux
      last edited by

      Hi, I've set some metadata datapoints based on other datapoints, but new metadata is only applied for new datapoints values ...

      How can I force mango to recalculate all allready past existing points medatada ?

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        There is a generate history button on the metapoint in the datasource page. Unfortunately, this button has some known issues associated with it, and may not work quite as expected.

        I believe the best results with that button can be achieved by changing the meta point's update/logging information to be 1. run on context update and 2. log on change.

        1 Reply Last reply Reply Quote 0
        • B
          bitelxux
          last edited by

          :-( can't find that button. Could you please tell me where exactly is suposed to be ?

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            In line with the data point on its data source page. The table should be:
            Name --< Type --> Enable/Disable Button --> Generate History Button --> Edit Point Button

            1 Reply Last reply Reply Quote 0
            • B
              bitelxux
              last edited by

              OK. Im' afraid ScadaBR fork doesn't have this feature :-(

              Thank you !

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                You could theoretically perform this task with a scripting datasource. Say you have a need to generate the last 1000 points...

                1. Add all the context points to your script as you would your meta point.
                2. Write a big for loop, iterate i :
                var dt = new Date();
                
                for(var i = 1; i < 1000; ++i) {
                pnt1 = point1.prev(MINUTE, i).firstValue;
                ...
                pntN = pointN.prev(MINUTE, i).firstValue;
                result = //do work on the pnt values
                meta.set(result, dt.getTime()-(i*60*1000));
                }
                

                and you could just have it get generated in one run of the script. Not pretty, but it should work.

                Note: This is for numeric points. Binaries and multistates would have a different solution.

                1 Reply Last reply Reply Quote 0
                • B
                  bitelxux
                  last edited by

                  It's good workaround. Thankyou

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