REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Solved Read and Write Modbus register on HMI

    Modbus RTU
    2
    4
    697
    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.
    • R
      RexPeter
      last edited by

      Re: Read/Write Modbus

      With reference to the link above, what would be the approach to read the actual value of a register and to use the same "entry box" to write a new value to that same register (if it is possible at all).
      I'm considering something to use a flag checking if "read value" is equal to the "entry field value" in the HMI.
      But maybe I make it to complicated.

      Looking forward for feedback on this.

      Regards,
      Peter

      Modbus_register_read_and_write.JPG

      R 1 Reply Last reply Reply Quote 0
      • R
        reitinge @RexPeter
        last edited by

        @rexpeter
        Hi Peter,
        you can use the refresh_from atribute from the Input component, as shown in the picture bellow.
        f4e2f495-c155-41aa-a8a4-00ad4ba7dfc1-image.png
        The value atribute (Input_W in my example) will be assigned to CNI100:icn parameter and the refresh_from (Input_R in my case) atribute to the MBM__readReg:value.
        1c3c9b0f-2e08-4e43-a236-447b83fa1768-image.png

        I think this should work for you.

        Cheers,
        Jan

        R 1 Reply Last reply Reply Quote 0
        • R
          RexPeter @reitinge
          last edited by

          @reitinge
          Hi Jan,

          Sorry for a delay in responding to you, but this was the perfect working solution. Thank you very much for that!

          Regards,
          Peter

          R 1 Reply Last reply Reply Quote 0
          • R
            reitinge @RexPeter
            last edited by

            @rexpeter
            Hi Peter,
            no problem. I'm glad, it's works.

            Cheers,
            Jan

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

            This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

            There is also an outdated REXYGEN community forum.

            Powered by NodeBB.