Database Server functionality
The Database Server provides different communication ways and is configured by a XML configuration file.
- Communication flow in two directions
- ADS_TO_DB
Cyclic checking of a TwinCAT ADS device (e.g., TwinCAT PLC) and writing of these data to a "database" - DB_TO_ADS
Cyclic checking of a "database" (e.g., SQL database) and writing of these data to a TwinCAT-ADS device (e.g., a PLC) via ADS - Configuration of the "TwinCAT Database Server" is based on an XML file. This configuration file describes the required "databases", ADS devices (e.g., PLC runtime systems), and variables.
Two storage methods: - "Double" The compatible variable data types are: BOOL, LREAL, REAL, INT, DINT, USINT, BYTE, UDINT, DWORD, UINT, WORD, SINT
- "Bytes" Compatible to all variable data types especially for strings and data structures
Two different function modes:
- AutoStart:
Starts the cyclic checking of the PLC values from an ADS device (ADS_TO_DB) or the cyclic checking of a database (DB_TO_ADS) automatically, as soon as the TwinCAT System is an "RUN" - mode. The checking PLC program should be running as a bootproject. - Manual:
Functions like logging in a database or reading from a database could be started out of the PLC with function blocks.
The following diagram illustrates the server functionality.
The central unit of the TwinCAT 3 Database Server is the XML-Configuration file editor from which all needed options and configurations are made. The created Configuration could be used in two different modes (AutoStart/Manual). The TwinCAT 3 Database Server is the connective link between the PLC and the database.
Important!!
Errors can occur because of byte alignment when logging structures from ADS devices with ARM processors.
Errors can occur when logging structures from the BC9000 with floating point variables.