• 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

    Mango 1.13.0 Modbus Data Source issue

    Mango feedback
    5
    10
    6.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.
    • S
      Sergii
      last edited by

      Try these steps:

      1. Create Modbus Serial data source
      2. Create numeric point as Holding Register and 2 byte signed integer
      3. Make this point writable
        4. Set multiplier to 0.1 for this point

      Isuue:
      Try to write 12.7 to this point. Actually written value is 126 (instead of 127).
      I think problem is in method setPointValue() of class ModbusDataSource.

       
          ...
                 if (dataPoint.getDataTypeId() == DataTypes.NUMERIC) {
                      double convertedValue = valueTime.getDoubleValue();
                      convertedValue -= pl.getVO().getAdditive();
                      convertedValue /= pl.getVO().getMultiplier();
                      modbusMaster.setValue(ml, convertedValue);
                  }
          ...
      
      

      convertedValue gets 126.99999999999999. Fractional part of this value gets lost in method modbusMaster.setValue().

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        A rounding feature has been added to Modbus4J. This should be available in the next version of Mango.

        Best regards,
        Matthew

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

          the next private version of mango u mean :wink:

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            Not what i mean at all.

            Best regards,
            Matthew

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

              so why the latest version of mango is kept private ? where can i find the source code of the version 1.13.0 since it's GPL ?

              1 Reply Last reply Reply Quote 0
              • M
                mlohbihler
                last edited by

                There are some business-side changes to Mango that are being discussed. Stay tuned for details.

                Best regards,
                Matthew

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

                  we hope that these "business-side changes " things don't affect the licence (GPL) !! and we're tuned for details as well :)
                  thanks for the quick feed back mate;)

                  1 Reply Last reply Reply Quote 0
                  • T
                    treidan
                    last edited by

                    any ideas why does modbus datapoints gain fraction of its value when multiplier is set to 0.1?

                    I've tested this by having a datapoint with multiplier of 1 and it stays the same all the time.
                    When multiplier is set to 0.1 the value gets added like 0.000000002 sometimes. Funny thing is that it doesnt happen all the time.
                    Meta point with just script that adds multiplier of 0.1 to datapoint with multiplier of 1 stays in one decimal at all times.

                    what goes wrong?

                    1 Reply Last reply Reply Quote 0
                    • F
                      florri
                      last edited by

                      I've been playing with Dallas one wire sensors etc for sometime as they are reasonably cheap. The end plan is to control the house heating system intelligently. Currently we have a standard two zone system with a boiler.

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