GSK72 (Customer) asked a question.

BRX Modbus RTU Illegal Data Address

Hi, I have been trying to read from data from this sensor. I am running into an issue where I can read some of the registers and not all of them. The register I am most interested in is the concentration (Address 101). I am using the ModBus I/O scanner. I can see the range (address 103). When I add in address 101, the ModBus I/O scanner monitor says that is an illegal address. Here is a screenshot of the data sheet the part relating to the concentration:

{97BF3D98-3C98-46BE-B760-18DF75CF1296}Here is how I have it set up in the Modbus I/O scanner:

{06E09116-2D25-44A5-A5E4-9D6C5F6544B1} 

There is something I have not set up correctly. Any help would be great!


  • HOST_franji1 (HOST Engineering)

    It may be the old off-by-one issue with Modbus addressing.

     

    The Offset in the product table may be the PACKET offset, which is 1 less than the Application Layer offset.

     

    So Application Layer for Input Register 30101 on the wire becomes FC 04, offset 100 on the wire. This is not a valid address for your device.

     

    So just try adding 1 to every Application Layer offset in Do-more.

     

    Change 103 to 104 (30104 becomes 103 on-the-wire, that matches the manual)

    Change 120 to 121 (30121 becomes 120 on-the-wire, that matches the manual)

    Change 101 to 102 (30102 becomes 101 on-the-wire, that matches the manual)

     

    I am guessing it's the 3rd one that was causing the error, but the other two were wrong too, because they would be reading a "valid" offset, but the WRONG ONE 😁

     

    Designer ALWAYS references Modbus Addresses as the Application Layer Address or the Application Layer Offset (e.g. 30101 and 101), never the "on-the-wire" packet address.

     

    Some manuals break out the addresses in both Application Layer form and in on-the-wire Hex Offset form. However, it appears your product does JUST the on-the-wire offset in Decimal form.

     

    Even if the error goes away, PLEASE verify that the VALUES appear correct for the SPECIFIC registers you are looking at. You may try doing the "plus 1" on a version value or something you definitely (e.g. 107 SW Version, so Designer 108, or 113 HW Version, so Designer 114, to be sure my "plus 1" prognosis is correct).

    Expand Post
    Selected as Best
  • HOST_franji1 (HOST Engineering)

    Gotta love Modbus. Sometimes you need to add 1 to map it to a Modbus Address Offset. Try 102.

     

    Also, are you sure it's an Input Register and not a Holding Register? 3xxxx vs. 4xxxx

     

    Do you have a link to the .pdf where that table is? There may be good details about what they mean by "Address". If I had a dime for every Modbus off-by-one issue, I'd be set. 😁

    Expand Post
      • HOST_franji1 (HOST Engineering)

        The first page of the Modbus table shows that it is for Function Code 04, READ INPUT REGISTERS, which at the Application Layer is addresses 30001 and up.

         

        You need to change all your Do-more Comm requests to READ INPUT REGISTERS. I noticed that you are improperly using READ INPUTS 10312-10313 (these are discrete inputs, FC not supported by your device). You need to change that comm group to Read Input REGISTERS at offset 312. Also, you should only read just 1 register, not 2 (there is no register 313 in that system).

         

        Similarly you have a READ HOLDING REGISTERS 40101-40102. This needs to be changed to Read INPUT Registers 30101-30102 (offset 101). Similarly, you need to change your comm requestion to only read 1 register not 2 (there is no register at offset 102).

         

        Make sure you do NOT attempt to read any Input Registers that do not exist in your device (look at that table to see these "holes" I reference). You have to break up your Read Input Register comm group to include ranges of valid offsets only (don't go past the end, don't include "missing" offsets in a range).

        Expand Post
      • GSK72 (Customer)

        Hi, so I tried what you told me to, (note: I don't need registers 312, I was checking something else) it still gives me an invalid data address:

        {BA9EE9F1-A61C-45BE-AA77-0E36DBA9DB8B}Is there something that I am missing?

        Expand Post
  • HOST_franji1 (HOST Engineering)

    It may be the old off-by-one issue with Modbus addressing.

     

    The Offset in the product table may be the PACKET offset, which is 1 less than the Application Layer offset.

     

    So Application Layer for Input Register 30101 on the wire becomes FC 04, offset 100 on the wire. This is not a valid address for your device.

     

    So just try adding 1 to every Application Layer offset in Do-more.

     

    Change 103 to 104 (30104 becomes 103 on-the-wire, that matches the manual)

    Change 120 to 121 (30121 becomes 120 on-the-wire, that matches the manual)

    Change 101 to 102 (30102 becomes 101 on-the-wire, that matches the manual)

     

    I am guessing it's the 3rd one that was causing the error, but the other two were wrong too, because they would be reading a "valid" offset, but the WRONG ONE 😁

     

    Designer ALWAYS references Modbus Addresses as the Application Layer Address or the Application Layer Offset (e.g. 30101 and 101), never the "on-the-wire" packet address.

     

    Some manuals break out the addresses in both Application Layer form and in on-the-wire Hex Offset form. However, it appears your product does JUST the on-the-wire offset in Decimal form.

     

    Even if the error goes away, PLEASE verify that the VALUES appear correct for the SPECIFIC registers you are looking at. You may try doing the "plus 1" on a version value or something you definitely (e.g. 107 SW Version, so Designer 108, or 113 HW Version, so Designer 114, to be sure my "plus 1" prognosis is correct).

    Expand Post
    Selected as Best
    • GSK72 (Customer)

      What fixed the issue was the "plus 1" to all of the addresses. The sales rep was able to get tech support to confirm that is what the issue was also right after you posted your response.

      Thanks!