Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to assign modbus addresses to slave devices?

Status
Not open for further replies.

naseeam

Member
PC application is connected to master Gateway embedded controller over USB. Gateway is connected to number of slave embedded controllers over Modbus RTU.

I need to assign Modbus addresses to slave devices. Somehow I need to inform PC
application as to what slave devices are on the modbus. Then, PC application would assign 8-bit modbus addresses (through gateway) to slave devices.

Any ideas how modbus addresses can be assigned, configured, or programmed in slave devices.
 
There is no standard way to do that. You have to "invent" your own way (and this will make your ModBus non-standard and then it might not work with all modbus devices or software).

I found a discussion about the topic:
https://www.control.com/thread/1333661418
 
Whenever I have had to configure a Modbus system, it has gone something like this:

1
Decide which slave device is to have which address. Make a note so you dont forget.
It is usual to make the first slave device address #1, the second slave device address #2 etc.
Which addresses you use is not critical, as long as the addresses are in the range 1 to 255, and no two devices have the same address.

2
Set the addresses in the slave devices, either by setting DIP switches or links or in the configuration software of the slave device.

3
In the Application software on the Master device, configure the address for each slave as per the list you made when you decided the slave addresses.

4
Switch it all on and watch it working.:D

I cannot be any more specific as I do not know what hardware/software you have.

JimB
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top