crkent
Newbie
Karma: +0/-0
Posts: 2
|
|
« Reply #2 on: August 28, 2010, 01:26:17 AM » |
|
We have the Advanced TCP/IP Data Logger, Professional Ed.
The CSV was created as a log file (Options, Configuration Options, Log File, Create Log File on Disk, file name prefix/extension = csv). Something tells me that's not the correct method... Here's what I have and what I need to do:
I have data coming across IP sucessfully to the TCP/IP Data Logger. Here is a sample: <-CALGAS,1,2010-07-21,17:19.19.000,1,.0 ,192 <-BAROM1,1,2010-07-21,17:19.19.000,1,30.0218 ,192 <-CTIM ,1,2010-07-21,17:19.19.000,1,93.2073 ,192 <-WATTS1,1,2010-07-21,17:19.19.000,1,2.03906 ,192 <-GWATTS,1,2010-07-21,17:19.19.000,1,.0 ,192 <-SSWATT,1,2010-07-21,17:19.19.000,1,204.3 ,192 <-AMPS2 ,1,2010-07-21,17:19.19.000,1,7.45312 ,192 <-GVARS ,1,2010-07-21,17:19.19.000,1,.040781 ,192 <-WATTS2,1,2010-07-21,17:19.19.000,1,.27 ,192 <-DBULB ,1,2010-07-21,17:19.19.000,1,74.6492 ,192 <-WBULB ,1,2010-07-21,17:19.19.000,1,.0 ,192 <-SSVARS,1,2010-07-21,17:19.19.000,1,172.8 ,192 <-VARS1 ,1,2010-07-21,17:19.19.000,1,4.5 ,192 This batch (about 10-15 lines), changes and is resent from the source every 1 minute. I need to save each batch into a directory as a single, unique CSV file. Therefore, each 10-15 line send should result in a single CSV file (uniquely identified by a timestamp). A following set of output lines, a minute later, would need to also be saved to a single CSV file (without overwritting the previous file), and so on.... forever. I have another program that will poll the CSV file and delete once the data is analyzed. Currently, if I send output to a CSV file, I get one file for each line of data (15 lines = 15 files). How do I get all lines, sent in a batch, in a single CSV? Also, how to I set up the log to name each file uniquely by timestamp? E.g. filenameHHMMSS, filenameHHMMSS (where filename represents the same name ("TIGER") and the HHMMSS represents an added timestamp to the filename in hours, minutes, and seconds?
|