From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Combine Date, Hours, ... channels at csv Import

Little problem with the import of csv files with this structur:

Date;Hours;Minutes;Seconds;SgNr;TS;TI;DS;DI;FS;FI;BS;BI;TK;TG;FK;PK;MT;LM;                                                                                                                                                                                     
02.07.2014;08;00;42.009;0;23.960;23.300;0.000;23.700;0.000;0.0;49.000;30.100;TRUE;FALSE;FALSE;FALSE;0.000;0.000;                                                                                                                                               
02.07.2014;08;00;52.009;0;24.027;23.300;0.000;23.700;0.000;0.0;49.000;30.300;TRUE;FALSE;FALSE;FALSE;0.000;0.000;    

....

I have to combine the separate channels with Date, Hours, Minutes and Seconds to one channel at csv Import.

Tried to create an import filter with different Diadem versions (2010, 11) with no success.

Any ideas how to handle that?

Thanks for your help!

0 Kudos
Message 1 of 5
(5,281 Views)

Hi,

DIAdem 2012 introduced a new feature for DataPlugins to specify a formatter per channel.

With this new feature it is possible to combine your date, hour, minutes and seconds to one channel.

Please have a try with the attached DataPlugin.

0 Kudos
Message 2 of 5
(5,268 Views)

Hi,

 

Thanks a lot for your assistance! The URI works perfectly.

 

Some aditional questions:

- I assume the URI was created manualy and not build by the Data Plug In assistant? Is there a way to use the assistent in Version 2012 to combine the channels?

- the real data files start with an empty line: how can I add a command to the Sub ReadStore in the URI to ignore the first line?

 

Thanks again for your help!

 

0 Kudos
Message 3 of 5
(5,216 Views)

Hi,

currently it is not possible to configure such a DataPlugin using the DIAdem wizard. However, the VBS DataPlugin API is well documented in the DIAdem help.

 

To skip lines you can either call

File.SkipLine     ' skip one line
File.SkipLines(n) ' skip n lines

 

or to skip all empty lines call

File.Formatter.IgnoreEmptyLines = TRUE

in the Sub ReadStore.

 

To edit VBS code of the DataPlugin in DIAdem go to Settings -> Options -> Extensions -> DataPlugins

and right click on the DataPlugin to edit and choose Edit Script.

0 Kudos
Message 4 of 5
(5,213 Views)

Perfect! Thanks a lot!

OK, next I will read the documentation 😉

 

0 Kudos
Message 5 of 5
(5,203 Views)