Testing BACnet using a BACnet Explorer
In this example, the tool YABE - Yet Another BACnet Explorer is used. The tool can be downloaded from here: https://sourceforge.net/projects/yetanotherbacnetexplorer/.
- Start YABE.
- 1. Select Add device. This function can be accessed via the Functions menu , the green button with the plus sign or by right-clicking on Devices.
- A dialog named Scan opens.
- 2. Select in the category BACnet/IP over UDP the standard BACnet port BAC0 (corresponds to 47808 in decimal notation) and select the network adapter of your engineering PC (Local endpoint).
- 3. Select the Add button (the button to the right of the BACnet port).
- The device created in TwinCAT should now appear.
- 4. Select the device. This resolves the Device Object Name and starts the evaluation of the BACnet objects contained in the device.
- In the device window the tree items represent the objects contained in the device.
- 5. Select ANALOG_VALUE:10000.
- This starts the resolution of the object name (fbAv).
- Selecting an object in the list of objects opens the object properties display in the right Properties window.
Using CTRL-N after selecting a device resolves all object names of all objects in the device. This may take some time, especially if slower MS/TP devices are searched (MS/TP = Master Slave Token Passing = serial BACnet based on RS485). |
This window does not update the property values automatically! To read the properties again, select another object and return to the observed object. |
Subscribe for Change of Value (COV)
COV is a BACnet procedure to automatically report changes in Present Value and Status Flags to BACnet clients subscribed to the object.
- 1. To use COV in YABE, right-click on the object and select Subscribe. Alternatively, you can drag and drop the object into the Subscriptions window.
- The selected object is now displayed in the Subscriptions window and is automatically updated when the Present Value and/or the Status Flags of the object change. For analog object types, the COV Increment property is used to suppress minor value changes. The subscription lifetime can be adjusted in the Settings dialog (Subscriptions Lifetime).
- 2. Return to TwinCAT, log in to the PLC and open the POU MAIN.
- 3. Expand the display of FB fbAv by clicking on the plus symbol.
- 4. Navigate to the variables bEnPgm and fValPgm.
- 5. Insert the following values in the Prepared value column. If bEnPgm is set to TRUE, the value fValPgm is set to the Present Value with the specified priority for the program (default: 15).
- 6. Select Write Values from the PLC menu.
- 7. Switch to the online view in the TwinCAT System Manager or switch back to YABE.
- The Present Value property should now display the value "42".