Converting Trend History Files from Binary to Text

By default, IWS saves trend history files in a binary format (.hst). Because you may want to have these files in .txt format, IWS provides the HST2TXT.EXE program to convert trend history files from binary into text format.

To convert a file, use the following procedure:
  1. From a DOS window, change directory (cd) to the IWS \Bin directory:
    cd C:\Program Files\InduSoft Web Studio v7.0\Bin
  2. At the command prompt, copy the Hst2txt.exe into the same directory where the .hst file is located.
  3. At the command prompt, type Hst2txt.exe and specify the following parameters:
    • filename: Name of the trend history file to convert
    • [separator]: Data separator character (default is <TAB>)
    • [/e]: Extended functionality (convert data with more than 10 characters)
    • [/i:HH:MM:SS]: Start time in hours (HH), minutes (MM), and seconds (SS)
    • [/f:HH:MM:SS]: Finish time in hours (HH), minutes (MM), and seconds (SS)
    • [/m]: Include milliseconds in the Time column (Type 1 to print the milliseconds value in the text file created from the .hst file.)
      For example:
      Hst2txt.exe 01952010.hst

      The program creates a .hdr (header) file and the .txt file, which are both plain text files that can be viewed using any text editor (for example, Notepad).

    • The .hdr file contains the name of the tags configured in the Trend Worksheet.
    • The .txt file contains the tag values saved in the history file.
  4. After the program converts the file, type Exit to close the DOS window.
Note: Alternatively, you can use the HST2TXT math script in a Math worksheet to convert binary files into text format automatically without having to use a DOS window.
See also: