Member Login
Search
Jump to a Date
Sponsored Communities
Cool stuff
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
What the large print giveth, the small print taketh away.
RSS Feed
www.control.com/rss/
To get a personalized feed, become a member at no cost.
The Modbus application protocol spec defines a 16-bit address plus a number of function codes to direct that address to one of several data types.
It's also apparent that the upper digit of a decimal address is used to indicate data type. Quoting from one user manual, "Notice that the Modbus protocol uses a 5-digit representation for the slave data address which infers the point-type. For example, INPUT STATUS values are always represented in the range 10001-19999: HOLDING REGISTERS are displayed as 40000-49999...." Examining user guides for several instruments shows that all do indeed use addresses in the 4xxxx range for holding registers.
Where is the usage of the upper digit specified?
I cannot locate it in any of the Modbus specs, and the Application spec even states that mapping is "totally vendor device specific."
If usage isn't specified but is done by convention, could someone please clue me in to the convention?
Thx!
fcweed at mail. com
It's also apparent that the upper digit of a decimal address is used to indicate data type. Quoting from one user manual, "Notice that the Modbus protocol uses a 5-digit representation for the slave data address which infers the point-type. For example, INPUT STATUS values are always represented in the range 10001-19999: HOLDING REGISTERS are displayed as 40000-49999...." Examining user guides for several instruments shows that all do indeed use addresses in the 4xxxx range for holding registers.
Where is the usage of the upper digit specified?
I cannot locate it in any of the Modbus specs, and the Application spec even states that mapping is "totally vendor device specific."
If usage isn't specified but is done by convention, could someone please clue me in to the convention?
Thx!
fcweed at mail. com
The Modbus *protocol* doesn't use any numerical prefixes to indicate data type. Modbus just numbers addresses from 0 to 65535 in 16 bit natural binary for each data type. You select the appropriate data type according to which read or write function code you use.
Some *applications* use a numerical prefix in their user interface. This seems to be something that has arisen through convention (Modicon used it in their programming software and PLC manuals). It has nothing to do with what goes out over the wire in the actual protocol though. They could just as easily have used "I", "Q", and "V" in their manuals for all the difference it would have made.
The actual protocol documents describe the data types as Discrete Inputs, Coils, Input Registers. and Holding Registers. I haven't seen anything about numerical type prefixes anywhere in the Modbus standards documents that I have read.
So far as I know, the convention is 0 = Coils, 1 = Discrete Inputs, 3 = Input Registers, and 4 = Holding Registers. Note though that these numbers are not actually part of Modbus.
Some *applications* use a numerical prefix in their user interface. This seems to be something that has arisen through convention (Modicon used it in their programming software and PLC manuals). It has nothing to do with what goes out over the wire in the actual protocol though. They could just as easily have used "I", "Q", and "V" in their manuals for all the difference it would have made.
The actual protocol documents describe the data types as Discrete Inputs, Coils, Input Registers. and Holding Registers. I haven't seen anything about numerical type prefixes anywhere in the Modbus standards documents that I have read.
So far as I know, the convention is 0 = Coils, 1 = Discrete Inputs, 3 = Input Registers, and 4 = Holding Registers. Note though that these numbers are not actually part of Modbus.
Hello,
>Where is the usage of the upper digit specified?
I do not want to be pedantic.
On the first line/paragraph of the MODBUS specification, PI-MBUS-300, for each function code, 1,2,3,4,5, etc., is defined the area of memory and type of memory the function accesses.
MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1a might help.
The 0,1,3,4 etc. is how a Modicon controller referred to an area and type of memory when the protocol/spec was created.
The size of the different device memory areas is device specific. Look in the device documentation for memory size and type mapping.
So, the spec was written referring to Modicon controllers. The function codes are what defines the data type and how to access it. It really could all point to the same memory area.
The original protocol documents do not refer to the first digit in the description of the functions. It refers to the name of the area. (Holding Register, Coils, etc)
The first digit could be any digit.
HTH,
Mark
http://www.peakhmi.com/
>Where is the usage of the upper digit specified?
I do not want to be pedantic.
On the first line/paragraph of the MODBUS specification, PI-MBUS-300, for each function code, 1,2,3,4,5, etc., is defined the area of memory and type of memory the function accesses.
MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1a might help.
The 0,1,3,4 etc. is how a Modicon controller referred to an area and type of memory when the protocol/spec was created.
The size of the different device memory areas is device specific. Look in the device documentation for memory size and type mapping.
So, the spec was written referring to Modicon controllers. The function codes are what defines the data type and how to access it. It really could all point to the same memory area.
The original protocol documents do not refer to the first digit in the description of the functions. It refers to the name of the area. (Holding Register, Coils, etc)
The first digit could be any digit.
HTH,
Mark
http://www.peakhmi.com/
You can think of 10051, 30034, 40021, etc. as register 'Names'. You can subtract an offset from the 'Name' to get the register number or address.
For example, the 40000 block uses an offset of 40001. 40021 - 40001 = register 20 (14 in hex). The actual code uses hex 14 to specify the 20th register and a function code to specify which block of data (the 40000 block). Some systems use a 6 digit naming convention, 400001, but the code is the same.
This is explained further on the web page http://www.simplymodbus.ca/FAQ.htm
For example, the 40000 block uses an offset of 40001. 40021 - 40001 = register 20 (14 in hex). The actual code uses hex 14 to specify the 20th register and a function code to specify which block of data (the 40000 block). Some systems use a 6 digit naming convention, 400001, but the code is the same.
This is explained further on the web page http://www.simplymodbus.ca/FAQ.htm
From Control Engineering magazine...
Related articles from Control
Engineering magazine- Signal conditioners support universal input, feature detachable display
- Motion control: Omron selects EtherCAT as its next motion bus system
- Wireless: Adoption trends in factory automation
- Tutorial: Instrumentation / DCS integration languages, part 2: FDT
- Connectivity: Embedded LAN module with minimum programming
- New 1-1/8 in. M23 connectors provide 19 pins
- Hatching distributed automation architectures
- Quatech expands Airborne wireless line
- Ethernet drives industrial network growth
- Wireless networks: ISA creates wireless factory automation standard working group
Above articles copyright 2009 Reed Business Information.
Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2009 Control Technology Corporation. All rights reserved.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!




