MS Excel database

The variable values are stored in a Microsoft Excel database.

Declaration in the TwinCAT Database Server Configurator

Microsoft Excel database

DBValueType

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

DBType

Select "MS Excel". PLC: eDBType_MSExcel.

DBServer

Not required.

DBProvider

"Microsoft.Jet.OLEDB.4.0" or "Microsoft.ACE.OLEDB.12.0"

DBUrl

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

DBTable

DBTable contains the name of the table.

MS Excel database 1:

Windows CE support

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

MS Excel 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 Excel

PLC Control

eDBColumn_BigInt

Number

LREAL

eDBColumn_Integer

Number

LREAL

eDBColumn_SmallInt

Number

LREAL

eDBColumn_TinyInt

Number

LREAL

eDBColumn_Bit

BOOLEAN

BOOL

eDBColumn_Money

Currency

LREAL

eDBColumn_Float

Number

LREAL

eDBColumn_Real

Number

LREAL

eDBColumn_DateTime

Date

DT

eDBColumn_NText

Text

STRING(255)

eDBColumn_NChar

Text

STRING(255)

eDBColumn_NVarChar

Text

STRING(255)

MS Excel database 3:

Functions that are not supported

Automatic ID generation is not supported by this database. If the standard table structure is used in Configure mode, the value of the ID is not set.

MS Excel database 4:

Non-supported data types

Binary, VarBinary and Image are not supported with Excel databases.

MS Excel database 5:

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.