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.
The Menu Bar
| 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:
- StartUp option:
two options are available. - "Manual" => TwinCAT Database Server is active and waiting for function calls from the PLC, with the aid of function blocks from TcDatabase.lib.
- "AutoStart" => TwinCAT Database Server is active and starts logging of the set symbol groups as soon as the TwinCAT system is in "RUN" mode.
PLC programs from which variable values are to be logged must run as boot projects! - ErrorLog option:
enable the error log mechanism. Any errors that occur are logged to a text file. The logged errors can then be used for error analysis.
Additionally, the storage path of this text file can be specified. - Impersonate option:
the Impersonate option must be set for network access to file-based databases such as Access databases or SQL Compact databases so that the TwinCAT Database Server can connect to this network drive. For further information see Impersonate. This feature is currently not supported in Windows CE.
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
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.
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.
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.
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.
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.
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".
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.
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.
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.
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. |
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.
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.
SQL Query Editor
The SQL Query Editor helps to generate SQL commands and test the configured database connections. Further information here