DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Merge .csv files with VB Script ascii_diadem_9.1_or_later.zip: how to add column/channel with filename

Solved!
Go to solution

Hello,

 

I'm using ascii_diadem_9.1_or_later.zip for merging data from several .csv files.

The problem is that as a result I got some strange futuristic timestamps in one channel

which don't appear in the original .csv files:

How can I adjust the VB Script to automatically add a new channel to the resulting one .csv

file with the filename of the original .csv for debugging purposes?

 

Any help very much appreciated!

 

Thanks, Katharina

0 Kudos
Message 1 of 4
(4,997 Views)
Solution
Accepted by topic author katharinaM

Hi Katharina,

 

What happens when you drag on of your data files from the DIAdem NAVIGATOR or Windows Explorer into the Data Portal?  Do you see all the correct date/time values in a VIEW table of that channel?  The problem may be that you do not have a DataPlugin yet that correctly loads your data files.  The example was designed to show you how to concatenate multiple data files together, but it assumed that you would provide/have your own DataPlugin already.  If you do have a working DataPlugin already, then look for these lines near the top of the VBScript and replace "CSV" with the name of your DataPlugin.  If your data files have a different file extension than "*.csv", then you should also edit the "FileExt" line.

 

FileExt  = "CSV Files,*.CSV"  ' "*.DAT; *.CSV"
DataPlugin = "CSV"  ' "" or "SpecificDataPluginName"

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 4
(4,984 Views)

Hi Brad,

 

thanks for your reply. I use .csv files which I created from .dbd Data Logger files using a VB Script within Diadem.

There are 310 .csv files, which look okey (diplayed in Diadem). They only have the year 2011 within the timestamp channel.

If I load the .csv files via the 'Import multiple....vbs' script, I get one dataset with of over 40000 lines but the last 100 entries state the years 2024 & 2025 in the timestamp. And this happens even though I have X_Overlap   = TRUE  with X_Channel = 1 (default), and x_Channel refers to the first column which is the timestamp record of the data logger.

 

 

 

 

0 Kudos
Message 3 of 4
(4,980 Views)

Okey, now I got it: the problem is within 2 .dbd files; both with an EOF at the end (data logger was interrupted while writing)

I removed the EOF manually because the data written above that seems okey (in an text editor the timestamps state 2011), but

opening them with Diadem the timestamp is 2024&2025... so the problem must be within the 2 csv files, sorry for the trouble!

0 Kudos
Message 4 of 4
(4,976 Views)