Persistence

The property values changed at runtime are stored in the file BACnetOnline_1010010.bootdata in the TwinCAT boot folder. Additionally there is a backup file named BACnetOnline_1010010.bootdata-old.

Switch on and configure BACnet persistence

In the settings of the BACnet server, persistence can be switched on and off in the dialog box Device Management.

Persistence 1:

Without using an uninterruptible power supply (UPS), persistence is performed at a configurable interval. The default value of 30 minutes should not be undercut, otherwise the flash medium could be subject to greater wear.

If a UPS is used, the property Use UPS can be activated. In this case, the PLC program must ensure that the function blocks of the UPS are used to detect a power supply failure. In this case, the function for persisting the data must be called on the part of the PLC.

Calling persistence from the PLC program

Two different methods are available to trigger persistence.

  1. Setting the variable bWritePersistent::
    BACnet_Globals.DefaultServer.bWritePersistent := TRUE;
    The variable must also be reset from the PLC program.
  2. Calling the SavePersistentStackData method:
    bSuccess := BACnet_Globals.DefaultServer.SavePersistentStackData();
    The return value can be used to detect whether the call was successful.

View and edit persistence data

You have opened the Device Management dialog box.
1. Select the Online Data > … option.
The dialog for editing the persistence data appears, the contents of which are explained below.

Persistence 2:

Option

Description

Enable

Switch on persistence.

Disable

Switch off persistence.

Transfer

Allows copying the persistent data to the default settings of the objects (Settings).

Delete

Deletes the files that contain the persistence data.

Save

Saves changed data in the persistence file.

Open

Can load and display a persistence file.

Accessing the persistence file with the FILE object

The persistence file is represented via BACnet within the server by the File object with instance number 1.

1. Double-click the Value field of the ObjectName to view the currently existing contents of the persistence file.
If the persistence file contains data, the Bootdata Viewer is called and the changed properties are displayed.

Persistence 3:

Bootdata Viewer

In the window Bootdata Viewer the changed properties from the persistence file are displayed and can also be marked and copied from there for further processing.

Persistence 4:

In this example, in the Analog Value object with instance number 10000, the properties ObjectName, Description, HighLimit, EventDetectionEnable and PlcSymbolName have been changed.

Delete persistence data

Call Dialog Online Data

1. In the BACnet server, open the Settings tab.
2. Click the menu item Online Data > …

Persistence 5:
The dialog box Persistent Data Online Management opens.
Persistence 6:
3. Click the Disable button.
4. Then click the Delete button in the same menu.
Persistence 7:
5. Note the status display.
This provides information on whether the function could be executed successfully.
6. Finally, restart via the TwinCAT main menu by clicking the Runtime Mode button.

Persistence 8: