MODBUS Diagnostics query

  • Thread starter Nicholas Vassallo
  • Start date
N

Thread Starter

Nicholas Vassallo

I am currently implementing MODBUS (serial) on an AT mega 16 processor.

For the diagnostics section I cannot really understand in what circumstances does the "Return Slave No Response Count" increment. As I am understanding it all the possible error counts are covered by the other count subfunctions.

If anyone can shed any light on the matter, it would be greatly appreciated.
 
L

Lynn August Linse

The diagnostics for Modbus are rarely supported outside of older Modicon PLC. The common functions ones sees on the market are 1-6, 15, 16. Anything beyond that will likely never be used by your customers.

Understand that Modbus was designed back before CPU power was what it is today, and the main CPU was heavily used during simple serial transmit. So the PLC would at times NOT be able to reply and maintain jitter-free logic processing. Such counters where a means for the user to understand that slave did not answer because very busy, which means either the user was sending too many polls, or the PLC was reaching the max of its processing range.

That is no longer the case and even tiny cheap micro/PIC can manage serial comms with little overhead. Do not sweat the obsolete stuff :)
 
A
Hi Lynn August,

Can i get modbus compliance without implementing the diagnostic functions?

I observed that the responses for few of the diagnostic functions are controller(384/584/984) specific. BUT in my case, I am implementing the RTU Slave for 8051 controller. Can i customize the responses according to my will? If yes, can i apply my code for the Modbus compliance?
The code I have got, does support 01, 03, 05, 06, 15 & 16 function only, that too without exception response. Can i get a RTU SLAVE CODE which supports all other functions too?
 
L

Lynn August Linse

> Can i get modbus compliance without implementing the diagnostic functions?

Yes. Modbus 'certification' is based upon supporting what you claim to support. In other words, you can have a device which ONLY supports function 3 (read holding registers), so no bits/coils and no writes, and still be certified if you correctly support function 3.

I don't know the correct jargon, but you will fill out a 'compliance document or declaration' which defines what is tested, and customers who desire 'Modbus certified' products should understand that they need to read your declaration and confirm it matches their requirements.
 
Top