How to send PLC data directly into a database
How to send PLC data directly into a database
(OP)
Hi,I would like to know what software/hardware do i need and the procedure to store data from a PLC to a database (SQL server for example)
Thanx
Thanx





RE: How to send PLC data directly into a database
Data may be read from or written to PLC devices, using simple VBA macros (typically in Excel environment).
RE: How to send PLC data directly into a database
RE: How to send PLC data directly into a database
Last week I've finished a project where I used a plc-SQL connection. The configuration was the following. The Plc was a S7-400 (Siemens)which was connected via a ethernetcard (CP443-5)towards a HMI. In my case I've tried two HMI's, WinCC rev 6 (siemens)and Intouch rev 8 (Wonderware). Those two HMI packages were able to connect directly (scripting build in) to a MSSQL-server. Simple using standaard SQL-code (Open, select, table ...). Keep in mind that it only works with WinCC rev 6! If you need more information don't hessitate to contact me.
best regards Rudi Frederix
RE: How to send PLC data directly into a database
I've made a small mistake it's not a CP443-5 but a CP443-1 card. The CP443-5 is a profibus connection.
sorry
RE: How to send PLC data directly into a database
Another good OPC package is Omni Server for Allen Bradley etc....
http://www.softwaretoolbox.com/store/item_pages/itempage_950.asp
Chris Elston
Automation & Controls Engineer
http://www.mrplc.com
Download Sample PLC Ladder Logic Code
at MrPLC.com
RE: How to send PLC data directly into a database
RE: How to send PLC data directly into a database
At our plant we are using WinCC for visualisation, now for a new application I should need about 8 new licenses of WinCC which is very expensive. That why I thought off VB.
The only thing we have to do, when a certain production line comes in stop mode, I need to send the date and Timestamp to a SQL-server and (were the plc connection comes in) let a light flashing.
Thanks in advance
RE: How to send PLC data directly into a database
I have used vb for front end but only with allen bradley but i do know that you can use it also for siemens S7,it would just be a different server (probably mpi).
I have used the vb to drag data from a plc-5 and dump it into an access 2000 db.
RE: How to send PLC data directly into a database
Thanks foor helping me out, I still got some small questions. What kind of configuration did you use, What kind of networkcard did you use in your PC to communicate with the siemens PLC? Did you use an OPC-connection?
bye
RE: How to send PLC data directly into a database
I recommend to you using Rssql these software is from Rockwell Software, and permit insert data to database in SQL.
If you want, have a major control over the datas, i recommend, using RSlinx Professional, and one Software of control, something like Factory Link.
I hope can help you, Bye bye
RE: How to send PLC data directly into a database
Send me the model, and i can help you.
Best Regards
Paulo Afonso
Integration Eng.
EINAUS Eng. Lda
RE: How to send PLC data directly into a database
Fritzfrederix , it may be too late now but if you have a similar requirement again, it looks like our software OPCWare Client Developer (http://www.opcware.com/Products.htm) is just what you need. You can use it in Visual Basic, and it works with any of the compliant OPC servers that are available for the Siemens S7-400 connected via an ethernet card (CP443-5) - if you need a list of the ones we recommend, please contact us via our website. In most cases, you would only need a single OPC server license and installation, typically these cost less than US$1,000, though some cost much less (as little as $120) and some are more expensive.
The OPCWare Client Developer installation includes two examples for storing data to a database - one of these uses a DSN connection, which is the normal method of connecting to remote databases such as SQL Server. Both examples log the item value, timestamp and quality to the database.
Now in addition to your data logging application, producing multiple HMI's with Visual Basic 6 is no problem using OPCWare Client Developer. The licensing options include Standard or Professional, both of which allow you to distribute your applications runtime free.
You could have your OPC server, 8 HMI's plus a data logging application all for less than $1,500, and with only limited programming required, keeping the costs down.
Best Regards,
Neil Kingston
Data Layers
http://www.opcware.com
RE: How to send PLC data directly into a database
I typicly write a stored procedure and call it with the SQLExec command, and insert the data that I want collected.
All you really need to do, is get the data you want to record into a register(s) in the plc. Get a SCADA/MMI package that will talk to the PLC, and also talk to your database.
Another way is to use a 'flat file", you can write the data you have in your PLC to a .csv file. You can trigger the write by a timed interval, or an event, or both.
Good luck,
Reandy