DrvSQL is a driver for retrieving data from MSSQL or many different sources via ODBC.
To use DrvSQL, an IO device is created and used to communicate with respective device/PLC.
Installation
The installation of DrvSQL is done by selecting DrvSQL during the installation of Web Port.
See "Installation" for more information on the installation process.
IO-device
To use DrvSQL, first create an IO device as described in chapter "IO-devices" of the manual. In addition to general settings (see "general settings" in IO-devices), the following settings are available for an IO device of type DrvSQL:
- Database type:
- Choose ODBC or MSSQL
- Connection string:
- For MSSQL e.g. Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;;
- ODBC will differ depending on the type of ODBC driver used.
- Example ODBC MSSQL:
- Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;
Tags
For more information on how to create tag lists and tags, see chapter "Tags" of the manual.
The tag address is any SQL command that returns a value.
Example: SELECT [value] FROM [tags] WHERE name='LB01_GT11_PV';
If Boolean expressions are to be used on the returned value, they are specified within {} characters.
E.g. SELECT [value] FROM [tags] WHERE name='LB01_GT11_AL'{=0} to invert the value.