Wonderware InTouch Reports without Historian

Wonderware InTouch Reports without Historian

Ever wonder how to build Wonderware InTouch reports without Historian?   Not every Wonderware InTouch SCADA/HMI application warrants a full blown historian system–perhaps yours is one of them.  In fact, InTouch does a very nice job of logging historical data all on its own.   InTouch logs historical data right out of the box to its native LGH file format.  So how can you take advantage of the built in historical logging available in InTouch and still gain easy access to data and provide reports as if you had a full blown historian?  Consider using WorkSmart’s LGH File Inspector as your all in one query and reporting solution.

WonderwareReportsFeaturedImage - Wonderware InTouch ReportsWhat is LGH File Inspector?

LGH File Inspector is a must have query and reporting tool for anyone with a Wonderware InTouch SCADA/HMI application that logs historical data using the classic method of storing  history to Wonderware InTouch LGH files. Historical LGH files are accessed through an easy and intuitive user interface and includes the ability to update CSV files and Excel workbooks on a regularly scheduled interval.  The concept is very simple, every LGH File Inspector query includes advanced settings that can be configured to initialize the query beginning date and time and then update an Excel worksheet and present the results in Excel or just to perform the work silently in the background.

In addition, LGH File Inspector can be used to perform ad hoc queries and analysis.  So whether you need regularly scheduled reports or just need to get historical data quickly and easily into a spreadsheet or CSV file, LGH File Inspector is the right tool for the job!

How does it work?

  1. Install the software.  LGH File Inspector installs in just minutes.
  2. Point to your LGH data files folder.  After installation, LGH File Inspector will ask you to browse to the folder containing your application’s LGH files.
  3. Drag and drop tags of interest into the query and select the time and frequency of data you want.
  4. Choose one of three output destinations: screen, CSV File, or Excel workbook

So how do I build reports without Historian?

Follow the steps here to learn how to build Wonderware InTouch reports using the advanced features of LGH File Inspector queries.Report_ws - Wonderware InTouch Reports

For this example,we will build an LGH File Inspector query that retrieves level data for several historically logged level tags in an InTouch SCADA/HMI application.  The results of the query will update the Query Data worksheet in a Microsoft Excel workbook called: Levels_rpt.xlxs.  A second worksheet called Report presents the formatted results using Excel formulas that refer to the data on the Query Data worksheet.

Click here to download the Levels_rpt.xlsx Excel workbook to see how the formulas on the Report worksheet refer to the data on the Query Data worksheet.

Let’s get started!

Start by building the LGH File Inspector query with the levels tags we want in our report.  Open LGH File Inspector and click New from the Home TabQueryBeginDateTime - Wonderware InTouch Reports

  1. Select a Query Begin Date from the Calendar, leave Hours, Minutes, and seconds at zero.
  2. Enter a Query Duration of 1 Day and a Query Interval of 5 minutes.
  3. Drag and drop the level tags for the report from the Tags Available to Query List to the Tags in this Query list.
  4. Click Run Query to preview the results.

Next,  configure the advanced options for the query so that it initializes the query’s beginning date and time to yesterday and updates the Query Data sheet in our Levels_rpt.xlsx workbook.  We do this from the Advanced Query Settings window which is available in the Query group of the LGH File Inspector Home Tab.

VariableQueryBeginDateTime - Wonderware InTouch Reports

  1. Select Today from the drop down menu in STEP 1 to initialize the date to today.
  2. Enter -1 (negative 1) in the Days field to subtract 1 day from “Today” and leave all others zero .  This will always result in yesterday’s date.

Next up, configure the destination to update the Query Data worksheet in the Levels_rpt.xlsx workbook.

  1. Click Update existing worksheet radio button.
  2. Click in existing workbook and Show radio button.  Clicking this option will cause the workbook to open in Excel after the query has updated the worksheet.
  3. Click  Browse to navigate to the Levels_rpt.xlsx workbook file,  a list of available sheets will be displayed in the drop down menu.
  4. Choose the Query Data worksheet from the drop down menu.
  5. Click Save and Close to return to the main window.QueryDestinationOption - Wonderware InTouch Reports

Finally, save the query by clicking Save from the Home Tab.

  1. Click Save from the Home Tab and name the query Levels_rpt.lghq

Putting it all together . . .

Try it out.   Close LGH File Inspector and then double-click your new query.  The query runs in the background updating the Levels_rpt.xlsx workbook with new data and then displays in Microsoft Excel.

Wonderware InTouch reports are made easy using LGH File Inspector and Microsoft Excel.  By configuring an LGH File Inspector query’s advanced options, we showed how automating an Excel workbook with updated data can be accomplished just by double-clicking the file from Windows.

Try it for yourself!

Download a FREE trial of LGH File Inspector from our distributor, Software Toolbox.

Leave a Reply