BACnet confuses a lot of folks and if you feel confused that's ok. We created this guide to solve that problem.
This guide will:
- Help owners really understand what BACnet is and what it isn't
- Help system integrators understand its nuances in regards to integration
- Help non-BAS product developers understand how it could work with their product
Let's dive in.
Table of Contents
While we recommend you read through the guide in the order it is written in such a way that you can start reading any particular section and take immediate value from the guide. We have broken out the guide into the following sections:
-
How did It Come About?
-
What it is
-
How it works
-
What does it mean to be BACnet compliant?
-
Next steps to grow your knowledge
How Did It Come About?
BACnet was created by the American Society of Heating and Air-Conditioning Engineers to provide a common communication standard for Building Automation Systems. To help set the context, let's look at what was happening at the time.
Back in the late 1980's networked systems were starting to come about. Personal computing had begun to spread into the office space and the control system had matured from dials and switches to automated systems. The problem was companies, out of necessity, had created their own communication protocols. These were the days of P-BUS, N2, and IBEX.
Customers and engineers saw a problem and collaborated to develop a standard that would ensure interoperability and would allow systems to communicate with one another. In 1995, the first version of BACnet ANSI/ASHRAE Standard 135 was published. From here the standard has gradually grown to its current standard which is ASHRAE-135 2016.
The standards group meets on a regular basis to discuss BACnet and the hopefully-soon-to-come BACnet Web Services Standard! (And no, for all the geeks, I'm not referencing the 2004 standard.)
What is BACnet?
At a high level, BACnet is a standard that defines the data model and the communications protocol for building automation systems.
It is not well known outside of our little building automation circle. I was working with a few lighting vendors lately trying to help them be better able to interface with control systems. They started talking about how they are using CoAP as their protocol of choice. When I suggested that they use BACnet, they had only a passing familiarity with the standard.
I can understand why, at 1,200+ pages the standard is a doozy. In comparison ,the CoAP standard is roughly 120 pages. I can understand why without insomina would want to avoid the standard, it's not exactly the most exciting read in the world. But, hey, that's why you've got this article.
Data Model
Have you ever tried to talk to a call center in India? I have, and maybe it's the fact that I'm from the South, but I just can't understand what they are saying. Well, imagine your building automation system talking to 5 other building automation systems and each of them are saying the same thing but in a different way.
Which way is right?
Who should they listen to?
That my friends is where the data model steps in.
The data model says, hey fools listen to me. When you want to say Crayons you say "Cray On's" not "Crowns" .
Cause after all, we all want to sound like southerners.
What the data model is doing is defining the semantics of the conversation.
Semantics are a set of rules that define how data is structured and formatted.
There's a lot more to data models and we will dive deeper into this once we reach the section on BTL and BIBB's.
Communications Protocol
Think of a protocol as the rules. Whereas the data model displays what color the stop signs must be, the BACnet protocol defines where the stop signs go.
This guide will largely be about BACnet protocol aspects. After all, the top two questions I get are how to integrate a BACnet system and how to troubleshoot one.
By the end of this article, you will understand both.
Like audio instruction? Enhance your learning from this article:
How Does BACnet work?
In this section, I'm going to cover how BACnet communicates, what a BACnet Device is, and what a BACnet message looks like.
BACnet Communications
The image above shows how the 4 main layers in the BACnet stack align with the 4 layers of the OSI model. The lower layers include the communication media and the communication protocols while the higher levels include the services and applications
BACnet LAN Types
There are currently five supported BACnet protocol types for communications.
BACnet...:
• Over IP (Annex J)
• Over Ethernet
• Over Master Slave/Token Passing MS/TP
• Over Point-to-Point (PTP)
• Over ARCNET
The two main protocols we will discuss are BACnet/IP and BACnet over MS/TP.
Through the Looking Glass, A BACnet Message
A BACnet message consists of a few key features:
- Network APDU
- Network NPDU
- BVLL
- BACnet/IP or MS/TP Messages
Network Application Protocol Data Unit (APDU)
This is where the data flows. No, seriously, an APDU is the Protocol Data Unit for exchanging data between applications. Whether that application is embedded in a device or hosted on a server this PDU is what transfers the data.
Network Network Protocol Data Unit (NPDU)
The NDPU is what contains the version, priority, and other fields (you can think of NPDU as acting similar to several of the HTTP/2 flags, e.g priority).
Now if you recall your IT basics, you went through my IT course right? You should remember that as data flows down from the application layer (Layer 7) towards the physical layer (Layer 1) it gets encapsulated. This means that the data is "wrapped by the layer below it.
Therefore, as the message goes from network to network, the BACnet device can look at the NPDU to determine where to send the device.
BACnet Virtual Link Layer
BVLL, provides a way to create virtual links between BACnet devices. The BVLL also indicates whether messages are uni-cast or broadcast. This layer will become critically important when we discuss BACnet Broadcast Management Devices (BBMD) later in the article.
An example of an encapsulated BACnet/IP Packet is below.
BACnet/IP or MS/TP Messages
So is your head spinning yet?
Ya, I know this can be some confusing stuff. How do you think I felt writing this article?
Don't worry though, we are more than a quarter of the way through and, once we get through the next two sections, the rest of the material is easy.
BACnet/IP
BACnet over IP is a method from which BACnet/ Ethernet packets can use the framework of the UDP/IP protocol to send data to BACnet devices across multiple subnets.
For those who are less IT savvy, BACnet/IP allows messages that typically could only communicate on one local area network to communicate across multiple local area networks.
What is TCP/IP and UDP/IP
Before I deep dive into BACnet/IP, it will be good to level set on TCP and UDP. The difference between TCP and UDP is important because UDP is the protocol that BACnet and many of the emerging IoT Protocols use.
TCP/IP and UDP/IP are protocols that allows messages to communicate across multiple Subnets.
Internet Protocol (IP):
- Allows for transmission of data
- Applies addresses to devices
- Allows for the creation of logical subnets
UDP:
- Connection-less protocol
- Allows for small packets that are non-network intensive.
TCP:
- Verifies data transmission
- Has built in error correction
Why do we use BACnet/IP?
BACnet over Ethernet allowed building automation systems to transfer data via ethernet across a Bus architecture. This worked well initially but with the advent of the internet and the desire to have a single control system across a network of buildings the need for networks larger then 254 nodes was needed.
That is why ASHRAE adopted BACnet/IP in annex j of the 135- 1995 standard.
With the addition of BACnet/IP we gained a slew of new capabilities.
Most importantly, BACnet/IP allows us to:
- Communicate across multiple subnets
- Create multi-campus control systems
- Utilize the benefits of fiber and giga-ethernet
- Assign IP addresses to our devices, making the web accessible
How does BACnet/IP communicate?
There are four ways BACnet/IP can communicate:
- BACnet/IP to BACnet/IP (same subnet)
- BACnet/IP to BACnet/IP (different subnet)
- Broadcast (same subnet)
- Broadcast (different subnet)
BACnet/IP to BACnet/IP (same subnet)
In this situation the location of the two devices is already known by the host and the message is routed to the device using a local switch.
BACnet/IP to BACnet/IP (different subnet)
In this situation, the location of the two devices is already known by the host and the message is routed to the device using switches and routers.
Broadcast (same subnet)
This is a standard Who is/ I am message sent across a local subnet for the BBMD to discover what the address are for the BACnet devices on the subnet.
Broadcast (different subnet)
This is a standard Who is/ I am message sent across a local subnet for the BBMD to discover what the address are for the devices on other subnets.
What does a BACnet/IP Message look like
BACnet/IP uses a packet structure similar to a TCP/UDP Packet to pass messages from one device to another. A detailed description of a BACnet/IP packet is below.
A detailed description of a BACnet/IP packet is below.
Now, I don't expect you to understand all the flags and fields in this message. But you should at least be comfortable with the concepts of addresses and ports. If you aren't, you will be in for a world of hurt when you try to troubleshoot a BACnet installation.
Where is BACnet/IP Practical?
Not many vendors still use solely BACnet/Ethernet as most have adopted the BACnet/IP framework. Thus the ultimate answer is that BACnet/IP is practical for any solely BACnet system. The true choice on BACnet/IP is when you are utilizing a non native platform such as Tridium from which you have multiple protocol choices.
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).
Learn more about MS/TP:
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 four 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 a antennae effectively drawing interface to your bus).
BACnet Message Flow WHO-IS, I-AM
Sure there are other pieces to a BACnet message, but the above are the key features that you need to look at if you want to troubleshoot messaging.
Inside a message, you will often find information around:
- The Object
- BIBB- BACnet Interoperability Building Blocks- These blocks allow you to build BACnet capabilities into a device. An example of this would be the “T” block which stands for trends and allows a device to have the ability to receive and communicate trend objects.
- BACnet services- These services are very similar to the “calls” a computer makes when connecting to a website for data. This allows the device to perform the same communication tasks as other devices.
- MAC Address- Media Access Control or MAC, is the method at which a device identifies itself on a specific media. For MS/TP this is typically done in the form of an 8 bit number for Ethernet this is typically a series of Hexadecimal numbers that device a devices Network Interface Card or NIC.
You can see an example of a BACnet message below.
BACnet communicates via different methods utilizing the OSI network layer. The physical layer which consists of the wires and devices will allow the messages to be transported. Messages, once transported, will then be assigned a specific location to travel to on their local network in the data link layer.
Devices perform services calls for data and receive calls for data repeatedly. This is what causes the device to communicate. Now while the method from which the data is transmitted is different for IP over MS/TP the core services remain the same.
But what are devices?
Let's take a look at a device and what it means to you.
BACNET DEVICE
A simple definition of a BACnet device is a collection of objects that represent the functions present in a real device. This is why virtual devices can be considered a BACnet device as well as physical controllers. The device is defined by the objects inside not its physical architecture.
You see, in the programming world, we have this concept of objects and properties. Objects are instances of a class, and properties are characteristics of the class.
For example, in the real-world, you may have a class of vehicles called trucks (we won't get into superclasses here :-D ). This class can have various properties. For example, it may have a property called doors and that maybe a numeric property. It may also have a property called color and that may be a textual property.
So you could say that the instance of the truck object titled Ford had 2 or 4 doors and can be a variety of colors.
Well, BACnet has a set of objects and we are going to look at those in a bit. But first, let's think about this...
How would you set up 1,000 BACnet/IP devices?
Would you know what to ask IT? Would you know how to troubleshoot these devices if something went wrong? How would you support all these devices?
This episode of the Building Automation Monthly podcast will prepare your for these situations.
BACNet Objects
Object types are, according to the BACnet standard, ”a collection of information related to a particular function that can be uniquely identified and accessed over a network in a standardized way”
• An object will provide a set of properties that contain data related to that object.
• BACnet has a set of 23 standard object types.
A deeper dive into objects, properties, and services can be accessed Here.
BACnet Properties
There are so many properties that I could spend a whole article listing them out. However here's what you need to know.
Each object has a list of properties. And the properties are different for each object.
Often times folks will e-mail me asking why their BAS has the same description for each device even though they changed the device name. That's because they didn't change the device description property.
You see, understanding the properties that you have will help you to understand the capabilities you have.
What Does it Mean when a Product is BACnet Compliant?
In order to integrate multiple devices, you want to have a way to ensure that these devices can work with one another.
The method that the American Society of Heating and Air-Conditioning Engineers chose to achieve this was through the BTL or BACnet Testing Laboratory. The BTL created a series of listings that define the objects, properties, and functionality that a device can support. These are often called BIBB's (BACnet Interoperability Building Blocks).
The BIBB's are the set of functionality that when grouped together form a BTL listing.
A picture is worth a thousand words so let's look at some screen grabs off the Chipkin site. By the way, the folks at Chipkin do a great job of diving deep into BACnet; check them out!
As you can see, each BIBB is assigned to a class (in this case AE, the alarm and event class), and each BIBB achieves a specific set of functionality.
Now if we look at the Protocol Information Conformance Statement (PICS) for an Advanced Operator Workstation Listing we can see what BIBBs it conforms to.
So for those of you who are creating standards and specifications what you want to do is to browse through the BIBBs (once again Chipkins site is a good reference) and list out the BIBBs you want your BAS to achieve. Then you would identify the BTL listings that achieve this functionality.
So basically the workflow would be:
- Start with the server and identify the BIBBs you want. Then specify the BTL listing that most closely matches the set of BIBBs you want to achieve.
- Next, move to the supervisory devices and perform the same.
- Finally, move on to the field controllers and identify the capabilities you want there.
It's that easy, three steps to specification greatness.
Yes, this will take some time, and yes you will have to make trade-offs as to which BIBBs your systems implement.
But you will end up with a well-specified system that does what you want.
The alternative is you skip this step and cry to your BAS manufacturer about how their system doesn't do what you want it to do...
nEXT STEPS TO GROW YOUR BACNET KNOWLEDGE
So there you have it. In this guide, I covered the essentials of BACnet. At the end of the day you really need to understand:
- BACnet is a set of protocols and a data model that follow a standard. This means that BACnet communications and objects follow predictable rules. If you know these rules you can design and troubleshoot BAS installations.
- The BTL ensures that BACnet devices can integrate with one another through compliance with a set of BIBBs that form BACnet listings
- You can create a standard around BACnet for your projects by following the method I described earlier in this post
If you're serious about having a firm understanding of BACnet, I offer a comprehensive BACnet Bootcamp to get help you to the next level of your career. You'll learn everything you need to know about BACnet installation, setup, configuration, and troubleshooting in less than 4.5 hours!
So, now that you've read this guide, what are your thoughts? What questions do you have?
Ask them in the comments below and I will update this article with those answers.