DrFatalis
Posts: 24
Joined: Sat Sep 07, 2013 8:47 pm

Read and historize PLC data

Fri Jul 11, 2014 12:10 pm

Hi everyone,

I am starting a new project, this project is about industrial automation.
My main objective is to use a raspberry in order to communicate with some PLC (Siemens, Rockwell and Schneider).
Through this communication, I would like to historized some data in a SQL database which could be embedded on the rpi.

I'm aware that some lib exist to read PLC data, like libnodave but theirs lib are usable for unique target (Siemens in this case) but the main idea is to be able to connect to all PLC.

What do you think about this?
Share every idea you get ! XP

DrFatalis
Posts: 24
Joined: Sat Sep 07, 2013 8:47 pm

Re: Read and historize PLC data

Fri Jul 11, 2014 12:22 pm

Maybe I should try to read data from OPC first (a compatible OPC) and then try to upgrade the project.

josar
Posts: 43
Joined: Sun Jan 19, 2014 1:29 am

Re: Read and historize PLC data

Fri Jul 11, 2014 11:02 pm

Most of the PLCs support the Modbus protocol (TCP or RTU). I would go that way for reading data from a PLC.

Once you have the data in your RPi, storing them in a MySQL DB should not be a problem, just google "raspberry pi mysql".

DrFatalis
Posts: 24
Joined: Sat Sep 07, 2013 8:47 pm

Re: Read and historize PLC data

Fri Jul 18, 2014 10:37 am

It could be a good idea. I found a library named libmodbus that could be great to program my communication between plc and rpi.
As you said, mySQL should not be difficult if I already have data stored in the pi.

I wonder if Rockwell support modbus protocol or if I need a module like a prosoft module for tcp/ip modbus

TMorgan800
Posts: 5
Joined: Sat Jul 19, 2014 4:45 pm

Re: Read and historize PLC data

Sun Jul 20, 2014 3:44 pm

If you plan on using a Pi as a data concentrator... the non-Siemens PLC's use mostly ModbusRTU and ModbusTCP ... so modbus is probably what you'll find the most of out there.
Siemens uses Profibus (RS485)or Profinet (Ethernet/TCP-IP).
You can naturally adapt the ports to talk however you want. Especially if you are just sitting on a RS232/485 style network or TCP-IP via the Ethernet jack.
A S7-1200 uses a "put" and "Get" command ...so long as you know where to send / recieve the data.

DrFatalis
Posts: 24
Joined: Sat Sep 07, 2013 8:47 pm

Re: Read and historize PLC data

Wed Jul 30, 2014 5:21 am

Hi,
For information, I found a librairie yesterday named tuxplc working for Rockwell (normally). A readtag program exist in this librairie, I will see if it works today.
It is like libnodave for Siemens I thing.

ranpitime
Posts: 75
Joined: Sat Mar 23, 2013 5:21 am

Re: Read and historize PLC data

Thu Aug 07, 2014 9:12 pm

Hi,
maybe an option could be to use CODESYS plc on the Pi, to connect the other plc's
even the historical trend is available see that example here:

http://forum.codesys.com/viewtopic.php?f=21&t=5822
Cheers
ranpitime

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Read and historize PLC data

Tue Aug 12, 2014 4:01 am

CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

damith
Posts: 1
Joined: Tue Sep 26, 2017 8:28 am

Re: Read and historize PLC data

Tue Sep 26, 2017 8:29 am

Hey did you find a way to read PLC data?

Return to “Automation, sensing and robotics”