• 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

    How to divide or multiply a SNMP Value

    How-To
    2
    13
    2.8k
    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.
    • J
      Jorge Gonzalez
      last edited by

      some controllers send values that are wrong, because the value came without decimal point, just we have two options:
      Divide for 10 or multiplicate for 0,1
      0_1544558407938_SNMP value without scale.png
      Please i need the script expresión to get the real value

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

        Hi Jorge,

        Is that point on the SNMP data source as a numeric data point? If so, there is a multiplier on the point's edit page:

        0_1544559717689_forumSnmpMultiplicand.png

        If this is a meta point as relates to your other thread, you should be able to just add a multiplier into the script your wish to have this apply to, as with the multiply-by-20 you requested in the other thread.

        1 Reply Last reply Reply Quote 0
        • J
          Jorge Gonzalez
          last edited by

          Phii, I check it, but is Multistate
          0_1544560626905_Snmp Multistate.png
          In the other thread, tha value is alphanumeric.

          please Your support

          Thanks in advance

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

            Change the data type to Numeric, then.

            1 Reply Last reply Reply Quote 0
            • J
              Jorge Gonzalez
              last edited by

              I will check, but its not Numeric0_1544564581208_SNMP Gauge.png

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

                The data type is the type in Mango. The Write Type could still be set to gauge and still permit you to set it (and it would transform it back with the multiplier and augend on the way out). So, it being Numeric will only affect things in Mango.

                1 Reply Last reply Reply Quote 0
                • J
                  Jorge Gonzalez
                  last edited by

                  Phil, I change the type to numeric, i lost the values...0_1544565722588_SNMP Gauge to numeric.png

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

                    Something else is going on there. You would have been clearly warned that you would lose the point value history of the multistate point when you changed it to numeric. Perhaps that could be improved.

                    But it sounds like those points are not polling. Do you have any events relating to this?

                    1 Reply Last reply Reply Quote 0
                    • J
                      Jorge Gonzalez
                      last edited by

                      Hello, Phil. I check it and the integers work as numeric but gauge didnt work as numeric
                      0_1544640518896_SNMP Gauge and numeric.png
                      Coudl I make a meta data source and add a script that divide in 10 or multiply for 0.1???

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

                        Hmm. And no events about why it's not working?

                        Yes you can definitely make a meta point and transform the value that way.

                        1 Reply Last reply Reply Quote 0
                        • J
                          Jorge Gonzalez
                          last edited by

                          see it please, now i change again from numeric type to multistate type. now is working0_1544645824168_Alphanumeric Value_last.png
                          Please could You tellme how to make a script.

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

                            Please check for a related event on the events page.

                            Doesn't seem like the actual polling for data would be different for the different data types, The only part that is very concerned with the data type of the point is the variableToValue and valueToVariable functions but both of those should be able to handle a Gauge and Numeric. I shared with you the variableToValue function before: https://forum.infiniteautomation.com/topic/3887/snmp-host-testing

                            Please could You tellme how to make a script.

                            Create a meta data source. Create a meta data point. Add the point you wish to divide by 10 into context,

                            return p.value / 10; //where p is the variable name of the context point
                            
                            1 Reply Last reply Reply Quote 0
                            • J
                              Jorge Gonzalez
                              last edited by

                              Thanks so much, with Your script, now it is working... it is the most important thing, because the customer is testing this Scada platform.

                              Soon We will start checking what happen with this controller and them kind of SNMP Data.
                              Again, thanks for Your support

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