Tc2_Database

All sample applications for the TwinCAT Database Server were consolidated in a solution. The solution can be downloaded here from a central location: TcDBSrv_InfoSysSamples.zip

In addition to the tszip file for the TwinCAT 3 solution, the zip file contains all the required file-based databases. If the folder "Samples" from the zip file is located in the default installation folder: C:\TwinCAT\Functions\TF6420-Database-Server\Win32, the paths in the Database Server configuration do not have to be edited further. The samples with non-file-based databases, such as MS SQL, have to be individual adapted with the configurator.

The individual samples are documented in detail on separate pages:

SP project name

Description

Create_DB_Sample

Creating a database connection and a table from the PLC

Cyclic_RdWrt_Sample

Cyclic logging/writing to/from a database

Write_DB_Sample

Writing of variables into a database with a simple PLC function block without SQL command

SQL_InsertSelect_Sample

Sample with function block FB_DBRecordInsert/FB_DBRecordArraySelect

StoredProcedures_Sample

Stored procedures with FB_DBStoredProceduresRecordArray

XML_DB_Sample

Using XML files as database

XML_XPath_Sample

XML XPath sample without schema

XML_XPath_Schema_Sample

XML XPath sample with XML Schema, comparable with TwinCAT XML Server "Read"