SQL logging and SQL recipes concept...

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
A customer of ours has the following configuration:

Around 20 PLC's connected on the company network. Each installation has a Siemens HMI. Most of them have MP277 and MP377.
At the moment we are doing basic (step-)logging in these panels with datalogs to csv files on the MMC cards. The recipes are written by the WinCC Flex recipes and in some PLC's it's done by fixed DB's.

Regarding logging:
When they had a problem, they have to go to the HMI of that machine, take the MMC out, see what's in the CSV,... it's difficult te trace to the problem.

Regarding Recipes: Some use DB's some use the recipetool in WinCC Flex.

What they asked was a central place where everything is gathered together.


I did some tests with WinCC Flexible Scripting for reading and writing from and to a SQL database. This works.
I did some tests for reading and updating data from the same sql database in VB.net. This works. (PC RUNTIME !!!!!!!!)


What I'm thinking todo is:
1.
HMI's take their recipes from the SQL database, from the server. Donno if WinCE kan be connected thrue an ODBC source ??
So what I'm asking is, can an MP277 for example communicate with an SQL server ?
2.
PLC makes step transistions, what we do is mainly steplogging. Every step we write a record away. Same should happen to an SQL database, every stepchange the record is written to an SQL table. This can be done on a PC Runtime that will be used for trending and logging. This works, no worries here.
3.
The logged data from the step transistions is written in the SQL database.
There is query software on the web (Flyspeed SQL Query for example), but they asked if they can read the SQL tables in an Acces DB, because they know Acces very well. They can make their own querys like this.

Are there some of you that have done something similar ?

Regards,
Gerry
 
Last edited:
A little bit off-topic but have you seen the new CP343-1 ERPC module? This module can read and write directly with sql commands directly to an database. No scripting is needed so I think you can save a lot of enginnering time with this device.

/Peter
 
Access is a bad idea in the back end for a project of that size. If the customer wants to go MS, recommend SQL Server. I think that MS Access may be able to open up a SQL Server DB - if the customer's more comfortable with that.
 
Hello.

This new CP343-1 ERPC module really looks like something to me but the most important issue in your system design is you have about 20 PLCs which means a lot in numbers so if I were you I wouldnt want to mess around with 20 different PLC or HMI. You said all the PLC are on the network so what you need to do is to use an SCADA or an OPC and gather all the data, recipe and so on to one computer and by some coding in VB or C# you can connect to SQL server. If you choose SCADA you can make a one point for monitoring the whole system also like trending, archieving. This way you can save time in engineering and have the acces to the whole system from one point.

According to me Access is not a good choice. You should realy try to convince them to SQL with this system if you dont want headache in the future.
 
With SQL4automation you can connect 10 plc to up to 10 database. So you only need two lizencies. To use SQL4automation you only have to inculde a library into your project and configure the different connections. So there is no engineering needed. You can use the full range of the SQL language, what you can't with a OPC or the ERPC solution. With the ERPC you would need this module on every PLC, what doesn't cost few.... For database i would also use MySQL or MS SQL server.
 
if the problem is seing alarm messages with dates then

you can use one MP377. it will communicate with 20 plcs.
you can connect a printer to MP377 and you can write a script
MP377 will print the alarm window and then it'll clear the page.


if you don't want lots of letters around,and if you will also save recipes other datas
then you can use a wincc and store all the datas (including step logs) in one pc.

if you have still datas in sql that you can't not reach from network, and if they're not too much,you can move them into plc with small scripts. so you can reach them from anywhere.
 
Last edited:

Similar Topics

Hi everyone, I have a small project where I need to use plc to get sensor data and log them to an sql server locally or remote. I have found...
Replies
7
Views
2,627
Hi guys, I have a machine with a Compact Logix and a Factory View HMI display and I've been asked to see if it's possible to create a log of the...
Replies
0
Views
2,307
Hi all, I am logging data via ODBC to a 2008 RS SQL express database. In FTView File Management I have set it up to purge record after 6 months...
Replies
5
Views
3,600
I have not used this aspect of FTView SE, so I am looking for some direction. I'm looking to add some alarms into a SQL database. Nothing jumps...
Replies
1
Views
4,207
I'd like to log the RSVIEW32 datalogs to a SQL server, this is straightforward, but for the fact we have two PC's running same project. If I want...
Replies
0
Views
2,272
Back
Top Bottom