Write direction mode
The TwinCAT Database Server has four different write direction modes. These are explained below.
DB_TO_ADS
This write mode is used to cyclically read variable values from a database and write the read values into PLC variables.
ADS_TO_DB_APPEND
This write mode is used to cyclically write variable values from the PLC into a database. Each time a new record is created and appended at the end of the table/file.
ADS_TO_DB_UPDATE
This write mode is used to cyclically read variable values from the PLC and compare the read values with the database records. If differences are detected, the corresponding record is modified with the new value.
ADS_TO_DB_RINGBUFFER
This write mode can be used to specify the number of records or the age of records.
This write mode is available during cyclic logging via the symbol groups and during logging with the function block FB_DBWrite.
The RingBuffer mode is available for all database types. This mode can also be used to influence logging in ASCII files.
RingBuffer-Arten
The RingBuffer can be used in two different ways:
- "RingBuffer_Time"
- "RingBuffer_Count"
RingBuffer Time
In this mode a time can be specified for the maximum age of the record. If this age is exceeded, the corresponding record is deleted.
RingBuffer Count
In this mode a maximum number of records can be specified. When the maximum number is reached, the oldest records are deleted in order to make room for the new ones.
Declaring the RingBuffer mode in the XML configuration file editor
RingBuffer_Time:

The time is specified in milliseconds.
RingBuffer_Count:
Declaring the RingBuffer mode in FB_DBWrite:
RingBuffer_Time:
RingBuffer_Count: