1.833.888.0091contact@ehzee.ca

BACnet and Modbus are the two protocols you are most likely to meet in building automation. BACnet was designed for buildings and describes equipment in a structured, self-explaining way; Modbus is an older, simpler industrial protocol that moves numbered registers and leaves their meaning to a vendor's documentation. Most buildings use both, and knowing the difference saves a great deal of trouble at integration time.

A protocol is the agreed language that controllers, meters, drives and software use to exchange data. When every device in a building speaks an open protocol, the owner can mix equipment from different makers and choose who services the system. When devices speak only proprietary languages, every connection needs a custom gateway and every change goes back to one vendor.

How BACnet works

BACnet was developed for building automation and is published by ASHRAE as Standard 135; it is also an ISO standard. Its central idea is that every device describes itself as a set of objects, and every object has properties.

  • A supply air temperature sensor appears as an Analog Input object, with properties such as Present Value, Units, Description and Status Flags.
  • A fan start command appears as a Binary Output object.
  • A setpoint stored in a controller appears as an Analog Value object.
  • Schedules, calendars, trend logs and notification classes are objects too.

Devices then use standard services to work with those objects: read a property, write a property, subscribe to changes of value, report alarms and events, discover what devices and objects exist on the network. Because objects carry their own names and units, a workstation can find a new controller and understand much of what it holds without a separate map.

Commands in BACnet go through a priority array. Several sources can write to the same output at different priorities, such as a manual operator override, a demand-limiting routine and the normal sequence, and the highest-priority active command wins. Releasing an override returns control to the next level down. Overrides that are never released are one of the most common reasons a BACnet building does not behave as designed.

How Modbus works

Modbus dates from the late 1970s, when it was created for programmable logic controllers. It is simple, widely supported and still common in meters, variable frequency drives, generators, boilers, chillers and UPS units. One device acts as the client (traditionally called the master) and asks; the others act as servers (slaves) and answer. A server never speaks unless asked.

Data in Modbus lives in four tables:

  • Coils: single bits that can be read and written, such as a run command.
  • Discrete inputs: single bits that can only be read, such as a status contact.
  • Input registers: 16-bit values that can only be read, such as a measured current.
  • Holding registers: 16-bit values that can be read and written, such as a setpoint.

A register is just a number at an address. Whether register 3 is a voltage in tenths of a volt, part of a 32-bit energy total or a fault code is defined only in the maker's register map. Integrators routinely deal with scaling factors, values split across two registers, word-order differences and the old convention of numbering holding registers from 40001 while the protocol itself counts from zero. Modbus RTU runs over RS-485 serial wiring; Modbus TCP runs over Ethernet.

Comparing the two

The clearest difference is in what a device tells you about itself. A BACnet device can be asked what it contains and answers with named, typed objects. A Modbus device answers only the register numbers it is asked for, and the meaning lives in a document.

BACnet: objects Analog Input 1 supply air temp, value, °C Binary Output 3 fan start, priority array Analog Value 5 setpoint, value, °C self-describing Modbus: registers Coils 1-bit, read/write Discrete inputs 1-bit, read only Input registers 16-bit, read only Holding registers 16-bit, read/write meaning is in the maker's map
Two ways of describing the same equipment. A BACnet device presents named objects with properties such as present value and units, so software can discover what it holds. A Modbus device presents four tables of numbered bits and registers, and only the maker's register map says what each number means.

They also differ in how data moves. Modbus clients poll: they ask each device for the same registers over and over, and a busy serial network can only poll so fast. BACnet supports polling too, but also lets a client subscribe to a value so that the device reports only when it changes, which keeps traffic down and updates quick.

Modbus: polling Client Device read registers values BACnet: change of value Client Device subscribe acknowledge value changed value changed
Polling versus change of value. A Modbus client asks for the same registers again and again, whether or not anything has changed. A BACnet client can subscribe once, and the device sends a notification only when the value changes.
BACnetModbus
Designed forBuilding automationIndustrial controllers
Data modelNamed objects with properties and unitsNumbered bits and 16-bit registers
DiscoveryDevices and objects can be discoveredNone; needs the register map
Alarms, schedules, trendsBuilt into the standardLeft to the client software
Typical mediaBACnet/IP on Ethernet, MS/TP on RS-485Modbus TCP on Ethernet, RTU on RS-485
Typical useControllers, workstations, VAV and AHU controlMeters, drives, generators, packaged plant

Networks and wiring

In most buildings, BACnet/IP runs on the Ethernet network between supervisory controllers and workstations, while field controllers hang off serial trunks below them. BACnet MS/TP and Modbus RTU both use RS-485 wiring, and both suffer from the same installation mistakes.

BACnet/IP over Ethernet BACnet router supervisory controller Workstation operator Modbus gateway maps registers MS/TP (RS-485) VAV 1 VAV 2 AHU daisy chain, terminated at ends Modbus RTU Meter VFD
Ethernet above, serial trunks below. BACnet/IP links the router, workstation and gateway over Ethernet. Below the router, an MS/TP trunk runs as a daisy chain from controller to controller and is terminated at both ends. The gateway polls a separate Modbus RTU trunk serving a meter and a drive.

Good RS-485 practice for either protocol:

  • Run the trunk as a daisy chain from device to device. Avoid star wiring and long stubs.
  • Use the shielded twisted-pair cable the device makers specify, and ground the shield as they direct.
  • Terminate the two ends of the trunk, and only the two ends, and provide biasing where the devices require it.
  • Give every device a unique address and set the same speed on every device on the trunk.
  • Keep the number of devices and the trunk length within the makers' limits, and record the trunk on the drawings.

On the IP side, BACnet discovery relies on broadcast messages that do not cross routers by default, so multi-subnet systems need BACnet broadcast management devices or equivalent configuration. A newer option, BACnet Secure Connect (BACnet/SC), carries BACnet over encrypted connections and is worth asking about for new systems; our guide to cybersecurity for building automation explains why.

Specifying an open system

  • Ask for each BACnet device's Protocol Implementation Conformance Statement (PICS), which lists the objects and services it supports, and prefer devices tested and listed by the BACnet Testing Laboratories.
  • Require the device profile that fits each role, such as building controller, advanced application controller or operator workstation.
  • For Modbus equipment, require the complete register map, with scaling and data types, as a submittal.
  • Set a naming convention for devices, objects and points before programming starts. Our guide to BAS points and sequences of operation covers points lists.
  • Require the owner to receive programming tools, licences, passwords and backups at handover.

How ehZee can help

We design building automation systems around open protocols, choose where BACnet and Modbus each fit, and specify the networks, gateways and documentation that make integration work. See our building automation system design service.

Common questions

Is BACnet always better than Modbus?

For controllers and workstations, BACnet's richer model usually makes life easier. For a meter or a drive that only needs to report a few values, Modbus is perfectly adequate and often the only option. Most buildings use both.

Does "BACnet compatible" mean it will work with my system?

Not necessarily. Devices support different subsets of BACnet. Compare the PICS against what your system needs, and look for BTL listing.

Why do my Modbus values look wrong?

The usual causes are an address offset of one, the wrong scaling factor, or a 32-bit value read with the wrong word order. Check each against the register map.

What is BACnet/SC and do we need it?

BACnet Secure Connect carries BACnet messages over encrypted, authenticated connections instead of open broadcasts. It is newer than the other BACnet network types, so check which devices and software support it. For new systems it is worth including in the discussion with your controls contractor and IT group.