PLC data to PC

bmillerx94

Member
Join Date
Feb 2017
Location
United States
Posts
26
Hello,

I am inquiring about information to PLC data to a PC. For instance, I have a machine with a limit switch. The PLC program counts the LS actuations. I want the counted value to be sent from the PLC to a PC, where this data can be analyzed.

I have no experience with "networking" a PLC. This is a commercial MFG environment, where I would like to log simple CTU and TON data to a PLC. I have read a little about SCADA and RTUs and MODBUS, but know very little. My application is simple, so whats the most cost-effective solution? What type of feature is required on a PLC? Is this a high-skill application? Data would all be digital, no analog inputs. Also, one-way-street. I don't need to remotely modify the PLC program from the PC - I just want to store the information.

This could be something as simple as logging this data into an excel spreadsheet.


Any information for a beginner would help.

As always,

Thank you
 
What PLC are you using?
How are you connecting to the PLC? Serial (RS232/RS485), Ethernet
What Protocol would you like to use? Modbus RTU, Modbus TCP, etc.

I would check out the following free HMI package. (AdvancedHMI) This runs in Visual Studio and is open sourced VB.Net code. It contains many different popular protocols.
https://sourceforge.net/projects/advancedhmi/

Here is an example of using AdvancedHMI to log data.
http://accautomation.ca/creating-a-hmi-login-screen-on-advancedhmi/

This will get you started with AdvancedHMI:
http://accautomation.ca/create-a-plc-with-hmi-training-and-learning-environment-free/

Regards,
 
Garry,

The PLC has not been chosen. I will likely go with a CLICK simply due to cost. All I want to do is count a limit switch on 20+ machines, in addition to downtime and uptime which would be a timer function.

I need something relatively simple. I can write some code in python, but I'm not advanced by any means. I don't know enough about protocols to speak to that. What I want is quite simple so I hope there is a simple solution.

I will look at your provided information. I'll have more questions soon on this topic.

Anything else, feel free to ask.

Thanks garry,
 
AdvancedHMI "I have not used them" but I'm sure with some VB.scripting you could write the data back to a Database.

I have used the Maple System HMI that can be setup as an MQTT Publisher and then have a PC running this Python Code http://www.hivemq.com/blog/mqtt-sql-database to subscribe to a broker and this will write the published data into a database.
 
http://accautomation.ca/programming/plc-basics/

At the above link you will find a complete series on the Click PLC. This includes communication to it using AdvancedHMI.

Click PLC Series (Automation Direct)
System Hardware
Installing the Software
Establish Communication
Numbering System and Addressing
Timers and Counters
Compare and Math Instructions
Program Control Instructions
Shift Register Instruction
Drum Instruction
Send and Receive Instructions
AdvancedHMI Communication

If you have any questions please contact me.
Regards,
 
gclshortt and GaryS:

I have used the CLICK PLCs, as you may or may not know based on previous forums posts here on PLC Talk. I am quite familiar with the CLICKs and they would be a great low-cost solution to our problem.

At this point in time, our plant does not require the capability of modifying PLC programs remotely via HMI. I simply want to pull process data from a PLC (multiple) and log this information on a PC.

I have researched the OPC server. Can someone explain to me how I would get CLICK PLC data (such as TON data, or CTU data) to an excel spreadsheet? What hardware would be needed? Do I just connect RS232 or RS435 to the OPC server and configure it?

Next question: Is there a way to wirelessly achieve this solution? The cost in conductors just to count the pulses of a limit switch are quite high, as we have machinery scattered about the plant.

Thanks for all the help.
 
I don't know what processor you are using but check out the ingear website
they have a limited OPC server for AB, connect to 1 processor lag limit of I think 300
less than $350
they also offer a free trial to test it
you could import the data directly from the PLC to a spread sheet
your not going to much simpler than that
 
As Garry has already mentioned, AdvancedHMI (http://www.advancedhmi.com ) can easily do this. Many users run this software with the Click PLC. You can find the information on both Garry's site and the AdvancedHMI forum ( http://www.advancedhmi.com/forum/ ). The base package (which is completely free) has everything you need, including the communication drivers (no need for OPC servers), to retrieve and log your data.

When using Excel, you can accomplish it in several ways. My preferred way is the EPPlus library. You can download some sample projects on using EPPlus to read/write Excel files from here:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/

Yet another and possibly easier method is to use the BasicDataLogger to write to a text file, then open it as a CSV file in Excel. This is a simpler solution because it does not require any code writing.
 

Similar Topics

Hi, Wy we log data in PLC using DLG instruction, when we have option to log data in HMI
Replies
1
Views
72
Hi Iam using monitouch hmi(V9 soft) with omron plc cj2m (CX programmer). In this I want to read a data from hmi to plc. The data was like...
Replies
0
Views
93
I am working with beckhoff plc in twincat 3 environment. I have a array of struct which I want to make persistent. I declared it with...
Replies
0
Views
104
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
292
I`m looking into different solutions for gathering data from different PLC`s (different manufacturers) to a central storage locally or cloud. The...
Replies
12
Views
841
Back
Top Bottom