Previous in Forum: HVAC Unit Outputs   Next in Forum: Effect of Rotor on Stator Winding Inductance in an Offline Generator
Close
Close
Close
9 comments
Commentator

Join Date: Sep 2017
Posts: 76
Good Answers: 1

Modbus RTU 485

06/28/2018 4:17 PM

I am confused about this protocol

First of all i want to understand the definition of Node and Slave

Second of all, i am trying to understand the maximum number of slaves allowed per Modbus RTU Master

I have read numerous documents and they are all different.

Some say a maximum of 32 "nodes"

Others say a maximum of 254 "slaves"

I dont get it. Why is such a well defined protocol so hard to find correct information on?

Can someone help clarify? Thanks in advance

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
3
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7003
Good Answers: 407
#1

Re: Modbus RTU 485

06/28/2018 4:43 PM

RS-485 is a rather loosely defined standard. Apparently so is Modbus. So you have a loosely defined communications protocol used on a loosely defined communications bus. What you end up with are vendor specific implementations that are limited by the hardware used to host this form of serial data communications.

https://en.wikipedia.org/wiki/Modbus

https://en.wikipedia.org/wiki/RS-485

Cheers!

Register to Reply Good Answer (Score 3)
Guru
United States - Member - New Member Engineering Fields - Power Engineering - New Member

Join Date: Sep 2006
Location: California, USA, where the Godless live next door to God.
Posts: 4648
Good Answers: 795
#2

Re: Modbus RTU 485

06/28/2018 5:33 PM

Node and slave are virtually the same as far as the network is concerned. Node is a network point and is is typically used in describing a device on the network that is simply placing information on it when polled by the master. Slave is usually used in describing a device at a node that performs an action of some sort in response to commands from a master. So if I am looking at a meter, it can be referred to as a node, if I’m looking at a VFD, it’s a slave (node). The 32 node limit applies either way.

__________________
** All I every really wanted to be, was... A LUMBERJACK!.**
Register to Reply
Guru
Engineering Fields - Power Engineering - New Member

Join Date: May 2007
Location: NYC metropolitan area.
Posts: 3231
Good Answers: 444
#3

Re: Modbus RTU 485

06/28/2018 5:48 PM

They are two different communications protocols, RS-485 defines the electrical signals, Modbus defines the data that travels via the those signals, and how it is managed by the software.

Node is a generic term for a connection point to the communication network. A Master is a node that can initiate a request for, and accept, data from a slave. A slave is usually a node that responds to data/status requests from a Master, but can also broadcast data for the Master to process.

There are a number of Modbus tutorials on the web, use your favorite search engine to find and read them.

__________________
“Tell me and I forget. Teach me and I remember. Involve me and I learn.” Ben Franklin.
Register to Reply Score 1 for Good Answer
3
Guru

Join Date: Jul 2010
Posts: 665
Good Answers: 175
#4

Re: Modbus RTU 485

06/28/2018 7:34 PM

> A slave is usually a node that responds to data/status requests from a Master, but can also broadcast data for the Master to process.

No. Broadcast mode is the Master sending a message to all slaves on the network, none of whom is allowed to reply (all slaves remain silent). This is accomplished by addressing slave #0, which is broadcast mode.

Practicalities of RS-485

1. The 32 node limit is theoretical. A severe limiting factor is the poll-response mode: The master sends its polling message and the slave interprets it and responds. The master can not send until the slave responds or the wait-for-response time-out period expires.

The time-out period has to take into account the slowest responding slave.
The time to poll all slaves can add up to a substantial amount of time. Some applications require multiple comm ports with, say 16 slaves on one port and 16 slaves on the other port, in order to get data exchanged in a timely fashion.
All that said, the 'unit loads' for modern 485 driver chips are less now than in earlier eras and sometimes you can stretch a 485 network beyond 32 devices, when polling time is not critical.

2. Issues with lack of a signal ground on some devices where chassis ground is used can create ground loop problems that requires an isolated repeater.

3. if the master serial port resides on an expensive card, I'll protect it with an isolated repeater just for sheer protection's sake. I've seen numerous cases of lightning or near-lightning-strikes taking out multiple slaves and master comm ports.

4. There's supposed to be biasing applied to force a known idle state, but access to Vcc can be problematic.

