Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing Modbus Function Codes

Status
Not open for further replies.

xJAyx

Electrical
Oct 29, 2003
100
I am integrating a proprietary controller into a system that uses Modbus TCP. I have discovered that this controller does not have Modbus function code 4 implemented, and therefore I can only use it to read holding registers. Anything stored in an input register is inaccessible. My slave device has some values stored in input registers that I need to read.
Is it common to not have function code 4? I will need to speak to either the manufacturer of the proprietary controller, or the manufacturer or my slave device and have them make changes and I am trying to decide who should make the change. Foretunately I have a good relationship with both and I have the choice.
 
Replies continue below

Recommended for you

I'm not sure how common it is, but with Modbus being an 'open' standard, you get whatever the implementer gives you; there's no requirement to have any specific functions.

I have found that many devices mirror 3xxxx input registers in 4xxxx holding registers, so the many cases can be handled with just function 03 to deal with holding registers.

It's interesting that the master omits function 04 because 03 and 04 are nearly identical functions; the commands both use indexed registers, not absolute, so the leading 3 or 4 memory area reference is not even used in the packet command, it's 'understood' depending on whether the function is 03 or 04. One function uses error code 83h, the other 84h. Other than that . . .

Conceivably the slave could (be made to) respond to either 03 or 04 with data from a holding register. Why not? For many practical purposes, holding vs input is an arbitrary distinction.

Good deal that you're on terms to get one of them to make a fix.
 
You get what they give you. It is very common to get only a partial implementation of the Modbus functions.

David Castor
 
I have used ICC (industrial control communications) gateway products for the same failure to support whole all of protocol commands, this was with Modbus RTU. I believe that some of their products support Modbus TCP as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor