While you can create trends in RSLogix5000 which you can later export to CSV file, this solution isn’t automated and not very fool proof. So what can you do? Below are some popular ways to automate data logging with your CompactLogix and ControlLogix:
Option 1: Log to CompactFlash or SD Memory
In version 16 of RSLogix 5000 Rockwell added sample code demonstrating the ability to programmatically create a text file on the removable CompactFlash or SD card which many newer models support. To do this simply review the include sample code, “CF_Read_Write_Example” which can be found in your “RSLogix5000\Projects\Samples\ENU\Rockwell Automation\v16″ directory, or the manual here.
UPDATE: There is a separate sample code download which does log to CSV file – for more information see this Blog Post HERE.
- Log in text file
Can format as CSV
- Plenty of space for large logs
- Text file saved in a binary format
- Manual retrieval
- Not a database solution
- Possible noise issues with older CompactLogix processors (more info here)
Note: Versions of the above mentioned code prior to version 16 didn’t contain error checking code and are therefore not recommended.
It’s a fairly easy task to write a routine to log data to an internal array. And it’s also quite easy to setup MS Excel and RSLinx Classic (Single Node for 1 PLC, OEM for many) to read that array (search RSLinx Classic help on EXCEL to find VBA sample code.)
However, trying to automate this process with VBA in MS Excel could be more work and effort than it’s worth.
- Fairly simple coding in PLC
- Extracting data to Excel via RSLinx Classic is fairly easy using sample code in RSLinx Classic help files.
- Writing and testing code to automate could be time consuming
- Reliability issues
- Data not in a database.
Option 3: PanelView Plus CE or 6 (or ViewME Station) DataStore ActiveX
The PanelView Plus CE, PanelView Plus 6, and ViewME Station all have the ability to use a free Rockwell ActiveX called “DataStore.” What this object does is simply log tags you choose to a CSV file which you can later copy to your PC and open in MS Excel.
- Automated data collection using your PVPlus 6 or CE at no extra charge
- Manual retrieval
- Not in a database
For over a decade I’ve been a fan of this simple yet elegant package which is basically a report generating add-on for MS Excel.
Before using this package, my automated RSView32 datalog reports were VBA queries of my RSView32 collected datalogs which I stored in MS Access. while this old method worked great, it was technically far beyond what most clients wanted to do to generate reports.
But with XLReporter, Ms Excel, and RSLinx Classic you can not only setup data collection into spreadsheets directly, but you also can generate some good looking reports automatically. For more information on XLReporter, check out their website at www.TheReportCompany.com.
- No code to write
- Easy to use
- Great tech support
- Price starts around $1000 (without RSLinx or MS Excel)
- Not a database (options to read databases can be purchased)
ViewSE’s data logging features are fairly extensive. You can configure unlimited number of datalogs, and run up to 20 simultaneously. Each datalog can have up to 10,000 tags in it (ViewSE has no tag limit,) and they can be logged to either a compressed format (extractable with a free utility,) or better yet to any database which supports ODBC (MS SQL Server Express is included.)
- Supports 20 datalogs simultaneously logging 10,000 tags each
- Supports most databases via ODBC
- Comes with RSLinx Classic and Enterprise (ViewSE versions)
- Can’t easily view data directly in MS Excel
- Cost of ViewStudio Development and ViewSE runtime (if not already owned)
Option 6: FactoryTalk Historian SE
For the most robust data collection I recommend FT Historian SE. This package is built to do one thing well – large volume time series data collection. Based on the world’s largest installed base of data collection software (OSI PI,) Rockwell has included easy to use hooks to setup logging of data from it’s PLC’s, and has also included it’s popular web based trending and reporting package, VantagePoint.
- World class solution based on OSI PI with space saving data compression
- Easy connectivity to PLC’s, especially using RSLinx Enterprise or OPC.
- Excel plugin for easy viewing of collected data
- Comes with full web based trending and reporting package (VantagePoint)
- Requires Microsoft Server 2008 R2
- Cost of lowest tag count roughly $4500
I hope you’ve found this article about my thoughts on how to datalog data from the ControlLogix and CompactLogix helpful. If you have a question or would like to offer your own data logging option please use the “Leave a reply” form below to comment on this article.
By Shawn Tierney