Collecting data and publish on the server, need help

backendcode

Member
Join Date
Aug 2017
Location
brampton
Posts
249
Hello Everyone,
I work for a company who builds a machine for the automotive industry. Recently, we build a new line at the plant but the line can't achieve the production goal and that company blaming the automation. so what I am trying to do on this line is find a cycle time, robot wait time (Robot waiting for the raw part), machine fault time and all the other valuable information.

I am able to get the information with my PLC, I have calculated the cycle time, robot wait time etc etc but now I want to get that information and put on the server or excel so we can have a history of data and make analysis with recorded values.

My question is what is the best way to do it?

should I connect excel file to RSLINX OPC server and record that value? but then I need to write VBA script to record new values coming from a tag.

or is there any other easiest way to do it and store the tag values of information I needed so I can analyze that data.

I would appreciate your help and feedback

Thank you,
 
I would probably structure your PLC program in a way that stores it in a historical way, then use "something" to extract it. That way you don't have to have rely on the "something" to always be running.

That "something" could be RSLinx and Excel (as you mentioned):
http://www.plctalk.net/qanda/showthread.php?t=28828

Or you could go the free route and use AdvancedHMI to read it and dump it into excel.
http://www.plctalk.net/qanda/showthread.php?t=95614

I've read some information from ControlLogix/CompactLogix using python and stored it in CSV format.
 
I would probably structure your PLC program in a way that stores it in a historical way, then use "something" to extract it. That way you don't have to have rely on the "something" to always be running.

That "something" could be RSLinx and Excel (as you mentioned):
http://www.plctalk.net/qanda/showthread.php?t=28828

Or you could go the free route and use AdvancedHMI to read it and dump it into excel.
http://www.plctalk.net/qanda/showthread.php?t=95614

I've read some information from ControlLogix/CompactLogix using python and stored it in CSV format.

Thank you for the reply and I don't have enough space on my controller itself so i can't store and then extract.

I don't mind to keep my laptop ON and i was thicking to connect excel sheet and read that excel sheet with python and anytime when value of my tags will update, I will store that information in my sql database and that database can be on the server so i can remotely check those values.

But is there any other way to do it? fastest and easiest? and I can't use trial version too because of my company policy. Either we need to buy a software or it should be open source

Thank you!
 
So there are no trials with AdvancedHMI and it isn't for sale, it's completely free. The only stipulation on it's use is that you have to keep the entire project intact, you cannot separate it's components from it. You use Visual Studio to create your projects, the Community Edition is free also.

You can use pylogix if you want to go the python route and log it to CSV. I haven't ever experimented with Excel and python, though it appears possible.

https://github.com/dmroeder/pylogix

I'd say speed wise, AdvancedHMI is pretty fast creating projects and it's drivers are very fast. Python is really fast reading data, might take a little bit of work on the excel end. Excel works pretty easily with RSLinx.

If you end up going the python route, I could probably offer some help. What PLC are you working with?
 
So there are no trials with AdvancedHMI and it isn't for sale, it's completely free. The only stipulation on it's use is that you have to keep the entire project intact, you cannot separate it's components from it. You use Visual Studio to create your projects, the Community Edition is free also.

You can use pylogix if you want to go the python route and log it to CSV. I haven't ever experimented with Excel and python, though it appears possible.

https://github.com/dmroeder/pylogix

I'd say speed wise, AdvancedHMI is pretty fast creating projects and it's drivers are very fast. Python is really fast reading data, might take a little bit of work on the excel end. Excel works pretty easily with RSLinx.

If you end up going the python route, I could probably offer some help. What PLC are you working with?

you are awesome! we are using Allen Bradley safety PLC! and i think i would like to go with python because I am more comfortable with python.

thanks again
 
I'm familiar with it though I've never used it myself. I typically use pylogix, but I'm biased ;)

c3po would definitely get the job done. I'm sure it's good stuff, give it a go.
 
If I needed to get that data to a Web Page, I would probably try to setup the PLC to Publish MQTT Data, and then install on the Web page (javascript or python) code that will subscribe to the MQTT Broker.

This way any time there is NEW data published the subscriber will update and you will alway have real time data.

This is just how I would approach this matter.
 
If I needed to get that data to a Web Page, I would probably try to setup the PLC to Publish MQTT Data, and then install on the Web page (javascript or python) code that will subscribe to the MQTT Broker.

This way any time there is NEW data published the subscriber will update and you will alway have real time data.

This is just how I would approach this matter.

Thank you for the recommendation and I will definitely look into that.

Thanks
 
Hey, I installed python 3.6 and I believe pylogix support python 2.7 right?

Thanks

You are correct, python 2.7.x

Python 3.x has been on my list, I have a test version that works with both versions of python, though I never pushed the changes to github. I guess it was lower on my list since nobody has asked for it. Plus, I wanted to experiment more.

It just moved up my list.
 
I find this odd... what controls the whole thing in the first place? Is there a SCADA system perhaps that you can add on an historian? I understand that you're trying to prove a point, or actually finding what is the problem with the automation side of it and possibly don't want to spend much money, but having that monitoring in place will pay for itself over the life of the system as you would have a baseline set up to compare against future performance as well as having almost real time capability of determining something (and quite possibly what) is wrong with the system.
 

Similar Topics

I have been able to get trend data through RSLogix 5000 when we are running the program and we are online, but I'm not sure how to collect data...
Replies
2
Views
2,060
Hi, I have a few Siemens S7-1200 PLC's with TP700 Comfort HMI's (each PLC has it's own HMI). These PLC's just count products, and the amount made...
Replies
5
Views
2,421
Hi Guys, I have a 2x Omron FQ cameras with a Touch finder panel, inspecting eye drop bottles on high speed conveyor interfacing with Siemens S7...
Replies
0
Views
4,360
Guys can someone help how we can collect the data from a press for press loads and dump them into an excell sheet for analyzing
Replies
6
Views
1,873
Hi All, I recently set up some controls for a new machine using an Omron CQM1H PLC. I have 30 memory locations with voltage data after the...
Replies
0
Views
3,614
Back
Top Bottom