• 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

    Setting Several Data Points at once

    How-To
    3
    36
    11.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.
    • MattFoxM
      MattFox
      last edited by

      AngularjS only.
      Also, ensure you have set permissions for those points if you are logged in as someone other than admin.
      Also if it's a binary point you may need to send a true/false instead.

      That's a guess from the issues you are having

      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
      • R
        Rodrigo
        last edited by

        Thanks for the immediate response!

        I tried everything "One", "1", "ON" (this is the way the text is rendered), without success.
        It was the true/false, as you stated!

        Thanks Matt!

        Best,
        Rodrigo

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

          Anytime :)

          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
          • R
            Rodrigo
            last edited by

            Hi,

            I have managed to set a couple of binary data points by using <ma-get-point-value>, as follows:

            <div>
            <ma-get-point-value point-xid="DP03_CS01_UMABAS013" point="myPoint1"></ma-get-point-value>
            <ma-get-point-value point-xid="DP03_CS01_UMABAS012" point="myPoint2"></ma-get-point-value>
            <ma-get-point-value point-xid="DP03_CS01_UMABAS011" point="myPoint3"></ma-get-point-value>
            <ma-get-point-value point-xid="DP03_CS01_FCBAS009" point="myPoint4"></ma-get-point-value>
            <ma-button ng-click="myPoint1.setValue(false);myPoint2.setValue(false);myPoint3.setValue(false);myPoint4.setValue(false)" raised="true" palette="primary" label="ON" icon="power_settings_new" hue="hue-1"></ma-button>
            <ma-button ng-click="myPoint1.setValue(true);myPoint2.setValue(true);myPoint3.setValue(true);myPoint4.setValue(true)" raised="true" palette="warn" label="OFF" icon="power_settings_new" hue="hue-3"></ma-button>
            

            Now, how to do the same with 100 points?
            Based on what @Matt said, I understand I should create a watch list with this points and then use ma-watch-list-get, instead of 100 lines of ma-get-point-value.
            The problem, How should the watch list be created? there are several options for this (can it be a static watch list?), Also, how to use ma-watch-list-get? I have tried everything that came to my mind (which is not a lot), without success.

            Thanks!
            Best,
            Rodrigo

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

              If you need to do that many, use an RQL query to pull all of the points and set them in a scripted datasource in a loop

              OR

              Write an angularJS Controller and use the mango api to set them all in one go

              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
              • CraigWebC
                CraigWeb
                last edited by

                If you are going to need to be setting 100 data points I would consider using a scripting data source. Create a single Binary point in the scripting data source and add the 100 data points to the CONTEXT. Then write a loop in the script that sets all the context points to the value of the Binary points. On your dashboard, you then just set the scripting data source binary point.

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

                  Thanks Craig

                  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
                  • R
                    Rodrigo
                    last edited by

                    Thanks guys!

                    Will give this a try and let you know how it goes.

                    Best,
                    Rodrigo

                    1 Reply Last reply Reply Quote 0
                    • R
                      Rodrigo
                      last edited by

                      Hi guys,

                      A question regarding the method @CraigWeb described, will this also work for the Advanced Scheduler?
                      Or should I enter all those points separately in the scheduler?

                      Best,
                      Rodrigo

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

                        Yes it will work since the advanced scheduler can be used to run a script on fire.

                        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
                        • R
                          Rodrigo
                          last edited by

                          Thanks Mr. Fox!

                          Rodrigo

                          1 Reply Last reply Reply Quote 0
                          • R
                            Rodrigo @CraigWeb
                            last edited by

                            @craigweb
                            Hello guys, would you be able to provide some more help on how to write this loop?

                            Thanks,
                            Rodrigo

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

                              for (var pnt in CONTEXT_POINTS) {
                                   this[pnt].set(1);
                                }
                              

                              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
                              • R
                                Rodrigo
                                last edited by

                                Hi Matt,

                                You are alway ready to help! Thanks for that.
                                I am not bening able to understand how to do this, I have created the Scripting Data Source and added to it, External Context Points (from other Data Sources), this points are the ones that turn devices ON or OFF. Like this
                                Screenshot_1.png

                                Then, I created the Binary data point with this properties
                                Screenshot_2.png
                                Screenshot_3.png

                                Would you be so kind of expanding your previous reply a little more with this data?

                                Thanks in advance.
                                Best,
                                Rodrigo

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

                                  Add all your modbus context points, PLUS one virtual datapoint that is settable. Make the virtual point the context point for firing. All other context points must not be ticked for firing the script.

                                  Put inside the for loop:

                                  if(this[pnt].xid==virtualpointxid){continue;}
                                  this[pnt].set..
                                  
                                  

                                  Dont want the script point to set the virtual point and make it fire itself again.

                                  Thus when the virtual point in the context is set, the script will run.
                                  If using an advanced scheduler, make it set that virtual point when it shifts from low to high.

                                  Hope that enlightens you

                                  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
                                  • R
                                    Rodrigo
                                    last edited by

                                    thanks Matt, but I am not able to understand how to make it work :(

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

                                      ok I shall write a complete solution for you tonight. Dont know what time it is where you are but I shall assemble it all for you later today.

                                      Fox

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

                                      R 1 Reply Last reply Reply Quote 0
                                      • R
                                        Rodrigo @MattFox
                                        last edited by

                                        @mattfox
                                        Really! Awesome, do not worry about the time, here is 19:21 (March 5) now.
                                        Paraguayan time.
                                        I could read it later tonight or even tomorrow and try to apply it.

                                        Thanks a lot!

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

                                          11:34 AM here NZDT.

                                          Ill have something here for you by breakfast :)

                                          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
                                          • R
                                            Rodrigo
                                            last edited by

                                            You are the best!

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