Interfacing with SQL Servers with zenon – zenon SQL Driver
The zenon SQL driver can interact with a SQL database via ODBC, as if the SQL database were a PLC itself. This driver requires the tables to be created and formatted in a specific way, but if properly configured will allow zenon to read and write to tags defined in the SQL database.
zenon is able to read data from the pre-defined table, placed there e.g. by third party applications, and assign this data to PLC variables. Effectively reading data from a table in a database of a SQL server and writing that data to PLC variables using any of the many direct PLC drivers that come with zenon.
How it Works
The zenon SQL driver (sqldrv.exe) is a polling-based driver that can communicate with specially defined send and receive tables in an SQL database. COPA-DATA also offers SQL queries to create the needed tables, columns, and assign the appropriate data types for them.
The designed use-case for this driver needs a separate table for sending and receiving values. If these values need to be used in different applications or in different tables, a periodically executed stored procedure has to be created to transform the data into different formats and/or to transfer them into different tables.
This module must be licensed in the zenon Editor as well as the zenon Runtime. If this is a network project, it is only required to license this driver on the runtime server(s) which will actually communicate with the SQL database.