MODBUS Slave devices discover

40 views
Skip to first unread message

Muhammad Umair Anwar

unread,
Feb 27, 2018, 7:55:57 AM2/27/18
to libmodbus
Hi,

I want to discover a device connected to rs485, and I do not know the address of the device.

Is it possible? if yes. please guide me to the solution.

Thanks,
Regards

Chuck Watson

unread,
Feb 27, 2018, 8:57:11 AM2/27/18
to libm...@googlegroups.com, mumai...@gmail.com

Yes, you can do discovery but …

 

First, you would need to “ping” all 254 available node address’: 1 thru 254. If you don’t get a timeout, there is something there. This can take some time because even if you only wait one second for a response from each node address, that is 254 seconds or over four minutes not including any other regular polling you are already doing.

 

You would also need to know something about the possible devices on the network. For example, if I know there could be a device type A, B, or C on the network, I could poll the responding device at a known register address (e.g. model number) to identify the device type by how it responds.

 

If you don’t know anything about what possible device types are out there, there is no away you can determine anything about the remote device other than there is something there.

 

Chuck Watson BS, CEM, CMVP

Direct USA 724-799-1529

www.EnergyChaser.com

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

image001.gif
Reply all
Reply to author
Forward
0 new messages