• 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 identify the date of a returned value?

    Scripting general Discussion
    2
    6
    1.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.
    • P
      Phillip Weeks
      last edited by

      This returns a (CW.past(MINUTE,backcounter).maximumValue) correctly...
      I would like to know how to examine the timestamp on this pointvalue?

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

        Hi Phillip,

        Have a look at the .maximumTime property, https://help.infiniteautomation.com/about-mango-java-script/

        1 Reply Last reply Reply Quote 0
        • P
          Phillip Weeks
          last edited by

          thanks got it

          1 Reply Last reply Reply Quote 0
          • P
            Phillip Weeks
            last edited by

            Phil I am trying to use the new functionality of the meta recalculation. purge a timeperiod and recalc. I recall you saying the script process will now log an entry when it finishes, is this in 3.3 now?

            I am trying to recalc a 1 day period and I check purge the data beforehand.
            but the process seems to hang even on a short 1 day meta recalculation
            with this script; It runs fine in simulation mode... any ideas what could be causing this?

            var LITERS_LAST_5MIN;
            if (CW.past(MINUTE,5).delta === Number.NaN){
            LITERS_LAST_5MIN = 0;
            } else {
            LITERS_LAST_5MIN = CW.past(MINUTE,5).delta;
            }
            return LITERS_LAST_5MIN;

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

              Yes, debug log messages were added for completion and checked exceptions. If there is a Logger in your Mango/classes/log4j2.xml for
              com.serotonin.m2m2.meta.MetaEditDwr (or one of the parent packages). at debug level? Try adding this below the other <Logger/> tags and reloading your Log4J configuration on in the Log4J Reset section of the system settings.

              <Logger name=" com.serotonin.m2m2.meta.MetaEditDwr" level="debug"/>
              

              Edit: No offhand I don't know what's going on there. You may be able to see the point values have been deleted, and then you can watch them regenerate.

              1 Reply Last reply Reply Quote 0
              • P
                Phillip Weeks
                last edited by Phillip Weeks

                something screwy about this new history purge feature. I made a mistake entering the end date when I ran the first time and it created records back to 1969.

                0_1516390980443_bbdbd51f-58e3-4567-86d7-fbdba57debbb-image.png

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