Using multiple BACnet adapters

The following example illustrates how to use multiple BACnet adapters connecting to different devices.

The example below uses a total of three adapters, 1 x BACnet/IP and 2 x MS/TP using terminals EL6861. The next picture shows the overview in the TwinCAT system manager.

Using multiple BACnet adapters 1:

The device BACnet/IP is connected to the network adapter FEC1 of the CX9020.

Using multiple BACnet adapters 2:

The first MS/TP device Device 2 (BACnet MSTP) is connected to the terminal named Term 2 (EL6861).

Using multiple BACnet adapters 3:

The second MS/TP device Device 3 (BACnet MSTP) is connected to the terminal named Term 3 (EL6861).

Using multiple BACnet adapters 4:

All three devices are now connected to the PLC.

In this example devices connected to the network have already been scanned and are available as BACnet client references. Using the function FB Code (see separate chapter for details) code was generated to access the objects through function blocks from the BACnet library.

The next window shows the variables and code in the POU MAIN copied from the created client function blocks.

Using multiple BACnet adapters 5:

The code {attribute ‚TcLinkTo‘ := … generates a dynamic connection to the referenced BACnet device. The dynamic connection symbol is marked in green in the system manager.

The default adapter is connected using a manual connection.

The three connections look like this:

Using multiple BACnet adapters 6: