ModBus Compliance...

M

Thread Starter

Matt Ferrari

I am new to ModBus and am developing a product which will have a ModBus interface on it. In order to be considered ModBus compliant:

1) Is there a required subset of Function Codes which MUST be supported, or may I only support the codes I choose to support, and return an exception response for the others?

2) My hardware won't have much buffering capacity. Is it ok to support only a limit size capacity for function codes such as 20 & 21 (Read/Write File Record), instead of the maximum possible size?

I will appreciate any guidance anyone can offer, thanks.

Matt
 
B
1) There is no required subset. You can do almost everything with function 03. Pack 16 flags into one register, then the master can read all in one read.

2) A limited read/write size is ok.

Best Regards,
Brian
http://www.modbustools.com

 
C

Curt Wuollet

From what I've seen, you already have what you need to advertise Modbus
compliance. Your product _will_ have a modbus interface on it :^). I'm
not sure there is any enforcement as I've seen as few as 3 functions
supported. It's kinda like calling Windows software open, apparently
the declaration alone is enough to avoid being sued for fraud.

Regards

cww

 
M

Matthew Hyatt

Though there is no requirement to support the Modbus protocol in any manner outside of some minimual function code, consider the impact to your customer. If you say you have a Modbus interface and the driver on their host cannot get the data required because you have implemented a very limited set of function codes, they will not be very thrilled, you will be called back to perform more programming that you may not be paid for or you may not be calld back at all, they will hire someone else to fix the problem(s) and you will not get a very good reference.

If you really want to say you have a Modbus interface, consider spending the time to implement the most useful instructions, function codes utilized by the manufactures who do indeed support this protocol in a complete form. You will be rewarded with customrs who will recommend you for other projects, have a product which will work with many other types of Modbus devices and you will have gained a better working knowledge of the protocol.

You can of course do anything you want as you are not required to purchase a license agreement for the use of ths protocol - as far as I know.

You can also download the protocol manual from the internet, so that you have a good reference.

Taking short cuts, doing the bare minimum indicates your not interested in doing a great job, only enough to get by. Which begs the question: why bother if your only trying to get by?

MJH
 
A

Automation Linse

On May 26, 2004, Matt Ferrari wrote:
>1) Is there a required subset of Function Codes ... <

You better support at least function 3 and 16 - also 6 while you are at it. That is the lowest-common subset expected by users.

> 2) My hardware won't have much buffering capacity.
> Is it ok to support only a limit size ... <

Limiting buffer sizes is Ok, but can be a problem - not all masters allows users to define a size less-than max. So if you have 100 words of data but only support reading/writing 32 at a time, a few MB clients allows this, while others will ALWAYS try to read the max defined and poll 100 each time.

> function codes such as 20 & 21 (Read/Write File Record) <

These 2 should be considered "rare & exotic" - don't expect any common user application to ever understand them. Function 3/16 are defined to read an 'array of ints representing data'. However the File Record funcs are treated as binary/block reads of some form of structured data - a program or loadable or something OTHER THAN data. So just implementing function 20 & 21 means you could call the product Modbus but it is NOT likely you'll ever find a customer who can use it (unless you also supply the perfect Master application to satisfy ALL users).

best regards
- LynnL, www.digi.com
 
Thread starter Similar threads Forum Replies Date
S Modbus 2
C Modbus 2
A Modbus 4
A Modbus 1
A Modbus 2
Top