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

    Modbus RTU multiple read

    Modbus RTU
    modbus rtu passive
    2
    8
    846
    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.
    • A
      Apollo
      last edited by cechurat

      I'm trying to read data from a device and to make things more efficient I wanted to use the INHEXD function blocks. But regardless of what I do, every two consecutive blocks are always showing the same values.
      Am I doing something wrong here...?
      If I remove (see below screenshots) the first line which starts at address 10 (holding registers) then the data for the block (which starts at address 26) is shown correctly. Shifting places in the table also doesn't change this behavior.
      If I limit the first block to 15 readings then it is working but then I'm missing off course the last reading.

      Is there a better way to read larger blocks (+16 readings)?

      23907401-196a-40dc-8269-d39e39a6f4cc-image.png

      5e40bcc0-63c7-48fb-b803-b68e87d2b3dc-image.png

      1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat
        last edited by

        Hi Kris,

        thanks for your question on Modbus RTU. The behaviour you are observing is strange if the two screenshots belong together. I was trying to replicate the issue on my test bench but without any success so far.

        I suggest to use passive option (for doc see: https://www.rexygen.com/doc/ENGLISH/MANUALS/MbDrv/MbDrv_ENG.html#x1-190003.3). It means that you can read large group of registers (up to 125) at one time and divide it to several meaningful parts which are tagged as Passive. See following screenshot:

        d40d7534-82b9-4ab1-adcb-28e709c172f5-image.png

        This means that Modbus provides 24 registers at one time and these are divided internally into smaller groups or individual registers.

        Can you try it out, please?

        Cheers,
        Tomas

        A 1 Reply Last reply Reply Quote 0
        • A
          Apollo @cechurat
          last edited by

          @cechurat

          I got this error message... Am I missing something?

          1099f18a-4169-4c24-9156-2b077655446f-image.png

          cechuratC 1 Reply Last reply Reply Quote 0
          • cechuratC
            cechurat @Apollo
            last edited by

            @apollo Hi Kris, the issue is Item Address in 1st row - why is it 5754? It should be probably 1 according to the passive items.

            Cheers,
            Tomas

            A 1 Reply Last reply Reply Quote 0
            • A
              Apollo @cechurat
              last edited by

              @cechurat

              Because the chunk of data I want to read is located at register 405755, thus address 5754 for the holding registers.

              I was thinking that the addresses in the passive ones are relative to the big block of registers from the first line. If I start the first passive one with 5754 and start counting from that point it is accepted and no more fault message.

              But I still need to test it in reality.....

              cechuratC 1 Reply Last reply Reply Quote 0
              • cechuratC
                cechurat @Apollo
                last edited by

                @apollo I see. I was not really clear. Item Addresses are all absolute - passive or active. Therefore you can have more passive items (e.g. same slave - different register range or another slave).

                Please, let me know if it works for your setup which was not earlier.

                One more question - what is your Modbus Slave device?

                Kind Regards,
                Tomas

                A 1 Reply Last reply Reply Quote 0
                • A
                  Apollo @cechurat
                  last edited by Apollo

                  @cechurat A InteliDrive DCU Marine from Comap. For testing purpose, we used the normally already occupied serial port (RS232) together with a NPort MOXA 5150A. On the REXcontrol PC we installed the RealCom driver to map the tty port.

                  But after some testing I am suddenly not able to communicate with the device anymore. Don't know why...but I guess that it has something to do with the RealCom tty port...

                  7a02c966-8db8-4402-84ee-295bbf66e50b-image.png

                  I am still waiting for an additional communication card so I can use Modbus TCP directly...... I don't want to spend too much time on setting this Modbus RTU communication up as it will not be what we will be using in the future.....

                  cechuratC 1 Reply Last reply Reply Quote 0
                  • cechuratC
                    cechurat @Apollo
                    last edited by

                    @apollo I understand. Just keep in mind that the Passive feature is available both at Modbus RTU and Modbus TCP.

                    Kind Regards,
                    Tomas

                    A 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.