> For the complete documentation index, see [llms.txt](https://docs.videc.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videc.de/acron-9.3/en/anlagenkonfiguration/prozessanbindung/provider/providerid/treiberauswahl/universeller-odbc-treiber-fuer-werte.md).

# Universal ODBC driver for values

#### Background

The measurement data are imported by the ACRON Provider via the ODBC interface and saved to the ACRON database.

The SQL statement to read the data is freely configurable. ACRON logs the time from which data were transferred, and resumes from that point on the next transfer.

A basic distinction is made between two modes:

|             |                                                                                                                                                                                                                                                                                                          |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| All mode    | The values are polled for all external variables jointly with a SQL command. This is the correct method in most cases.                                                                                                                                                                                   |
| Single mode | The values are polled for each external variable individually by a SQL command. This method is useful when new values are received in the ODBC source at different times. For example, an online value for one variable arrives every second, but another variable only receives a new value once a day. |

#### Configuration of the SQL query command

The driver retrieves the SQL query command from an ASCII text file. This file must be in the following path:

The file must be placed in the plant data path on the server (not in the plant cache!). This is the path specified when setting up the plant, and also the one displayed in ACRON Admin.

The driver initially searches for a file named `ODBC_UNI_Statement.txt`. If this file is not available, the driver searches for the file `ODBC_UNI_Statement_X.txt`, with the "X" being replaced by the identification (Provider number).

So for Provider 1 it searches for file `ODBC_UNI_Statement_1.txt`.

If the file is not present either, the following SQL statement is executed:

#### Default query in All mode

`SELECT Timestamp, Tagname, Value`

`FROM Processdata`

`WHERE (Timestamp >= {ts '%s'})`

`ORDER BY Timestamp`

Where "%s" occurs in the statement, the last successful transfer date is inserted during the program runtime.

You can define any statements you want, including complex ones such as Joins. The only condition is that the three columns are produced as the result in the specified sequence:

* Column 1 (Timestamp) as SQL data type Timestamp
* Column 2 (Tag name) as SQL data type Text
* Column 3 (Value) as SQL data type Numerical or Text

#### Default query in Single mode

`SELECT Timestamp, Value`

`FROM Processdata`

`WHERE (Tagname = '%s' AND Timestamp >= {ts '%s'})`

`ORDER BY Timestamp`

Where the first "%s" occurs in the statement, the name of the external variable to be polled is inserted during the program runtime.

Where the second "%s" occurs in the statement, the last successful transfer date is inserted during the program runtime.

You can define any statements you want, including complex ones such as Joins. The only condition is that the following two columns are produced as the result in the specified sequence:

* Column 1 (Timestamp) as SQL data type Timestamp
* Column 2 (Value) as SQL data type Numerical or Text

Note

The driver always requests the value from the data source as text, and automatically converts it into the configured ACRON data type of the external variable.

Service pulses cannot be imported. Here service counters must be formed in the PLC.

All data returned by the SQL query are imported as a matter of principle. Existing data with the same time stamp are overwritten in the ACRON database.

#### Syntax of external variable

Indication of the variable name as returned by the SQL query.

## Driver <a href="#treiber" id="treiber"></a>

### Driver file

Display the name of the selected driver and select a driver from the list of installed drivers

### Version

Version of the driver file

### Interface type

Display the driver interface type

### Data transfer type

Description of the data transfer type

## Driver parameters <a href="#treiberparameter" id="treiberparameter"></a>

### Name of ODBC data source

Name configured by the ODBC administrator.

### ODBC user

The user name to access the database is optional.

### ODBC password

The ODBC password to access the database is optional.

### Difference time in seconds / Time format (L,U) / mode (A,S)

The three parameters are separated by blanks, e.g. 0 L A.

### Difference time

Setting whether ACRON reads the data cascaded.

Normally (difference time = 0 seconds) when re-reading data ACRON reads the data from precisely the time up to which data was found in the last read operation.

Note

If historical data is written subsequently to the database, ACRON does not know. In this case it makes sense to re-read the data with a difference time. If, for example, data is imported on an hourly basis from an external station, by setting a difference time of 3600 seconds the data can also be applied by the Provider.

### Time format

L- The time stamps are given in local time in the ODBC source

U- The time stamps are given in UTC time in the ODBC source

### Mode

A- All mode is used

S- Single mode is used

## Settings <a href="#einstellungen" id="einstellungen"></a>

### Measure interval

In this interval the SQL statement is executed and the data are transferred.

### Polling delay after start

Start of data logging in seconds after the ACRON Provider has successfully established process communication. This is useful, for example, if the opposite party takes some time after a restart to initialize all the variables.

Recommended entry 0 sec.

### Always display provider window on top

Provider windows are always displayed on top

### Activate test mode

Display a window with diagnostic messages

On startup the ACRON Provider opens a window with diagnostic messages. The log file is stored under the relevant provider name in the ACRON installation path, in the `Log` directory.

Note

As diagnosis mode heavily influences the performance of the application, and the recorded messages can normally only be evaluated by Technical Support, you should only activate it when prompted to do so by Support.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videc.de/acron-9.3/en/anlagenkonfiguration/prozessanbindung/provider/providerid/treiberauswahl/universeller-odbc-treiber-fuer-werte.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
