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

  • Hi, I am using a binary point for a compressor, and I want to know if is any possibility to extract this data and to trigger an alarm after 1000h of running:

    0_1500280464572_run hours.JPG


  • @georgestefan you can add an event detector to detect if it stays in the same state for x hours but that wont work if the compressor turns off and on obviously. I'm sure there is a way to do what you are asking via scripting. @phildunlap should be able to help you.


  • Hi George,

    There is! Runtime information is available in the StartsAndRuntimes object returned from the past() and previous() functions on data points in scripts.

    So, i could have a meta point like,

    var stats = p.past(DAY); //p is the variable name of the binary point in the context
    for(var k = 0; k < stats.data.length; k+=1) {
        if(stats.data[k].value === true)
            return my.value + stats.data[k].runtime/3600000; //runtime given in milliseconds
    }
    return my.value;
    

    running on a cron like 59 59 23 * * ? and it'll totalize once a day the hours run that day. Then you can put a limit detector on the meta point.


  • Thanks, I'll try this.


  • @phildunlap I've created a meta point like this and when I run the script it shows me the right value, but the limit detector didn't worked

    This is the meta point:
    0_1500921881770_script.JPG

    And I've noticed this in my data base:
    0_1500921925387_point.JPG

    Comp_Run_H it's the meta point from above.
    Can you tel me why I don't have any value returned?


  • This post is deleted!

  • Have you let this run over night? With that cron pattern it should only run on the last second of the day to produce a value.


  • Yes, that's right, at the last second of the day produce that value, I'm starting to see how this is working.
    Thanks again!