hist2csv - Historical data to CSV file program
hist2csv [-e environment] [-s start time] [-d directory] [-i interval]
hist2csv converts RTAP historian tables into CSV (Comma Separated) files with the following format: YYYY-MM-DD_<hist table>.csv where: YYYY = year (eg. 1994) MM = month (eg. 07) DD = day of month (eg. 01) <hist table> = historian table's alias with spaces converted to '_' The data is saved as follows to the file: "<time 1>",item 1,item 1 quality,item 2,item 2 quality,... "<time 2>",item 1,item 1 quality,item 2,item 2 quality,... where: <time 1> = time of sample. NOTE that the time is enclosed in double quotes item 1 = value of item one converted to string using rtDeToStr(3) item 1 quality = quality of item 1 <time 2> = time of sample. NOTE that the time is enclosed in double quotes item 2 = value of item two converted to string using rtDeToStr(3) item 2 quality = quality of item 2 The number of items is dependant upon how many items have been configured for the history table. Note that if this application is stopped and re-started, multiple values for the same time may occur, since a new connection to each historical table is open'ed on start up. The -e argument specifies the RTAP environment name to attach to (see rtRegisterForDebug(3)). If this option is omitted, the contents of the environment variable RTAPENV is used instead. The -d argument specifies the directory where the historical files are kept (the default is . (ie. the current directory)). The -s argument specifies the start time for archiving the historical data to the files (the default is 59 minutes, 59 seconds into the next hour). The format is: HH:MM:SS where: HH = hour (default = -1) MM = minute (default = 59) SS = seconds (default = 59) The -i argument specifies the interval (in minutes) at which to archive historical data to the files (the default is 30 minutes).
hist2csv logs error messages through RtapMonitor.
hist2csv was developed by tesserNet Systems Inc.
histDisplay(1), histArchive(1), RtapEnvTable(4)