Goal is to configure a second AC500 controller as BACnet client which reads an analog value from a server. This example is according to Fig. 280 BACnet objects, properties, services and BIBBs, right part.
-
Add a new controller and configure a “BACnet Server” root object according to ⮫ “Configuration of BACnet server root object ”.
-
Set
InstanceNumberto14andInstanceNametoDevice 14.
-
In addition to BACnet objects, BACnet clients can also be inserted as devices under a “BACnet Server”. Add a “BACnet Client Read Property” below the “BACnet Server” node.

-
The created object “BACnet Client Read Property” generates a function block instance which can be used to program the client read functionality. The figure below shows a simple example.
In line 1-5 of the code part the function block is called with the following parameter:
-
Device ID of the server to read from (
12) ⮫ “Supported objects and properties ” -
Object ID of the object to read from (
1010for the “Analog Input”) -
Object type (“Analog Input”)
-
Property to read (“present value”)
-
triggerReadto start the read operation
When the user (or another program part) sets the variable
triggerReadfromFALSEtoTRUEthe edge triggered function blockBACnet_Client_Read_Propertystarts operation and sends the read request to the server device. After receiving the reply from the Server, the output.xDonegetsTRUE(line 8) and the temperature value can be read from the output.result(line 14).
-
-
Download this program to another AC500 controller, which is in the same IP network as the server. Set it to run and read the temperature value by setting
triggerReadtoTRUE. In online mode the read temperature value can be observed in line 14.
Alternative configuration
Unlike BACnet objects, a BACnet client does not require a complex (static) configuration, thus a client function block can be used without creating a BACnet client as device.

There is no BACnet_Client_Read_Property object created below the “BACnet Server”. Instead a function block BACnet_Client_Read_Property must be declared in the PRG (line 6 in the declaration) and initially "connected"
to its “BACnet Server” in IEC-code via RegisterToServer(), and thus get activated (line 2 in the code) ⮫ “Reference, function blocks”.
