kytkija
Posts: 13
Joined: Fri Feb 15, 2019 1:47 pm
Location: Finland

Multiple pi's raporting variables to mysql through one 'server' pi

Thu Jun 06, 2019 9:20 pm

Hello all,

I am building an production data acquisition system with pi, that saves production volume and and downtime etc to mysql server.

I have made a python program that does it well, User interface is built with tkinter. This is fine so far with machines that have only One operator. A PC with mysql server is connected to pi's via router in our industrial network.

However, I have a new challenge. There is a Workstation that has five operators, and each of them has own touchscreen interfaces via pi. Our industrial network has limited capacity for ethernet connections, so i would like to build own network for pi's with One pi as a 'server' which collects the data from other pi and sends it to the mysql.

So the 'server' pi needs to be in our industrial network AND network of pi's. I think I should have the industrial ethernet in eth0 connection for saving to mysql, and set up a USB-ETHERNET Adapter for pi- network. Then I will connect a router to the usb-ethernet and other pi's to the router.

Then.server will collect variables and commands from pi network through router, and save them to industrial network mysql database.

But what would be the best solution for sharing the variables and commands within pi's? I was thinking mqtt.

Each of the operator-pi's should be able to send command anytime to save following variables to database "amount: 5 time:5sec operator: 1"

Is this worth looking into?

W. H. Heydt
Posts: 12648
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Multiple pi's raporting variables to mysql through one 'server' pi

Thu Jun 06, 2019 10:14 pm

kytkija wrote:
Thu Jun 06, 2019 9:20 pm
Our industrial network has limited capacity for ethernet connections...
What is the limit and what is the nature of the limit? Is it driven by using a small IP block on (presumably) your LAN? Is it a limit in the number of ports on your switch?

If the former, can you or someone in the company IT department change the LAN block to make it bigger? If the later--and assuming that you are NOT using hubs in this day and age--can you add a local switch for the Pis with a single uplink to the general LAN? In this context, I would point out that unmanaged 16-port GbE switches are only about $100, which should be small change in any sort of plant.

Return to “Advanced users”