DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Merge columns from multiple datafiles

Hello,

 

I am using the NI DIAdem script (http://zone.ni.com/devzone/cda/epd/p/id/3870.) to merge multiple datafiles from vehicles.

 

What I do at the moment is the following:

- Raw data = 4 files txt files (Basic measurement, Vehicle measurement, Engine measurement, Aftertreatment measurement)

- Every trip these 4 separate files are recorded and stored (Key-On is start new files, Key-Off is stop and save file)

- These 4 files start with the same columns (6 columns => T, DATE, TIME, MS, TYPE and EXTRA)

- With the concatenate script I import files from multiple trips (for instance one week)

- I start f.i. with the Basic measurement and merge the files and save these files in the first group.

- I repeat this for the Vehicle measurement, Engine measurement and Aftertreatment measurement and than I have 4 separate groups in the DATA portal, with their own DATE, TIME etc. (the content of the DATE, TIME is the same, but from the 7th column the data in the groups is different.

 

What I want is the following:

- Merge the 4 different txt files from multiple trips in one file. So merge not only the rows, but also the columns from all the columns from the Basic measurement and the columns from the Vehicle measurement, Engine measurement and the Aftertreatment measurement without the first 6 columns.

 

It would be really great if somebody can help me!

 

With kind regards,

Stijn

0 Kudos
Message 1 of 4
(6,466 Views)

Hello Stijn,

 

Without having access to the datasets it is not easy to give the best solution for your problem.

The first point is the import of the datasets. Date and time values are represented in one channel (column) in DIAdem. So it is helpful to import your datasets with a DataPlugin which supports the conjunction of data and time data.

Second, with DIAdem we install an example which concatenates the channels of all channel groups of the Dataportal. For this it looks into the first channel group, reads one of the selected channels after the other and concatenates all channels of the other groups with the same channel name. The results are stored in a new channel group. You can use this function by loading and running the example script file “ChnConcatenation_Main”.

 

If this info doesn’t help I need some of your datasets.

 

Greetings

Walter

0 Kudos
Message 2 of 4
(6,446 Views)

Hello,

 

Can somebody help me with adjusting the script? It will save a lot of time if I can also merge the columns, so import different files!

 

Thanks in advance!

 

With kind regards,

Stijn

0 Kudos
Message 3 of 4
(6,272 Views)

Hi Stijn,

 

I don't see that you have sent or posted any data files.  We need data files to test any script against.  There's no point sending you a script that works perfectly with the random data file we picked that **seemed** to be the same as yours, if on your end the script just throws an error because your data sets are different in some important but non-obvious way.

 

Brad Turpin

DIAdem Product Support Engineer

National Instrumetns

0 Kudos
Message 4 of 4
(6,267 Views)