XML - configuration file editor

The TwinCAT Database Server is configured via XML configuration file.
The settings in the configuration file can easily be created and modified with the help of the XML configuration file editor. New configuration files can be created, or existing configuration files can be read in and edited.

XML - configuration file editor 1:

The Menu Bar

XML - configuration file editor 2:

 

Description

New configuration file

Creates an empty configuration file with default settings.

Open

Opens an existing XML configuration file.

Save

Saves all the changes that have been made, creating a configuration file with the name: "CurrentConfigDataBase.xml".

File Upload

Uploading of the configuration file to the Database Server, saves the configuration file at the specified "Boot"-directory and activates the configuration.

New database

Creates a new database configuration entry.

New ADS device

Creates a new ADS device configuration entry.

New symbol group

Creates a new symbol group configuration entry.

Delete

Deletes the selected configuration entry. This can be a database, an ADS device or a symbol group.

Insert symbols TPY

Imports symbols/variables from a TPY file into the selected symbol group.

Insert symbols ROUTE

Imports symbols/variables from a Runtime system of a specified route.

SQL Query Editor

Editor for generate SQL commands easily. Further information here.

Live Status

Shows the current state of the TF6420 Database Server and start or stop the cyclic read/write function.

Error Log

Shows the logged errors of the error logfile "TcDBSrvErrorLog.txt"

Option dialog

This dialog can be used to set options for the TwinCAT Database Server:

XML - configuration file editor 3:

Database Configuration Dialog

All the information required for database communication can be entered in this dialog. Only fields for the necessary entries are enabled.

The DBValueType indicates the data type of the "Value" column. PLC structures and strings cannot be logged if the data type is "double". Structures and strings can be logged if the data type is "bytes".
You can choose if the database communication needs an authentication or not. If you want to add authentication information, the fields DBSystemDB, DBUserId and DBPassword will be enable.
The field DBSystemDB is needed for Access databases only. In this field you must write the path of the MDW-file. In this file all information like usernames and passwords are saved.
DBUserId is the username and DBPassword is the necessary password.

configuration of all database types: database-configuration

XML - configuration file editor 4:

If you choose ODBC-database types the input mask will be changed. Further information for the ODBC-connection like Port, Protocol, Driver, Scheme and Sequence must be insert.

XML - configuration file editor 5:

ADS Device Configuration Dialog

All the information required for communication with the ADS devices can be entered in this dialog. For easier input all declared RemotePCs of the TwinCAT System will be listed and could be selected. Of course, it is possible to insert other NetIds, which are not declared as RemotePCs.

XML - configuration file editor 6:

Symbol Groups Configuration Dialog

Symbol groups can be arranged in this dialog and assigned to ADS devices or databases. In addition, the writing direction of the symbol group is specified. There are various setting options see Write direction mode.

XML - configuration file editor 7:

This dialog also contains a symbol counter. It returns the number of symbols declared in the individual groups. If more than 500 symbols are declared, the display turns red, as no more than 500 symbols/variables may be declared for each symbol group.

If, due to the database settings, data types are not supported, these symbols are highlighted in red and a warning message is displayed in the upper region.

XML - configuration file editor 8:

Of course, symbol rows could be copy and paste. You only must select a row and click the right mouse button. A context menu open and you can choose the desired function.

XML - configuration file editor 9:

Import of symbols

It gives two possibilities to import symbols into the TwinCAT Database XML configurator. One way is to read out the TPY file. The other way is directly from the target device with the Target Browser.

Symbols from TPY

All symbols of this project will be listed very clearly in the following dialog. Also, you can import each element of an array or of a structure into the symbol group. So, you can log arrays and structs which consist of numeric data types if the selected DBValueTyp is "Double".

XML - configuration file editor 10:

Directly from the target with the Target Browser

The Target Browse is used to add channels by a known Symbol to the configuration. The Target Browser is separated in three parts. The left one shows a tree view with the root named ROUTES. Beneath all TwinCAT System Manager known targets are listed. The color of the nodes explains the system state: Red= not Connected (Stop-Mode), Blue= Config Mode, Green= Run Mode.

The second part contains a list view showing the details of the selected node in the tree view.

In the third part is a list view which show all choose symbols.

XML - configuration file editor 11:

It is possible to add new ADS ports in the Target Browser. So, it is realizable to log values directly from EtherCAT terminals, if the ADS port is enabled in the TwinCAT System Manager under EtherCAT Device Image.

XML - configuration file editor 12:

Uploading the XML configuration file to the TwinCAT Database Server

The created XML configuration file must be copied into the corresponding "TwinCAT\Boot" directory for activation and uploaded to the TwinCAT Database Server by a restart of the TwinCAT system, or by the function block FB_DBReloadConfig.

Another option is to activate the generated file using the "Upload" dialog. It is only necessary to select the desired ADS device and start the process with the Upload button. The XML configuration file is then transmitted to the TwinCAT Database Server, stored in the boot directory and read.

XML - configuration file editor 13:

To use the service, TwinCAT must be installed and in RUN mode on the host PC running the XML configuration file editor. Furthermore, the TwinCAT Database Server must be started on the corresponding ADS device.

XML - configuration file editor 14:

Live Status of the TF6420 Database Server

At this dialog the current state of the Database Server will be shown. It is possible to check the status of the Database Server from a remote computer. It is also possible to start or stop the cyclic read/write functionality of the Database Server. If error occurs during the cyclic read/write process, the sqlstate and the errorcode of the occured error will be shown too.

XML - configuration file editor 15:

Error Log (TcDBSrvErrorLog.txt)

At this dialog all items of the error log file "TcDBSrvErrorLog.txt" will be shown. It is also possible to clear the error log file.

XML - configuration file editor 16:

SQL Query Editor

The SQL Query Editor helps to generate SQL commands and test the configured database connections. Further information here

XML - configuration file editor 17: