Tc2_Database

Overview

The Tc2_Database library contains function blocks for controlling and configuring the TwinCAT 3 database server.

Function blocks

Name

Description

FB_GetStateTcDatabase

Retrieves status information.

 

 

FB_DBConnectionAdd

Adds database connections to the XML configuration file.

FB_DBAuthentificationAdd

Adds authentication information for the respective database connection to the XML configuration file.

FB_DBOdbcConnectionAdd

Adds an ODBC database connection to the XML configuration file.

FB_AdsDeviceConnectionAdd

Adds an ADS device to the XML configuration file.

 

 

FB_DBReloadConfig

Reloads the XML configuration file

FB_GetDBXMLConfig

Reads all database configurations from the XML configuration file.

FB_GetAdsDevXMLConfig

Reads all ADS device configurations from the XML configuration file.

 

 

FB_DBConnectionOpen

Opens a connection to a database.

FB_DBConnectionClose

Closes a connection to a database.

 

 

FB_DBCreate

Creates a new database

FB_DBTableCreate

Creates a table with any desired table structure

 

 

FB_DBRead

Reads one value out of the database

FB_DBWrite

Writes one variable value, with timestamp, into a database

FB_DBCyclicRdWrt

Starts or stops the logging/writing of variables

 

 

FB_DBRecordSelect

Reads a data record out of a table

FB_DBRecordSelect_EX

Reads a data record out of a table (command length less than 10,000 characters)

FB_DBRecordArraySelect

Reads several records from a table.

FB_DBRecordInsert

Creates a new data record.

FB_DBRecordInsert_EX

Creates a new data record. (command length less than 10,000 characters)

FB_DBRecordDelete

Deletes a record from a table.

 

 

FB_DBStoredProcedures

Executes a stored procedure.

FB_DBStoredProceduresRecordReturn

Executes a stored procedure and returns a record.

FB_DBStoredProceduresRecordArray

Executes a stored procedure and returns several records.

Data Types

Name

ST_DBColumnCfg

ST_DBXMLCfg

ST_ADSDevXMLCfg

ST_DBSQLError

ST_DBParameter

E_DbColumnTypes

E_DBTypes

E_DBValueType

E_DBWriteModes

E_DBParameterTypes

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Database