Modbus mapping registor reading at register plus 1

R

Thread Starter

rajesh patil

Normally we have seen that data register values are found in address +1 address. For ex.N is data register but the value is available in N+1 data register in Modscan. What is the reason for this type of behaviour?

Is there any document on above query?
 
W
This goes back to the early days of Modbus when it was strictly used for Modicon PLC's where Coil #1 had an address 0000 (Function Call Code 01) and Register 4001 had an address 0000 (Function Call Code 03) a la Modicon 484 PLC. This was probably caused by an intersection of the computer jocks (who start numbering at 0) and the practical people building the PLC, who started numbering stuff at 1 like normal people.

You can find this at www.modicon.org under Technical Support. Look at "MODBUS Over Serial Line FOR LEGACY APPLICATIONS ONLY" then "Data Addresses in Modbus Messages."

You can also see this in the current MODBUS Application Protocol Specification V1.1b3 Section 6.3 at the same website.

Note that not all Modbus implementations out there implement the N +1 addressing.

William (Bill) L. Mostia, Jr. PE
ISA Fellow, SIS-TECH Fellow,
FS Eng. (TUV Rheinland)
SIS-TECH Solutions, LP

Any information is provided on Caveat Emptor basis.
 
Guys who live in cubes write the code. Hence, it depends on whether the guy who wrote the code starts counting from zero or from one.

I find, in general, that those registers listed in Hexadecimal indexed addressed tend to start counting at zero, whereas those stating the addressing in decimal tend to start at one but it's not a fixed rule by any means, just my observation.

>Is there any document on above query?

Ans: Not to my knowledge. It just is what it is.
 
Hi,

the numbering is introduced in the official Modbus Application Protocol Specification (page 7f / figure 8).

Usually you count things from 1 to n and you speak about the "first register", "second register" and so on.
But computers start counting with 0 ;-)

Hope that helps.
Cheers.
J.
 
> Guys who live in cubes write the code. Hence, it depends on whether the guy who
> wrote the code starts counting from zero or from one.

And sometimes we get an extra item: :)
http://www.weather.gov/top/top5
Note there are 6 items (not 5) for the top two lists. :)

I'd like to find a similar page for other locations in the USA, but haven't been able to do that.

<b>Moderator's note:</b> Ok so not directly MODBUS, but interesting.
 
Thread starter Similar threads Forum Replies Date
L Modbus 7
D Modbus 0
T Modbus 0
D Modbus 1
R Modbus 1
Top