Today is...
Sunday, September 15, 2019
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
Watch an animation of a conveyor stacking operation demonstrating the use of a move on a gear command.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Logging from PLCs to SQL Databases - what options exist?
I'm looking for all the ways that you can log data from PLCs to SQL databases...

I'm looking for all the ways that you can log data from PLCs to SQL databases. This includes HMI historians (if they can log to standard SQL databases, MSSQL and MySQL) and different open source projects or commercial products.

I currently use and promote FactorySQL ( Are there other similar products? What are the pros and cons in your experience. At this point just looking for an SQL OPC datalogger - a simple, customizable datapump.


You could consider logging the PLC data to wonderware's Industrial SQL server... I don't know if it's standard enough for you.. But, I'm logging all my data into this Historian that works with SQL queries...

Look them up on the Web...

You do not indicate what specific manufacture of PLC you have in your message. The Schneder Electric TSX Quantum and TSX Premium Programmable Controllers have the FactoryCast HMI modules that will allow you to PUSH the data to your SQL server on event.

By Ken (Wonderware Salesman) on 2 February, 2006 - 3:18 am

Try Wonderware IndustrialSQL for out of the box functionality (no table creation), IO Servers, and extended functionality SQL alone can't offer (time extensions, query independent of storage rate...).


What do the terms "time extensions" and "query independent of storage rate" mean?

I am big on a package that can be set up quickly and easily. How much would IndustrialSQL cost for a medium sized system (approx 4500-5000 tags)? Does this include the database?

I also heard that you store inSQL data in a compressed (proprietary) format. How does this affect performance and compatibility. What would be required to allow other enterprise systems to communicate with your data?

Spent quite a while evaluating off-the-shelf products for PLC/ SQL database logging because of customers demand. The problem is, most of these packages are very expensive. We selected FactorySQL because it fit our price requirements and because it has more functionality than other packages we tested. We've done about fifty deployments over the past two years.

By Andrey Romanenko on 6 February, 2006 - 8:28 am

Have you considered an open source database+comms bundle? Do not know if
there is anything ready available, but it should not be difficult to create
such application using PostgreSQL/MySQL+libnodave/rllib. I am wondering how
many people would be interested in such a thing...

Andrey Romanenko


By Brian Boothe on 7 February, 2006 - 11:59 pm

I have such a framework VBA/SQL/MySQL/ODBC started and Inside Excel DDE Sheets If anyone would like to Inquire About it email me


Thanks for the offer.

I love open-source where it makes sense. Unfortunately, virtually all of our customers in the manufacturing sector use Windows and getting their corporate IT departments to allow a Linux box on their network isn't likely to happen soon.

We deploy a lot of PostreSQL and MySQL under Windows using FactorySQL as the bridge to PLCs. From what I can see of libnodave/rllib they are Linux based and as a result do not support OPC. We use FactorySQL because it runs under Windows and supports OPC. As integrators we need something that is fast, easy to setup, is reliable and is standards based. Plus the price is minimal and doesn't scale up with tag usage.

But I would be interested if there were a comparable product available open-source - I've looked and looked (for years) and never found one.

And here is a little know fact about FactorySQL. It has a true bi-directional synchronization mode. Some vendors claim bi-directional mode but it's not really the same. FactorySQL bi-directionally mirrors PLC addresses with database fields so if data changes on either end it will be reflected in the other. The same row/column gets written to over and over again. The database effectively becomes a tag database that you can now create realtime interactive web pages from.

But like I say, I love open-source and if there is a comparable open-source product that is OPC compliant, reliable, fast and easy to setup - I'll be the first in line to use it.


By Ray Valentine on 10 February, 2006 - 3:28 pm


Ray W. Valentine
Sales Engineer
Online Development Inc.
Knoxville, TN 37920

By Gustavo A. Valero P. on 3 February, 2006 - 3:58 pm

Hi Nathan,

If I understood well your request, you could take a look at FactoryLink too.

FL has always been open with most database brands. So far, FL has native drivers for Informix, DB2, dBase IV, Oracle, Sybase and ODBC (the last 4 drivers are free and come with the product).

Although FL includes MS SQL Server to be used as the historical database, the customer isn't forced to use it if his standard is Oracle for example.

A powerful advantage with this FL's feature is that any customer can create, read and log data into several database brands at the same time with no problems.

Even, any customer can use MS SQL Server as its database but if he wants to change to Sybase/dBase IV later, the only thing needed is to set the new driver (historian) in the application and ready! ... there is no need to create/modify the database's fields and/or the original settings.

Of course, you can use any SQL expression you want by using the PowerSQL task (it comes with system and is free too).

Here you can download FL if you want to test it:


Feliz día!

Gustavo A. Valero P.
BIConsulting C.A.
Valencia - Venezuela


Will certainly try out this product in the next few days.


Spent quite a while evaluating off-the-shelf products for PLC/ SQL database logging because of customers demand. The problem is, most of these packages are very expensive. We selected FactorySQL because it fit our price requirements and because it has more functionality than other packages we tested. We've done about fifty deployments over the past two years.

By Gerald Beaudoin on 3 February, 2006 - 7:33 pm

There is a harware module that is available for some PLCs called an "XCoupler" ( This device has embedded configurable firmware in it which takes the data from the PLC and stores it directly in the database. Requires only a conncetion to the database from
the module therefore eliminating any intermediate PCs or software. Depending on your application, it could be an interesting product which would offer an alternative to some of the rather unwieldy data collection engines that tend to be the norm. Not for everyone, but you were looking for options.

Gerald Beaudoin

By Martin Severgnini on 5 February, 2006 - 11:36 pm

We use a JagusITS product, called Jagus DataLogger.

Is a low cost, about $500 per computer, without limits in number of tags.
In their standard form, include drivers to be connected with plcs by modbus
(tcp/ip and serial), but new drivers can be developed. There is defined an
interface to add new drivers.
Us, in a project that we had to log data of industrial balance, they
developed us a driver that it work very well for $100.

Besides logging in standard databases ( MSsql server, access, mySQL,
postgress, oracle, ... ) , you can use the software like a component that
it shoots events in environments like .NET or in VB.

We have used it in about 50 automation projects with total success.

To communicate with JagusITS, send a mail to and
request a demonstration of the product that is completely functional.

AutoProjects DC.


JagusITS sounds interesting. The web site listed on google was down ( Do you know where else I could get more information.

In addition to datalogging, FactorySQL makes the database into a "tag database" with bidirectional synchronization between PLC registers and database fields. Does Jagus do this? Do you know of any other products that might?

As far as the drivers go, it'd be easiest to use OPC servers (or any common open standard). Many of my customers use varying types of PLCs and often have to interact with existing HMI data (also accesible via OPC).


Dear Forum;

I've read in a forum about Round Robin Database, it is a free database for data logging purposes.

I want to know if somebody has any experience with it.


By Chris Jennings on 13 February, 2006 - 12:33 pm

I currently use rrdtool as part of the cacti program it works well. I only use it for logging SNMP data.

I have written my own Perl scripts to convert text files into entries in a MySQL database that I then get trends out of using JPGraph it is a bit slow but being an object oriented system it makes it very fairly easy to use.

Chris Jennings

I recently made a break through in transferring directly from a PLC to a SQL server. It is based on the Beckhoff CX1000 PLC on the CE platform.

The plc program can launch an application stored on the flash card of the controller. Using the latest VB, you can write a windows CE application that can read/write to a SQL server. I acheived it with a VB program that is only about 20 lines long.

The true advantage to this method is that since it all runs completely on the PLC, there is no polling of the network. The PLC program actually initiates the transfer. If your SQL server is on a server that you cannot load any other software, this solution also eliminates the need for another PC in the system to read from the PLC and transfer it to the SQL server.

By STANIMIR STANEV on 27 February, 2007 - 10:44 pm

We currently using Factory Cast HMI - industrial web server from Schneider Electric. You can export directly to SQL, MySQL, ORACLE. For reporting we using standard EXCEL ODBC data query. Very smart, reliable.

for additional information:

Stanimir Stanev
DAMAR Electric

By Nathan Boeger on 16 March, 2007 - 11:11 pm

Looks like a cool device - wish it had an onboard cache besides the 8 megs for user web space!

That web site is a parked domain. I can't find an official web site with data, but this:

Nathan Boeger
Total SCADA Freedom

MS SQL Functionality for Siemens Simatic S7-1200 S7-1500 TIA Portal V13 V14 V15

PDSql Library V1.2.0 User Guide:
PLC direct SQL