Sign in to follow this  
Followers 0
wbug2000

how to create a .csv report?

11 posts in this topic

Could someone please help me with this task? I have a PLC code running on a MicroLogix 1100. Now I want to configure the program to send a .csv report of certain device status to a PC but I am not sure how to do it. Any tips would be greatly appreciated.

Share this post


Link to post
Share on other sites
The Micrologix can't create a csv file to send to a PC but what you could do is have the PC read the data through some VB code and create the csv file. A non Lite version of RsLinx is required for the PC to read data from the Micrologix through DDE or OPC

Share this post


Link to post
Share on other sites
The ML1100 has a built in web page - I thing you can configure this. If your data report is not too complex this may be the best way to go.

Share this post


Link to post
Share on other sites
Thanks for responding. I actually have another machine with a MicroLogix that is connected to a PC via e-net. To my knowledge there's no RSLinx on the PC, and each time the machine runs a CSV file is created. So I want to configure another machine to function like this machine.

Share this post


Link to post
Share on other sites
can you explain a bit more? what is it exactly that you are trying to achive?

Share this post


Link to post
Share on other sites
Okay. I have a machine that is controlled by a MicroLogix1100 that is connected via Ethernet to a PC for data logging (temperature, pressure, motor speed, etc.) So anytime the machine runs, a CSV file containing run data, is generated on the PC. I have another machine that is controlled by another MicroLogix1100. But this machine does not generate run data. I want to configure this machine to generate run data like the above machine. So my question is what should I do with the PLC code for the data logging to happen? BTW, I forgot to mention, there's no RSLinx on the PC. Thanks.

Share this post


Link to post
Share on other sites
well, pc is not just sitting there and serving as data storage. there must be a program that creates the CSVs and this program is not on PLC, it is on PC. we do this all the time but we use drivers (ActiveX) and write our own application that look into PLC and read what ever is needed. technically you should be able to copy that PC program (unless there is protection mechanism) or run another instance of it with alternative settings such as IP address of second PLC or different com port of the PC if connection is serial. In this approach there is no program changes required to the PLC. The ActiveX driver is doing same job as RSLinx does for RSLogix for example. If you have RSLinx (non-lite), it can be configured to share topic so that data can be transfered to Excel (without developing special program like one mentioned above and using ActiveX). This is a bit slower but it sure works. Mentioned approaches are the most popular ways of extracting data from PLC. You can also setup webpage in the PLC but now we have to do some work on PLC programming too. This is convenient for simple monitoring like counters etc. and normally requires manual refreshing of the page. If you are good with web based development you should be able to automate polling of that page and extracting information you need. PLC can be convinced to send data in more ways such as unsolicited message. This could be received by some program (even something like Hyperterminal which is normally part of any PC installation). Since CSV is just "flat file" with comma separated values and CRLF on the end of each line PLCs can easily produce ASCII strings of data formated properly. Only thing PC has to do is listen on maching port and periodically save collected stream of data to a text file with CSV extension.

Share this post


Link to post
Share on other sites
I have the same situation, somebody have a user manual or an example to do it. thanks.

Share this post


Link to post
Share on other sites
You'll have to clarify what situation you have as panic mode mentioned several. All equally useful and doable each withn their own pros and cons.

Share this post


Link to post
Share on other sites
I have done this myself over a serial connection but not over ethernet. How did you do this over ethernet? It was ugly under serial comms so I can only imagine . . .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0