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

Updated Jan 2, 2024



  • LabVIEW


  • NI-DAQmx

After I get N channel data from DAQmx Read VI, 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 Components VI. However, because data conversion cannot be direct, it can be recombined using for loop. Here's an example.