Intouch Historical Data


Thread Starter

Neil White

As we are new to intouch I cannot see how we can include/append string tags to the resulting .LGH files? The string tags would hold data
such as Batch name, Operator name, etc.

Is it also possible to then import the LGH files into MSAccess for reporting purposes or is there a third party piece of software that would
be more suited?
There is no way to "write" data externally into your *.lgh and *.idx wonderware hist trend files. Using the wonderware histdata tool you can query and extract data from your lgh files into a csv file. See the wonderware "intouch users guide" section 8. Once you have your data in a csv file you can edit it. Use the command TransferText in Microsoft access to import this data into a MS Access table.

Good Luck


Chetan Patel

We are distributor for wonderware in gujarat region of india. can u specify your problem exactly, and what is your exact requirement. We have done something that matches your requirement
What kind of exact Reporting u require.


Chetan patel

Unai Uriarte

I have not used string tags in historical data never so I cant help you in your first problem.
Only one suggestion there is something called eventes. If you want to know all the changes hapenned in a message tags you can use the tick LogEvents in the tagname dictionari. In this way you will nows when a change in this tags
happened, who was the operator in this time and the new value of the tagname.
Maybe will be usefull for you.

For the second question, there is one application inside your InTouch folder called HistData. This program gives you and DDE acces to the historical data.

The HistData utility program provides DDE (Dynamic Data Exchange) access to the historical data files created by InTouch. It is used to move selected historical data into a requesting program such as Microsoft Excel. HistData
provides you with the ability to immediately view historical data or create a file for later access. Access to the historical data may be accomplished via macro functions in a requesting program or from within InTouch.
Im a consultant for a Wonderware distributor. As you can see from the previous comments you have recieved, the binary format of the LGH
files are almost impossible to append or modify. The hist data tool will take your Analog data out to a .csv file. To push string data the
way you are discussing another method may be the SQLAccess addon. You bind tags to columns in a ODBC database of your choice and use the SQL
Access commands in a script method of your choice to populate the database. This could save you the cost of buying additional software, but
depending on how much data you need to setup scalability may be affected later or with either system performance or manhours consumed for
creating or adding on will lose the the upfront savings.

WW Inbatch or Industrial SQL product may be better fit to complement your Intouch solution. Wonderware sells product combos with a reduced
point count (Intouch with InSQL 500Tag,Intouch/Inbatch).

The InSQL package has a client tool component you can buy that simplifies report creation for the end user, but if you are developer and the
reports are canned I just write the ASP pages to generate the reports
Somebody helped me out with something similiar which I used for small amounts of logging. Look at FileWriteMessage(Filename, FileOffset,Message_Tag,LineFeed); I use it to log a date, a time and a value.

MyTag = $DateString + StringChar(44) +$TimeString + StringChar(44)+MyTagValue FileWriteMessage("C:\Data\file.csv",0,MyTag,1)

(writing this from memory I think it is StringChar and 44 is a comma)

This stamps Date, Time and my tag value as 3 CSV's on one line, then the next log is the same three items on the line below, etc. I execute this every 20 seconds in an application script and this file can then be viewed using Excel.

I do it this way so that I can put the file on floppy for use on another machine.