MS Access database

The values of the variables are saved in a Microsoft Access database.

Access 2000 and Access 2003 (*.mdb) database files are compatible, as are Access 2007 (*.accdb) files. All you have to do is specify different providers in the declaration in the XML configuration file.

Declaration in the TwinCAT Database Server Configurator

Microsoft Access database

DBValueType

Select "Double" to limit logging to alphanumeric and Boolean data types.
Select "Bytes" to also log structures and strings.

DBType

Select "MS Access". PLC: eDBType_Access.

DBServer

Not required.

DBProvider

Access 2000 - Access 2003:
The provider is "Microsoft.Jet.OLEDB.4.0".
Access 2007:
The provider is "Microsoft.ACE.OLEDB.12.0".

DBUrl

DBUrl contains the path to the MDB file.
e.g. C:\TwinCAT\TcDatabaseSrv\Samples\TestDB.mdb

DBTable

DBTable contains the name of the table.

MS Access database 1:

Windows CE support

Under Windows CE this database is not supported by the TwinCAT Database Server.

MS Access database 2:

TwinCAT/BSD support

This database is not supported by the TwinCAT Database Server on the TwinCAT/BSD platform.

Data type mapping between DB and PLC

E_DBColumnTypes

MS Access

PLC Control

eDBColumn_BigInt

Integer4

DINT

eDBColumn_Integer

Integer2

INT

eDBColumn_SmallInt

Integer2

SINT

eDBColumn_TinyInt

Integer1

SINT

eDBColumn_Bit

YESNO

BYTE

eDBColumn_Money

Currency

LREAL

eDBColumn_Float

Double

LREAL

eDBColumn_Real

Single

REAL

eDBColumn_DateTime

DATETIME

DT

eDBColumn_NText

Text

STRING

eDBColumn_NChar

VarChar

STRING

eDBColumn_Image

OLEOBJECT

ARRAY OF BYTE

eDBColumn_NVarChar

VarChar

STRING

eDBColumn_Binary

OLEOBJECT

ARRAY OF BYTE

eDBColumn_VarBinary

OLEOBJECT

ARRAY OF BYTE

MS Access database 3:

Data type support

WSTRING is not supported by this database. (See WString support)

Notice

Data security

In flash memory devices the number of write access operations is limited. The flash memory devices can fail, with a risk of data loss.

  • Make regular backups of your system. Use the IPC diagnostics in order to determine the status of the flash memory devices.