BACnet setup in CODESYS
In order to use the BACnet library, the setup of the BACnet IP datalink and the BACnet server in CODESYS must first be carried out.
BACnet IP datalink
Add Ethernet interface
In the device tree the device Ethernet is attached. This sets the physical interface for BACnet communication.

Configure Ethernet interface
Now the device is configured; the IP address of the target device (i.e. of the own CPU) must be specified. The IP address of the other BACnet participant is determined communicatively (Who-Is – request via broadcast telegram X.255).

Add BACnet IP datalink
In the device tree below the device Ethernet the device BACnet IP datalink is attached.

Configure BACnet IP datalink
Here the BACnet network number and the UDP port used (default: 47808) are primarily specified.

BACnet Server
Add BACnet Server
In the device tree the device BACnet Server is attached. It serves as the BACnet communication hub and must always be present. The client-server principle is applied: the client reads/writes data provided by the server.

Configure BACnet Server
The target device (our CPU) can be operated both as a BACnet server and as a BACnet client (also simultaneously). When operating as a BACnet server, the objects (for example a temperature actual value of the target device) are attached as devices beneath the BACnet server. When operating as a BACnet client, the objects are defined in CFC. Within it the character set used (UTF8) and the option AutoStart (automatic start of BACnet communication) are defined

Furthermore, the properties of the object Device (i.e. of the own BACnet server) can be specified here, which another BACnet participant can then read.

Last updated

