• 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

    meta data scripting - execution and setting

    Scripting general Discussion
    2
    5
    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.
    • D
      diesel
      last edited by

      Using latest Mango version.
      I have a BACnet device that reports data, then I essentially copy that data into a meta data point to run a script to scale its value. I do the same for both inputs and outputs.
      One of my points takes data, and has an event handler so if it exceeds a value, the event is triggers and sends a binary value to the meta data point. The value of the point does change but does not run it's script and therefore the scaled value does not get sent to the BACnet.

      When a meta data point is changed, shouldn't the script within execute? It will only run when I force it in Data Point Details (refresh counterclockwise arrow thingy).

      If the script isn't supposed to execute, do you have any ideas on how to make it run when the meta data point value changes, or maybe a better way to approach how to scale BACnet data with event handlers?

      Thanks

      1 Reply Last reply Reply Quote 0
      • MattFoxM
        MattFox
        last edited by

        You're approaching this wrong. The script of a meta point or a scripted datasource only fires if either two conditions are met:

        1. The timer set on it fires.
        2. The context points attached to the script trigger a context fire if they are ticked.

        You're using a meta data point and am merely setting its value, not triggering a script execution.
        I suggest you use the event to set a point value and make it run the script instead of setting the meta data point value. That way you'll trigger firing your script to send values back to your bacnet gear.

        Fox

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 0
        • D
          diesel
          last edited by diesel

          @MattFox sort of confused. How do I use the event to set a point value and trigger the script vs setting the meta data point value?
          just not following what you mean..

          1 Reply Last reply Reply Quote 0
          • D
            diesel
            last edited by

            ok i think i now understand (maybe). Do you mean that within the meta data point script, that adding itself as an external context point?
            This seems to work partially. When the event gets triggered, it changes the meta point value but does not run the script. I try to add it from the external context point list but then it throws an error when trying to get the meta data point value.

            1 Reply Last reply Reply Quote 0
            • MattFoxM
              MattFox
              last edited by MattFox

              No under events, there are different options when an event is triggered. Email, set point value, run external process,excel report, report -> Set to Set point

              0_1588719567472_37111905-6df3-4a4d-9517-ecc005345019-image.png

              Then add the same context points you use in your meta data source script, the target point being what you normally send data down via your meta point -> your bacnet point
              0_1588719872037_f3b3a482-cc29-48d8-b750-bba905e47814-image.png

              Set to scripted action:
              0_1588719807643_3a5049d0-c017-4c45-9847-f52f9577c7ff-image.png

              0_1588719910803_f280e672-942f-4e1c-bacc-1e7208828d47-image.png
              Input the same code you would for your meta datapoint script and return the value that the bacnet point should receive.

              This will then fire when the event is triggered.

              Do not follow where the path may lead; go instead where there is no path.
              And leave a trail - Muriel Strode

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