What Is BACnet MS/TP? RS-485 Token Passing Explained
What Is BACnet MS/TP?
BACnet MS/TP is a BACnet data-link technology designed for communication over an EIA-485, commonly called RS-485, multidrop serial network. MS/TP uses token passing to control which participating device is allowed to initiate communication on the network.
MS/TP is widely used at the field level of building automation systems to connect controllers, sensors, actuators, gateways, and other BACnet devices to supervisory controllers and BACnet routers.
The term MS/TP was historically described as Master-Slave/Token-Passing. Current BACnet terminology uses manager and subordinate in place of master and slave.
How BACnet MS/TP Uses RS-485
BACnet MS/TP uses the EIA-485 physical layer. Multiple devices share the same serial bus, allowing many BACnet devices to communicate over a common twisted-pair network.
MS/TP is designed for multidrop wiring. Reliable operation depends on proper cable selection, wiring polarity, termination, grounding or reference connections, device addressing, and baud-rate configuration.
BACnet MS/TP can support network segments up to approximately 1,000 meters at 115.2 kbit/s and up to approximately 1,200 meters at lower data rates when the physical-layer requirements are met. Actual installations must also take into account cable characteristics, transceiver loading, topology, and the equipment manufacturer's requirements.
Learn more: BACnet MS/TP Installation, RS-485, and Cables
How Token Passing Works
MS/TP uses a token to control access to the shared RS-485 network. A manager device must hold the token before it can initiate an unsolicited transmission.
When a manager has the token, it may send one or more information frames according to its configuration. When it has completed its permitted transmissions, it passes the token to the next participating manager device.
A device receiving a request does not need to hold the token in order to send the required reply. The token controls which manager is allowed to initiate new communication, not whether a device can respond to a request it has received.
This controlled access prevents multiple manager devices from attempting to initiate transmissions on the RS-485 bus at the same time.
Manager and Subordinate Devices
Manager devices participate in token passing and can initiate BACnet communications when they hold the token. Subordinate devices do not participate in the token rotation and transmit only in response to requests.
Most modern BACnet MS/TP equipment is implemented as a manager device, even when the device primarily behaves like a field device. This allows it to initiate BACnet services when required.
Each MS/TP device on a segment must have a unique MAC address. Manager addresses are in the range 0 through 127.
The available address range should not be confused with the number of physical devices that can be installed on one RS-485 segment. The practical device count also depends on the electrical loading of the RS-485 transceivers and the design of the equipment being used.
BACnet MS/TP Baud Rate
All devices communicating on the same MS/TP segment must be configured for a compatible baud rate. BACnet MS/TP equipment commonly supports several data rates between 9.6 kbit/s and 115.2 kbit/s, although the specific rates available depend on the equipment.
A higher baud rate allows more data to be transferred in a given period, but baud rate is only one factor affecting MS/TP performance. Token passing, device response time, polling frequency, the number of active devices, and application traffic all consume network bandwidth.
How New Manager Devices Join the Token Ring
MS/TP manager devices periodically look for other manager devices that may need to join the token rotation. This process uses the Poll For Master and Reply To Poll For Master control frames.
When a new manager device is discovered, it can become part of the token rotation. This MS/TP process is different from BACnet application-layer device discovery using Who-Is and I-Am messages.
The MS/TP Max Master setting affects the highest manager MAC address considered during this process. An incorrectly configured Max Master value can prevent a manager device with a higher MAC address from joining the token rotation.
Learn more: How Does BACnet MS/TP Discover New Devices?
Max Master and Max Info Frames
Two important MS/TP configuration parameters are Max Master and Max Info Frames.
- Max Master specifies the highest manager MAC address that should be considered when searching for devices that can participate in token passing.
- Max Info Frames controls how many information frames a manager may transmit while it has the token before passing the token to the next manager.
These settings affect network performance. Reducing an unnecessarily high Max Master value can reduce time spent searching unused addresses, but the value must remain high enough to include every manager device that needs to participate in the token ring.
Max Info Frames affects how much work a device can perform each time it receives the token. Increasing it may allow a busy device to transmit more data, but it also means other devices may wait longer to receive the token.
Learn more: Adjusting BACnet MS/TP Max Master
BACnet MS/TP Network Bandwidth
Not all bandwidth on an MS/TP network is available for application data. Some network capacity is used for token passing, polling for additional manager devices, replies, retries, and other protocol overhead.
Application traffic also varies considerably from one installation to another. Important factors include the number of devices, the number of BACnet objects and properties being monitored, polling frequency, device response times, baud rate, and whether features such as Change of Value reporting are being used.
As network traffic increases, devices may have to wait for additional token rotations before they can transmit queued information. For this reason, network loading should be considered when deciding how many devices and how much application traffic to place on a single MS/TP segment.
Learn more: BACnet MS/TP RS-485 Bandwidth Usage
Common BACnet MS/TP Problems
Many MS/TP communication problems are caused by the physical RS-485 network or by device configuration rather than by the BACnet application itself.
Common issues include:
- Duplicate MAC addresses
- Different baud-rate settings on the same segment
- Incorrect RS-485 polarity
- Improper or missing termination
- Poor cabling or excessive electrical noise
- Incorrect Max Master settings
- Too much network traffic for the available bandwidth
- Slow or malfunctioning devices affecting network performance
A BACnet diagnostic tool can help determine whether devices are passing the token correctly, responding to BACnet requests, and generating communication errors.
BACnet MS/TP Tools and Integration
The CAS BACnet Explorer can be used to discover, browse, monitor, and test BACnet devices and networks. It can also provide useful information when troubleshooting an MS/TP segment.
A BACnet Router can connect BACnet MS/TP networks with BACnet/IP networks, allowing BACnet devices on the serial network to communicate with devices and applications on the IP network.
For protocol conversion and other BACnet integration options, see: BACnet Integration Gateways, Routers, and Tools
Related BACnet MS/TP Resources
Need a BACnet Integration Solution?
Chipkin provides BACnet gateways, routers, software tools, data clients, and protocol integration solutions for building and industrial automation systems.