• 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

    Run time for a data point

    User help
    2
    3
    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.
    • D
      Desmond
      last edited by

      Hi All,

      I want to keep track the run time of a data point since it has enabled. Then render the value in DD:HH format on the dashboard. It should be accumulative value. I have searched through the data points array but did not find any properties relevant to achieve my task.

      Any help or advise will be appreciated. Thanks

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

        Hi Desmond,

        You can achieve this with a Meta point. The meta point would execute on a cron pattern like 0 * * * * ? (every minute) with the script

        if(RuntimeManager.isDataPointEnabled("DP_Xid"))
          return my.value + 1; //my is the variable name of the meta point
        return 0;
        

        Then you'll have to convert this to hours and minutes on the dashboard. Something like,

        <ma-get-point-value point-xid="DP_Xid" point="runtimePoint"></ma-get-point-value>
        {{runtimePoint.value / 60 | number:0}}:{{runtimePoint.value % 60 | number:0 | maPad:2}}
        
        1 Reply Last reply Reply Quote 0
        • D
          Desmond
          last edited by

          Hi All,
          Mango is so sweet!
          I've got it which run perfectly and display out in the dashboard as per my requirement.
          Thank you once again for the prompt reply.

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