Solution
The maximum number of nodes (a device that can transmit or receive data) within an RS-485 network is dependent on the following factors:
- Unit Load.
- Electromagnetic Interference (EMI).
- Proper wiring of the network.
- Read and write timeouts.
Refer to the sections below to calculate the maximum number of nodes and maximize the quality of your network.
Unit Load - Calculating Maximum Device Count
Unit Load (UL) is a standardized measure of load that 1 device places on the network. As per the RS-485 standard, a bus can withstand a maximum of 32UL.
Each node on the network will have a different UL value, depending on the device's specifications. A device's UL can be calculated as the ratio of it's input current to the standard 1UL current.
Refer to [External] Calculating the Maximum Number of Nodes on an RS-485 Bus for an example calculation, and details on how to calculate this value for your specific device.
Once the UL for each device is determined, the total number of devices allowed on the bus (nMAX) is calculated as:
nMAX = 32UL / (UL1 + UL2 + … ULn)
Where ULn represents the UL for a given device.
Proper Wiring of the Network and EMI
To maximize the number of nodes on the RS-485 bus, the following conditions should be met:
- The RS-485 transmitter(s) should use twisted-pair wire to reduce EMI.
- The twisted pair wire should have a characteristic impedance that accounts for the worst-case loading scenario.
- Termination resistors should have the same value as the wire's characteristic impedance.
- Connection points for receivers (stubs) should be as short as possible.
Refer to [External] Guidelines for Proper Wiring of an RS-485 (TIA/EIA-485-A) Network for a detailed explanation of each of these points.
Read and Write Timeouts
Ensure that timeouts are configured correctly. They should be long enough to allow for slaves to respond, while not being so long that the master waits indefinitely. Refer to Configuring Timeout for VISA Sessions for instructions on how to set timeouts.