• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    ModbusTCP Server Real (datatype) Problem

    Mervis
    3
    6
    1048
    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.
    • _
      _andi_ last edited by

      Hi,

      I'm using Mervis RT, setting up a modbustcp slave (also called server). When I add a variable of type real and choose "Identity" as conversion method I get one Int on the bus instead of two. Is this a known issue or am I missing some setup?

      Thanks, Andi

      T 1 Reply Last reply Reply Quote 0
      • T
        tomas_hora administrators @_andi_ last edited by

        Hello @_andi_ ,

        can you please share the project with us? Zip the whole project folder and upload it somewhere if possible so we are clear on what you want to achieve.

        1 Reply Last reply Reply Quote 0
        • _
          _andi_ last edited by

          Hi,

          thats what I'm, doing. Just having the real works fine, adding the int breaks the real.

          0_1548952438398_modbus.PNG

          https://drive.google.com/open?id=1W7ZJpO1MUiSXMdvRWszUj2BQtqj9uxx2

          Thanks, Andi

          Martin Kudláček 1 Reply Last reply Reply Quote 0
          • Martin Kudláček
            Martin Kudláček administrators @_andi_ last edited by

            Hi @_andi_ ,
            the real value is 32bits long, that means it will take two registers, in your example registers 1 and 2. By adding register 2 with variable "int1" you have inadvertently overwrite the half of the previous register. To avoid that, set the starting element of the "int1" to 3.

            1 Reply Last reply Reply Quote 0
            • _
              _andi_ last edited by

              Ah, thanks! I just clicked "add variable" and didn't realise I can / have to actually edit the offset afterwards. Might be worth a feature request to change the gui to automatically check the previous value and adjust the starting element accordingly.

              Martin Kudláček 1 Reply Last reply Reply Quote 0
              • Martin Kudláček
                Martin Kudláček administrators @_andi_ last edited by

                @_andi_ Noted:)

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