5. Best summaries of RS-485 and Modbus:
http://www.bb-elec.com/Learning-Center/All-White-Papers/Serial/RS-422-and-RS-485-Applications-eBook/RS422-RS485-Application-Guide-Ebook.pdf

www.chipkin.com/files/liz/MODBUS_2010Nov12.pdf

Register to Reply Good Answer (Score 3)
Commentator

Join Date: Sep 2017
Posts: 76
Good Answers: 1
#5

Re: Modbus RTU 485

06/29/2018 9:12 AM

Thanks for all the info.

I am still confused. in several posts above people have defined node and salve as the same thing

Maybe a better question is.... How are they different?

And to help fill in the blanks let me explain what im doing

I have a field device for modbus RTU

i could possibly need to talk to several hundred of the device

The device will act as a "slave" meaning it has registers and an address and i will send it a poll command and wait for its data to come back.

Can i have 32 of these things or 254

That is what i dont understand

Register to Reply
Guru

Join Date: Jan 2007
Location: Edinburgh, Bonnie Scotland
Posts: 1277
Good Answers: 22
#6
In reply to #5

Re: Modbus RTU 485

06/29/2018 10:17 AM

When deciding how many devices can be on a single Modbus line, you need to know the baud rate, time between reads, how much data is being transferred per read, and other factors like line length. This can be used to calculate the theoretical throughput of the Modbus line.

Ensure all devices on a single line use the same settings (baud rate, stop bits, parity, etc).

The master will have its own maximum number of devices which can be added: older models may only take 32, most newer ones can cope with 256. The decision has to be made as to how many of the devices you have can be written to and read from within the cycle. I use power meters which have (the maximum) 255 bytes read from them each cycle. As the cycle is 10s, and there are propagation delays on long wires, we only connect 10 of these per line. We have run more, but occasionally lost some data as the acquisition loop ran again before all data was collected.

Above, I have used 'devices' instead of node or slave.

__________________
Madness is all in the mind
Register to Reply
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7003
Good Answers: 407
#7
In reply to #5

Re: Modbus RTU 485

06/29/2018 10:21 AM

The limit will be set by the address space. For instance, an 8-bit address space is limited to 255 addresses. Again, this limit is going to be defined by the hardware used to implement Modbus over an RS-485 bus structure.

As stated previously, a node is just a connection to the bus. It could be a slave device, i.e. an RTU (remote terminal unit) or a master. The master issues commands for the RTU's to respond with data. The slaves (RTU) are set to listen for a command with their specific address in the command.

If you really need hundreds of remote units, it is probably a good idea to investigate what it would take to implement your control/data management with an Ethernet based communications system.

Good luck with your quest.

Register to Reply
Guru

Join Date: Apr 2011
Posts: 7928
Good Answers: 283
#8

Re: Modbus RTU 485

06/29/2018 1:33 PM

...and if you find you want to limit the number of dependants, RU-486 can be very effective, however, time is of the essence.

__________________
Eternal vigilance is the price of knowledge. - George Santayana
Register to Reply
Guru

Join Date: Jul 2010
Posts: 665
Good Answers: 175
#9

Re: Modbus RTU 485

06/29/2018 3:12 PM

The screen shot below is from the Modbus spec which says there's a maximum of 247 (RTU) slave addresses:

So, according to the standard, a master should be able to address any number of slaves from slave #1 through slave #247.

Caveats:

Modbus is an open standard and no regulatory 'foundation' with Modbus bureaucrats/police to enforce the Modbus standards. Modbus has only the device vendor to stand behind whatever the implementation is. And implementations vary all over the map. Some vendors pay strict attention to the standard, other vendors don't.

I've run into some Masters that will address #248-#255. Will the slave accept an address greater than 247? Depends the slave implementation of Modbus. Maybe, maybe not. You need try it to see.

The limitations of the physical network as to the total number of unit-loads any slave or master can drive is what limits the number slave nodes on a multidrop network.
Once a network is 'filled' to the maximum number of slaves, a second or third or fourth network will need to be used to communicate with additional slaves.

Register to Reply
Register to Reply 9 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Copy to Clipboard

Users who posted comments:

Brave Sir Robin (2); GM1964 (1); Iris (2); JRaef (1); RAMConsult (1); scott165 (1); truth is not a compromise (1)

Previous in Forum: HVAC Unit Outputs   Next in Forum: Effect of Rotor on Stator Winding Inductance in an Offline Generator

Advertisement