• 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 4 Documentation Website Mango 5 Documentation Website Radix IoT LinkedIn

    How to get total alarm number of a data source?

    Scheduled Pinned Locked Moved Mango Automation general Discussion
    4 Posts 3 Posters 1.9k Views 3 Watching
    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.
    • Y Offline
      youland1900
      last edited by

      For example, there is a data source has 20 data points, I want to know how many data points' value are out of range, any scripts for that?

      1 Reply Last reply Reply Quote 0
      • F Offline
        Fabier
        last edited by

        I mean that you can use the scripting and evaluated differentents data points. How the scripting is the Data source you can asociate data points with a counter the number the data point original that is out range.

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

          Hi youland1900,

          As @Fabier suggested, you can use a scripting data source for this purpose, running on either a cron or on an update from one point on the polling data source you wish to check this on. You can add all the points to the context or you can query for them, like,

          var dataSourcePoints = DataPointQuery.query('eq(dataSourceXid,DS_1234)');
          var totalOutOfRange = 0;
          for(var k = 0; k < dataSourcePoints.length; k+=1) {
            //isOutOfRange() not provided
            if(dataSourcePoints[k].runtime !== null && isOutOfRange(dataSourcePoints[k].runtime.value))
              totalOutOfRange+=1;
          }
          outputPoint.set(totalOutOfRange); //some point in context to set the result to
          
          1 Reply Last reply Reply Quote 0
          • Y Offline
            youland1900
            last edited by

            Thank you! I am working on it. By the way, are there any scripts to read the highlimit or lowlimit of a certain XID?

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post