assigning addresses to slave devices using modbus


Thread Starter


In my project i want communicate a master and several slave devices using modbus protocol.

I am new to the modbus protocol. I have gone through modbus protocol reference guide but i am not getting an idea how a master can identify the slave devices and how we can assign address to the slave devices, or do we have to map all the slave device addresses?
Modbus is fairly simple - its half duplex single master. On a bus network like RS485 each device has a unique address from 1 - 255 (0x01-0xFF). You must set these manually before you start. Each device will be different is may be dip switches, terminal server config etc - refer to the device literature.

Now the master does not need an address. The master performs reads or writes and the slave will respond appropriately or with an exception response.

If you use a packet sniffer then if you set the master up to read holding registers you will see the modbus message as:
<slave add><function code><data><crc>

Data will be dependant upon the function code - refer to the modbus standard for this.


In my project i am using modbus protocol to communicate a master device and several slave devices using POWERLINE MODEM.

Does the addressing format for slave devices is same using RS485 and POWERLINE MODEM? How can we assign addresses as our medium is powerline modem?
One thing I learned is when you assign you modbus nodes, start at node 2. don't use node 1. This is the default address for a lot of devices and if a device fails then you would have 2 node 1's and this will screw everything up.
Short answer: YES
Long answer: MODBUS (serial) - like any other serial protocol - does not care about the implementation of the physical layer.