BACnet MSTP
This article is part of a four-part series on BACnet, you can access the other parts below:
BACnet Part 1: BACnet Overview
BACnet Part 2: Communication 101
BACnet Part 3: BACnet/IP
BACnet is the most prevelant protocol in the building automation space but to many it is a six letter word that screams confusion! In this series we will dig deep into what BACnet really is and what it isn't at the end of this mini-course you will be able to confidently communicate:
- What BACnet is
- Why It is used
- How it applies to you
In BACnet Communications Part 3, I covered an overview of the BACnet/IP. In this article, I will go in depth on BACnet MS/TP communication.
Part 4: BACnet MS/TP
BACnet over MS/TP is a method from which BACnet MS/TP packets can use the Master Slave Token Passing (MS/TP) principle to transmit data across a bus network architecture (this will be discussed in further detail in my networking fundamentals posting). MS/TP messaging requires a physical medium (wire) and devices that have (Media Access Control) addresses. MS/TP communications use tokens to pass data. Only master devices can pass the token and only master devices can respond to the who-is request (this is why you cannot auto discover slave devices).
Key Terms
- Token- The Token passed by a MS/TP device to other devices. Token's can only pass on the local MS/TP network. Once a device holds the Token in can create and transmit application layer message
- MAC Address- This is an 8-bit number, which for master/slave devices is 0-127. This Mac address is used locally on the RS-485 link to physically address devices on the link, and is not passed through routers. It is comparable to the Modbus RTU slave address.
- RS-485- This is the standard physical medium associated with MS/TP. Typically, this is a 2 wire connection with a third wire for zero reference purposes.
- Baud Rate- This is the speed at which the MS/TP network communicates. General baud rates are 19200, 38400 and 76800. It is important to have all devices communicating at the same speed to avoid collisions and token drops.
- TRT- Token Rotation Time (TRT) is the time that the token takes to circulate every node on the network. TRT is updated at the supervisory device when it receives the token.
- RTT- Round Trip Time (RTT )is the time to complete one transaction of a BACnet confirmed Read Property service between the supervisory device and each field controller.
Network Ontology
When a controller communicates on a BACnet MS/TP network, it first requests a token. Upon receiving a token, the controller is able to open a application layer message using a APDU. This allows the device to communicate to other controllers or the supervisory device. Only the device that has a token can communicate with other devices. A detailed description of this communication sequence is below.
Best Practices
There are three key best practices when you are designing and implementing a BACnet MS/TP control system:
- Ensure that the devices are set to communicate at the same baud rate. Do not simply rely on auto-baud, when possible manually set the baud rate. For shorter distance trunk runs use the 76.8k for longer distance trunk runs use 38.4k.
- In order to keep the RTT and TRT times low, you should make sure that your controllers are addressed in sequence. This allows the token to pass quickly to each device in sequence rather then randomly moving throughout the network.
- The network instances should be arranged logically and in order. This facilitates effective troubleshooting and will allow the user to quickly find communication issues.
- Utilize the same wire media throughout the installation and do not ground both ends of a trunk bus (this creates an antennae effectively drawing interface to your bus).
Conclusion
So there you have it, this concludes the mini-course on BACnet. I hope you learned more about BACnet from these posts and the hyperlinked articles.
Now that you've read through the course what questions do you have?
Is there a specific topic you'd like to learn more about?
Let me know in the comments below!