Argos Modbus Register Addressing

Hi, I am wondering if I could get an explanation of the Modbus register addressing that is used by Argos.

I’m using Modbus RTU via the RS485 port, and I have found that all of my addresses are one less than what I specified when I set up the Template for my device (100 becomes 99, 201 becomes 200, etc.)

I was initially getting mixed results with a lot of errors and bogus-looking data, so I attached a sniffer and discovered that all of my addresses were off by one. Everything works fine if I add one to all of my addresses, but that hardly seems to be an acceptable solution.

I am aware of the confusion surrounding the use of “Standard Modbus” register types and offsets (40001 offset for holding registers), but since you have us specify the register type separately I don’t see why this would be an issue. My guess is that an underlying library uses those offsets and the wrong offset is being added (40000 instead of 40001). In any case, it is producing the wrong addresses according to my understanding of the modbus spec. The “data address” of 100 should correspond to register number 400001, which should use function codes 0x03 to read and 0x06 to write with address 100.

I’m evaluating the EC350 in comparison with some other IoT routers to determine what my company will use in the future for monitoring our own products during field trials, and it will be difficult to recommend this product with an issue like this (unless there is a reasonable explanation).

Hello @wolft01,

Sorry for the delayed response we have been very busy the last few days. I will need to double check this to be certain. We maybe only using a 40000 offset.

As for the data address example. I am not sure that is 100% correct. Data address of 0 should correspond to holding register 40001. If we are using only a 40000 offset it would seem we could be off by one.

Deryck

Thanks, I was mainly worried that I somehow didn’t get my post into the system. I definitely understand being busy :wink:

You are correct, I meant to say that 100 corresponds to 40101 (oops).

At any rate, it would have to be some internal use of the address offsets by your software stack, because the interface on Argos uses the more sensible register type and data address approach. I just bring up the offsets because that is the only logical explanation I can think of for my off-by-one addresses.

Modbus addressing has definitely been a continual point of confusion for our own products. Some PLCs only support the “Standard” addressing scheme, which causes confusion when we list data addresses in our manuals.

I am interested to see what you find on this.

Thanks

Has there been any action on this? It is looking like the ec350 is our top contender at the moment, so I’d like to have some kind of an answer when I propose this as our solution.

Thanks

Hello @wolft01,

Sorry, I thought I had responded to this a while ago.

The data modal followed by Argos is:

Coils-read/write 00001-09999
Discrete inputs – read only 10001-19999
Input registers – read only 30001-39999
Holding registers – read/write 40001-49999

In Argos, the addressing format is “1-based”
But the addresses are also stripped of the leading digit.

Therefore, 400101 becomes 101

It is possible that the addresses of your device are 0-based (starting to count from 0)
Where the address 400101 in your device will become 102.

This not always clear in the PLC/Device documentations
The best practice is to use a first reference address and check how the Netbiter can read it and adapt the addressing.

Deryck

No worries.

I believe I actually have the opposite problem to what you describe. When I input into Argos to read holding register 100 I see a Modbus request for register 99 (observed directly on the RS-485 line with a USB Modbus sniffer). I believe the key is that you say you use 1-based addressing format, while other sources describe a 0-based format.

A good (and high-ranking on google) reference that we use is: http://www.simplymodbus.ca/FAQ.htm#Stored. The coil/register numbers are 1-based and use the full address with offset for register type, while the data addresses range from 0 to 270E. The tools I have used either ask for the full coil/register number, or they ask for the register type (or function code) and its 0-based data address.

The modbus spec itself doesn’t actually talk about the “standard” numbering scheme at all (with the 10,000 offsets). It does say in section 4.4 of the Modbus Application Protocol V1.1b that “In a MODBUS PDU each data is addressed from 0 to 65535”, but then immediately after that it states that “In the MODBUS data Model each element within a data block is numbered from 1 to n.” I interpret this as meaning that data “addresses” are 0-based, but element “numbers” are 1-based, but you could probably argue either way as to what a register’s address is referring to.

My personal theory is that you guys take the “100” that I put into Argos and add an offset of 40000 to it when I specify that it is a holding register. You then pass 40100 to the Modbus library you are using, which subtracts 40001 to obtain the data address of 99, which is then sent to the RS-485 line.

One thing I have not tried in Argos is to specify “holding register” but use the full element number (40101). If that works then I would be happy to go about addressing in that way on Argos. I will try that and report back when I get my setup active again.

Thanks,
-Tom

Hello @wolft01,

Here are some screen shots of the example I set up using a Anybus X gateway and a Netbiter. I wrote to the first memory location on the gateway which maps to 400001 then read it using the Netbiter.

image

image

image

Hey Deryck,

Thank you for the example. I think it is looking more like this confusion is just a result of the poor standardization of Modbus addressing from various tool and product vendors. I did some more searching for anyone willing to take a definitive stance on this issue, and found the following on this site (https://www.csimn.com/CSI_pages/Modbus101.html)

image

I think point d) is describing this exact problem, and they (Control Solutions) are using the same convention that you guys are using with register type and 1-based “register number”. This convention is one that I was not aware of until now. I might suggest that you guys put some notes similar to point d) in your documentation, especially since the field in your parameter configuration is labeled as “Address”.

I have worked with some of our manufacturing engineers using Allen-Bradley PLCs that forced the Modicon standard 40101 format, and I have also worked with one of our test engineers using NI Labview that used the register type and 0-based data address format. The python libraries that we use for our internal tools use register type and 0-based register address as well. Our products at Franklin Electric specify 0-based data addresses for the registers in our documentation.

Thank you for working through this with me. Hopefully this thread will help others in the future if they have questions with addressing.

Also, I just wanted to say that this is probably the best technical support forum software that I have used. The interface is great and easy to use.

Thanks again,
-Tom

1 Like

Hi Tom,

That doc does do a really good job explaining the issue thank you for sharing it I think this post will come in handy to many people.

Point d is what I was trying to explain when saying we use “1-based”. As simple as Modbus is this “off by 1” issue can be a hassle. You make a good point regarding how we label it as an address I will pass this on to the documentation team.

Glad to see you like our support forum! Have a great weekend and let us know if you have any further questions.

Deryck