BACnet driver config file

This chapter includes an example for the BACnet driver configuration in the config file. For details about the possible configs in the config file see Possible Config Entries of the BACnet Driver.

For a start of the BACnet driver the config entry net is mandatory:

Example for the BACnet driver config file

This entry configures the type of connection to the BACnet devices:

Example

[bacnet]
net = 1 "IP" "" "" 47808 "" 0 120

Syntax

net = <Network> <IPAddress> <Subnetmask> <UDPPort> <BBMDAddress> <BBMDMaxForeignDevices> <ForeignDeviceHoldingTime>

The parameters have the following meaning:

  • Network - The unique assigned network number. Currently the BACnet driver is able to communicate with only one network.
  • IP - Protocol type. The current version supports IP (BACnet/IP).
  • IPAddress - IP address of the network card, over which the BACnet/IP net is accessible. If the entry is empty, the IP address is specified by the own host name. The latter works only then when there is only one network card attached/used in the computer.
  • Subnetmask - The subnetmask defines the broadcast addresses, with which the broadcasts are sent into the BACnet net. If the subnetmask entry is empty ("") so the subnetmask of the configures network connection is used.
  • UDPPort - UDP port is used for the BACnet/IP communication. In most cases the port has to be set to 47808 (0xBAC0).
  • BBMDAddress - IP address of "BACnet/IP Broadcast Management Device". If the BACnet driver should use a BBMD as client, the entry must be set to the IP address of the BBMD.
  • BBMDMaxForeignDevices - If the BACnet driver should work as BBMD, the value must be set higher than 0. The value defines the maximum number of foreign devices (default = 0).
  • ForeignDeviceHoldingTime - Holding time for foreign devices (default = 120 seconds).

BACnet/IP Broadcast Management Device (BBMD)

Broadcast messages (Who-Is) are used to discover BACnet devices within a local network. However, IP routers cannot transmit these messages to other networks, which means that only devices within the local network receive the messages. Therefore, devices in other networks are not discovered.

This issue is solved by using BBMDs. There must be one BBMD for each subnetwork. A BBMD might be a device or a software application and is used to forward the broadcast messages received from local network via unicasts to the BBMDs of the other networks. These BBMDs will distribute the request in their local network.

WinCC OA BACnet driver as BBMD

If the WinCC OA BACnet driver shall be used as BBMD in one of the subnetworks proceed as follows:

Define the config entry "net" and set the appropriate value for BBMDMaxForeignDevices.

As a result, the driver automatically creates the "bdt_<network number>" file in the /data folder of the project. The network number is the unique assigned network number defined via the "net" config entry. You can change the file location by the [bacnet] bacnetBdtLocation config entry.

If the driver receives a message from the BBMD of another subnetwork, the respective entry for this BBMD is automatically set. However, it may be the case that not all BBMDs are automatically registered in the file. Therefore it is safer to enter all necessary BBMD entries manually. The appropriate syntax is described in the header of the bdt file.

If the file is correctly defined, the driver sends Who-Is messages not only as local broadcasts but also directed to the given BBMDs in other networks.

WinCC OA BACnet driver using a BBMD

If there is already another BBMD in the subnetwork, the driver can use this device by setting the BBMD IP address in the "net" config entry as BBMDAddress.