• 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

    event detection scripting

    Scripting general Discussion
    2
    5
    2.9k
    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.
    • Matteo CusmaiM
      Matteo Cusmai
      last edited by

      Hi all,
      can I set a datapoint trough Meta Data Point?

      I have tried to set datapoint getting value from meta data point variable (my) but it seems no work.
      This is the code:

      LOG.fatal("before if: " + my.value);
      p399.set('f');
      return my.value;

      Is it possible to manage this kind of logic?

      Regards,
      Matteo.

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

        Hi Matteo,

        No, only scripting data sources can call set(). In a scripting data source things like

        p1.set(p2.value);
        

        are supported. The trade off with scripts is that they execute on cron only, so once per second is the most often it will run.

        If you need to use a single input to determine what to set a particular point, you can use a point link. The variable name for the source point is 'source' and simply "return" the value you wish the target to be set to.

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

          ...but you could use a meta point computing a value from multiple inputs, returning that as its value, and a point link using the meta point as a source and setting the target point.

          Or you could put a 'set point' event handler on a change event detector on the meta point if it's a static value or the value of the meta point you need to set to the control point. There are lots of options.

          1 Reply Last reply Reply Quote 0
          • Matteo CusmaiM
            Matteo Cusmai
            last edited by

            Hi Phil,
            Thanks for the quick answer.
            There is some documentation about point links?

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

              There is the help (?) within Mango for the Point Links and there are a couple examples around the forum: http://infiniteautomation.com/forum/search/"point link"?in=titlesposts&sortBy=timestamp&sortDirection=desc&showAs=posts

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