How to Convert N Channel N Sample waveform to 2D DBL Array

Updated Oct 25, 2020



  • LabVIEW


  • NI-DAQmx

After I get N channel data from DAQmx, I want to plot the waveform graph and also get DBL type of values in 2D array. How?

Typical data types read by DAQmx read function are Waveform and DBL type. You can select the interface optionally according to the desired data type. However, if you want both Waveform type and DBL type data at the same time, you must change the 1D array of Waveform type to 2D array of DBL type.

Waveform data includes 3 components(dt, t0, Y). Then, you should extract the Y component using Get Waveform However, because data conversion cannot be direct, it can be recombined using for loop. Here's an example.