×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Missing Modbus Function Codes

Missing Modbus Function Codes

Missing Modbus Function Codes

(OP)
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.

RE: Missing Modbus Function Codes

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.

RE: Missing Modbus Function Codes

You get what they give you.  It is very common to get only a partial implementation of the Modbus functions.   

David Castor
www.cvoes.com

RE: Missing Modbus Function Codes

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources