Connecting Simatic PLC to SQL database.

sherifmsak

Member
Join Date
Sep 2011
Location
Scranton, PA
Posts
1
How could I connect CPU Siemens 319-3 PN/DP to a SQL database server? How could I make this PLC writes and reads data to and from SQL server database. Is this possible? Thank you.
 
The most 'regular' way of doing it, would be to let an OPC server (Simatic Net for ex.) connect to the S7 PLC, and let an OPC client for SQL connect to the database.
Notice that some OPC clients for databases are mostly aimed at logging data from the PLC to the database.
One OPC client for SQL that works in both directions is Inductive Automations FactorySQL (maybe by another name by now).

I think there was also something about a more direct way of sending SQL queries via ethernet directly from the S7 PLC. Cant seem to find it now.
 
In a previous post, Jesper had mentioned utilizing OPC. What you will require is a manner to interface to the SQL database you are using, in addition to the Siemens driver for the controller.

Kepware offers drivers to interface with a database as well as the Siemens connectivity suite.

More information can be found through the following links:

http://www.eternity-sales.com/Kepware/Kepware.htm

http://www.eternity-sales.com/Kepware/ODBC_Client_Driver_OPC_Server.htm

http://www.eternity-sales.com/Kepware/kepserverex.htm

Please note that ESI is a Kepware distributor.

Hope this helps with your requirement.
 
Roughly the CP343-1 ERPC module is $2000 (US)
DeviceWise firmware is $1000 (US)
Transport license is database is $1500 (US)

So your looking at $4500 (US)
 
Jesper - It's Ignition these days :). The SQL Bridge module is what used to be FactorySQL. Going that route you would purchase the "limited SQL Bridge" module for $950 (list). I think the free OPC-UA driver would cover the connection - I'm not familiar with the referenced "Siemens 319-3 PN/DP" but it works with most S7 PLCs.

That's the "typical" approach. Using a software app to log the data via OPC to an SQL database. It's nice if the device can do it natively and meet your requirements. The software approach is going to be much more flexible in terms of customization (scaling, trigger conditions, working with different SQL databases, etc).

The most 'regular' way of doing it, would be to let an OPC server (Simatic Net for ex.) connect to the S7 PLC, and let an OPC client for SQL connect to the database.
Notice that some OPC clients for databases are mostly aimed at logging data from the PLC to the database.
One OPC client for SQL that works in both directions is Inductive Automations FactorySQL (maybe by another name by now).

I think there was also something about a more direct way of sending SQL queries via ethernet directly from the S7 PLC. Cant seem to find it now.
 
Last edited:
Jesper - It's Ignition these days :). The SQL Bridge module is what used to be FactorySQL. Going that route you would purchase the "limited SQL Bridge" module for $950 (list). I think the free OPC-UA driver would cover the connection - I'm not familiar with the referenced "Siemens 319-3 PN/DP" but it works with most S7 PLCs.
Aha, that is interesting to know. I think that is a nice price reduction. It used to be 2000$ for FactorySQL.

About OPC UA, are you sure you can connect directly to an S7 PLC ?
I thought that you have to go via Simatic Net which also supports OPC UA.
 
Aha, that is interesting to know. I think that is a nice price reduction. It used to be 2000$ for FactorySQL.

About OPC UA, are you sure you can connect directly to an S7 PLC ?
I thought that you have to go via Simatic Net which also supports OPC UA.

Ignition is OPC Server, so it will connect to devices. I tried it with s7-1200 & s7-300. Worked great. I dont know what place do you try to fit that simatic net?
 
In addition to not needing a PC as middleware, no drivers, OPC or otherwise, or custom code, the ERPC allows for viewing and accessing the S7 CPU information as tags, just like Rockwell Logix family.
 
Since this thread has already been resurrected, I want to mention that a company that we do business with has developed a solution where a PLC can exchange data with SQL databases completely without a PC and software in between, and also without special hardware (such as the CP343-1 ERPC). It is all done with the integrated ethernet ports and PLC code.
I dont use it, since my company has its own solution based on PC and OPC, but they demoed it for me and it was quite impressive. Price is quite reasonable and competitive with CP343-1 ERPC.
They have developed it for Siemens S7 and ControlLogix.
The company is called Automatic Syd (flyer to PLC SQL Link).
edit: Link to website.
 
Last edited:

Similar Topics

If anyone knows how to connect Wonderware to a Siemens S7-400 please let me know.
Replies
5
Views
1,999
Hi Guys I have a couple of issues with a simatic panel The first issue is that I cant connect to it. I have bought a new panel it is a simatic...
Replies
2
Views
1,990
Hello, I hope that some of you will help with this. I have PLC Simatic S7-200 CPU 224XP and I have a PPI cable(it has no conversion unit on it)...
Replies
4
Views
3,423
I have a TI System 505 with a SIMATIC TI525 PLC. I'm trying to talk to it using a DDE Server in Windows 3.1, and it has limited options as to...
Replies
0
Views
1,374
Hi Everybody, My problem is that on a UV desinfection channel, there is an intensity sensor giving 4-20 mA signal to plc siemens simatic S200.A...
Replies
3
Views
7,217
Back
Top Bottom