LGH Files Reimagined - New Ways to Leverage InTouch History Files

3 min read

Mar 30, 2017 2:00:00 PM


If you're reading this, you likely have some use cases for working with InTouch LGH history files.  A classic way for InTouch users to log historical process data since just about the beginning of InTouch availability, there are still many of you out in the world with some usage of LGH logging to store historical data (or you at least have some legacy files you need to somehow utilize).

This blog post will discuss some unique ways to utilize LGH historical logging beyond the obvious use case of simply historizing process data being collected by InTouch.


Historically, one of the primary methods of accessing the historical data stored in an LGH file was using the HistData utility.  It requires scripting, does not run as a service, and has to be running in order for your scripts to execute.  And HistData won't work without an InTouch runtime license (i.e. there's no offline retrieval just utilizing the standalone LGH files).  And, on top of that, it's limited to retrieving only 2000 rows at a time.

Or, you can always make the decision to implement the Wonderware Historian, which supports direct import of LGH files.  But what if neither of those options meets the needs of your current situation.  I'm going to cover a particular use case where another alternative was the best option for leveraging the historical data from an LGH file.

1. Maintenance downtime for Wonderware Historian - LGH Files as a backup?

LGH_Fast_Load.pngNow I'm sure the first thing some of you are saying is "But Wonderware Historian supports Store-and-Forward."  This is true for newer versions but what if your particular implementation is older and doesn't support Store-and-Forward?

Now the next thing you're probably saying is "But you just told us that Historian can directly import LGH files - you can just use InTouch to log to LGH files as a backup during your maintenance period."  Again, this is true but what if your Historian implementation is logging only a few tags from several InTouch nodes?

You probably see where I'm going with this.  If you directly import those LGH files, you're flooding your Historian database with a whole bunch of tag data that you simply don't want in your database.

2.  So how do you extract only the data you need from an LGH File?

Well, you could certainly do some hocus-pocus with .NET or some other development medium to build a custom application to get just the data you need.  Hopefully some, if not all, of you are considering just how time-consuming and potentially costly that endeavor could become.

3. Once you have only the data you need, how do you get it into Historian?

Let's assume you've found a way to extract just the data you need from your LGH files.  You still need to get that data into your Historian database when your maintenance period is complete.  Again, you could handle that with that same custom application we just considered for the extraction - it's certainly possible to programmatically output a CSV file in the FastLoad format required by Historian.  But, hopefully, you're still considering how that might not be the most efficient usage of your resources, both from a labor and monetary standpoint, especially if custom development isn't the only available solution.

4. Okay, so why not just upgrade to a newer version of Historian that does support Store-and-Forward capabilities?

I'm sure you're catching on to my theme so far - that cost is typically always a variable that gets considered with this type of project.  Upgrading to a version of Historian supporting Store-and-Forward is certainly an ideal goal for this type of situation.  And, if you're in a budgetary position to pull the trigger on such an upgrade, that is certainly the recommended approach.

But what if you haven't budgeted for a Historian upgrade this year and what if your maintenance project can't wait until you can get approval for such a budgetary item?  In that situation, you would need a viable, cost-effective alternative to get you through your project maintenance periods until such time as it makes practical sense to upgrade to a newer version of Historian.

If you're nodding your head and can appreciate the need for such a flexible solution to backup your data using LGH logging, click below to find out how a company in this exact situation addressed the situation reliably, efficiently and cost-effectively.


 Read the Full Case Study Now

Topics: Wonderware CSV LGH

Kevin Rutherford
Written by Kevin Rutherford

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback and questions on posts are always welcomed - just use the area at the bottom of any post.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all