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.
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 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
David Castor
www.cvoes.com
RE: Missing Modbus Function Codes