Default address MODBUS RTU

R

Thread Starter

Rasmus Hansen

To my knowlege the MODBUS RTU spec. does not specify a default address that would indicate a new device on a bus. So when shipping out new devices from factory, should a default address be set or should one force the customer to specify an address before applying the device on the bus?

Any thoughts/comments is appreciated.
Thanks in advance!

Regards
Rasmus
 
Usually, a device as the default Modbus adress #1 with default baud and com settings. The end user as to set the device to a different adress if required (by configuration or by dip-switche) and made some baud and com setting adjustments before plugging the new device on the modbus existing network.
 
G

Ganesh Okade

One, very effective, inexpensive and non-invasive way of shipping products with a fixed MODBUS ID and allowing them to change it later is by having a Holding Register itself represent the MODBUS Address. This register must be set to a fixed factory setting (an address of '1' looks very good and an obvious guess for end customers) which can then be written by any MODBUS Master applications to change the address. This method is non-invasive (unlike the case of DIP switches which becaome difficult to operate of the device is in a hazardous environment) and a no-cost solution (unlike a Hand Held tool which many manufacturers use.
The downside though is that if the user forgets the address he has set then his software will have to do a "address/device search or scan" to determine the address. One solution to this could be to have a "reset" switch on the device which will reset the address to the factory set value. Any comments?

Ganesh Okade
Sunlux Technologies Ltd.
www.sunlux-india.com
 
L

Lynn at Alist

Rasmus Hansen wrote:
> To my knowlege the MODBUS RTU spec. does not specify a default
> address that would indicate a new device on a bus. So when shipping
> out new devices from factory, should a default address be set or should
> one force the customer to specify an address before applying the device on
the bus?

Yes, there is no default. Plus since one cannot easily "browse" a new Modbus device to discover what it is, many of the "auto-detect-recovery"
schemes used in more complex protocols wouldn't work with Modbus. So the context is not quite the same.

That said, I've often heard the warning "Never set a PLC/device used in a multidrop environment to address 1. If some idiot connects an unconfigured device to that multidrop, most likely it will also have address 1, which will force the original PLC with address 1 off-line due to address conflict."

So I'd say using address #1 is the ad-hoc default address. Forcing pre-config onto users leads to bad thoughts and wishes aimed at you as a
designer.

Best Regards

Lynn August Linse
IA Firmware Specialist, Digi Int'l (www.digi.com)
 
G

Ganesh Okade

Lynn:
I agree with you on people connecting devices without configuring them. Many times, with an RS485 network, two slaves having the same address leads to a bus clash and this condition, if left unattended for a long time could blow out the driver chips of the RS485 devices.

Ganesh Okade
Sunlux Technologies Ltd.
www.sunlux-india.com
 
Top