Example Code

Importing data channels which span multiple data files into DIAdem

Code and Documents

Attachment

Often in data logging applications which generate a great deal of data, that data is saved in a segmented fashion across multiple data files, where each data file contains the data values of all the channels being acquired for a particular time slice.

This set of DIAdem VBScript projects illustrates how you can programmatically import data channels which span multiple files and then concatenate the values from all the desired files into a single set of DIAdem data channels.

Each DIAdem VBScript project enables you to select N data files from the list of possible data files acquired, from the same directory or different directories. The data from these files is loaded into DIAdem as N sets of parallel channels. Finally, these parallel channels are appended one after the other, according to their time/x-channel values, until you have only one set of consolidated channels in DIAdem, containing the entire time period(s) corresponding to the data files selected.

The is a separate VBScript project for each type of file (ASCII, Excel, Binary) and also for DIAdem versions before 9.1 or version 9.1 or after. The 9.1 versions have additional features and make use of DataPlugins.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors