stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.29k stars 1.71k forks source link

Improve compatibility of next release v3.2 on modbus_mapping_t #411

Open stephane opened 6 years ago

stephane commented 6 years ago

libmodbus version

Migration from v3.0.6 to libmodbus v3.2.

Description

Migration would be easier if the new offset (now start) fields would be appended to end of the structure https://github.com/stephane/libmodbus/blob/master/src/modbus.h#L159

https://groups.google.com/d/msg/libmodbus/rEIbtPt8FZI/O3hzAd0LCQAJ

KalaiK7 commented 2 years ago

hi i need a sample how to communicate to muliple salve connected to the same Modbus, How we know which slave id id ampped to which sensor,am struggles a lot in mulitiple slave communication and changing the slave id , i can able to read by default slave id(i.e., 1), suppose if i change the slave id to 2 i cant read.

i would like to know what are the basis steps to be followed to change the slave id, and to read the value .am new to mod bus implementation can u guid eme how to rectify the issue , If any basic sample available in c program can u share plz