• 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

    Modbus data processing

    User help
    2
    8
    4.6k
    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.
    • H
      hck333
      last edited by

      Hi,

      I'm trying to set a sensor network using modbus data sources. I've runned into some problems regarding data processing.

      It seems that mango isn't reacting to different Multiplier / Additive settings in "Modbus locator properties". I've tried restarting, disabling/enabling of a point and nothing seemed to help.

      The second problem I've figured out is in the "Modbus data type" setting. Even if I set it to "2 byte unsigned integer" the data are processed as *signed.

      For example: input data 0xFFF0 --> reads as -16

      Is there some solution for this or I'm doing something wrong?

      Radek

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

        Hi Radek,

        Thanks for pointing out these problems. They are in fact bugs that have now been fixed and will be in an incremental release that we will make available soon (probably within a week or so).

        In particular, the multiplier/additive fields were not actually implemented in the data source; this has now been corrected. Numeric values read from the Modbus network will be multiplied and added to. Numeric values that are set in the network will be divided and subtracted from. Note that for the latter case the number that is set by the user will be logged even if that is not the actual number that the network accepts (e.g. fractional values that are discarded by integer registers.)

        The data type conversion problem was caused by the Modbus library due to missing "& 0xff" operations. This too has been fixed.

        Watch for release 0.8.1 for these fixes and other minor changes.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • H
          hck333
          last edited by

          Thanks for a reply, I'm glad to help improving Mango :-)

          If you have time, please look on another problem I've found out.

          Imagine I have a light bulb and a light switch. Light switch is implemented via modbus holding register (write only) and a light bulb is represented as modbus input register (read only). I have also a light sensor connected as modbus input register (read only).

          Then I set an event handler : if a light sensor value is below 'X' switch on the light. If above some value 'Y' switch it off.

          If I'm switching a light manually with writing '0' or '1' to holding register, everything is working. But the change caused by event handler isn't processed. The number related to holding register changes, but the event isn't send to modbus master.

          Regards,
          Radek

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

            Hi Radek,

            Nice catch. The set point handler was calling an incorrect API to update the point value. I've attached a patch which should fix the problem for you. Please let me know if it does. Just overwrite the existing class files with the one in the zip.

            Attachment: download link

            Best regards,
            Matthew

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

              BTW, that patch will likely only work with version 0.8.1. Make sure you upgrade first before you install it.

              Best regards,
              Matthew

              1 Reply Last reply Reply Quote 0
              • H
                hck333
                last edited by

                It needs longer testing, but for now I can say it's ok.

                Multiplication / addition and also events are processed fine. Thanks!

                Radek

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

                  Glad to hear. Thanks for the feedback Radek.

                  Best regards,
                  Matthew

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