Page 1 of 1

logging data from Siemens PLCs

Posted: 12 Oct 2020, 15:39
by stevennoppe
I have a project I want to achieve with the RevPi :

I want to read data from a Siemens PLC (300, 1200 or 1500 series) and send that data to a SQL database.
Everything would be written in Python.

Now I already have succeeded in writing a Python script on my laptop (windows PC) that gets the data through an API named "Snap7" (actually I use "Python-snap7") and send it to a SQL database.

https://pypi.org/project/python-snap7/
http://snap7.sourceforge.net/

Since this Python script works on my Windows PC, I wanted to put it on a Linux module inside the cabinet nearby the PLC. RevPi seemed to be the ideal solution :)

So my next steps now are installing "snap7-python" on the RevPi and putting the python script also on my RevPi and test everything.

While browsing the website and the forum I found out about "RevPi7".
Is this a better solution then "snap7"?
Also the sales person told me I can connect a profinet gateway to the RevPi and get my data even quicker in the RevPi.
How would I do this?

I'm sure that this has been done before, so I hope someone can help me further...

edit : it seems that another solution would be using node red with :
https://flows.nodered.org/node/node-red-contrib-s7

I'll have to check this solution also...

Re: logging data from Siemens PLCs

Posted: 13 Oct 2020, 15:44
by dirk
Hi stevennoppe, the RevPi7 is unfortunately just a "goodie" that we won't support. Have a look at this descriptive post.
But you have already found it as you have also postet your question there.

What I can provide so far is the following You can use a translator to get this in your language.

Re: logging data from Siemens PLCs

Posted: 14 Oct 2020, 08:25
by dirk
Hi here is a RevPi7 Project available.

Re: logging data from Siemens PLCs

Posted: 14 Oct 2020, 09:58
by Amar
Hello,
RevPi7 uses the snap7-python library to make the data available in process image.Since you want to send the data to SQL database it would be more convinient to use snap7-python API directly in your Application.
Regards,
Amar