What are the minimum Modbus functions to implement?
bare min is 3 & 16, but read below. • Minimum set is 3 and 16 for read/write multiple registers. You can pack boolean (digital) values 16 to on register – just be aware that the normal bit-order seen is not what you’d expect so make sure you document your bit order correctly. Note that some very important “embedded masters” only can issue these 2 functions! Thus a smart slave creator makes sure ALL data is available by function 3. So answer A is 3,16. • Next, I’d add function #6 – write single register. It only adds a few minutes work beyond function #16. Some Masters will use #6 to write one value and #16 for more than one. Thus, if you don’t do function #6 some Master may not work or may need to be configured to force use of function 16 for all writes. So NOT doing function 6 could lead to field support problems. So answer B is 3,6,16 – This is what I’d call the real minimum set! • If you have lots of 1-bit digital control items, then next level to add is functions 1 & 15 for read/wr