LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you save dynamic data type, from the DAQ assistant, for use in Excel or matlab?

Currently, I have the following basic VI setup to save Data from my PCI6221 Data Aquisition Card.  The problem I'm having is I keep getting the last iteration of the while loop in the measurement file and that's pretty much it.  When I try to index the data leaving the loop it gives me a 2D array of Data which cannot be input into the "Write to Measurement File" VI.  How would I save this to a useful Data/time step format?  I was wondering of a way to continuously collect the Data and then save it in a large measurement file that I would manipulate in Matlab/excel?  Am I using the wrong type of loop for this application?  I also noticed my Dynamic Data array consists of data, time, timestep and then a vector of the data taken.  Is it possible to just get a vector of the time change per sample alongside the data?    Sorry for the barrage of questions but any help would be greatly appreciated, and thanks in advance!
 
-Bryan
0 Kudos
Message 1 of 5
(4,940 Views)
There is a VI in the Express > Signal Manipulation palette called "From DDT" that lets you convert from the Dynamic Data Type to other data types that are more compatible with operations like File I/O....for instance, you could convert your DDT into a 2D array and use the Write To Spreadsheet File.vi.  Just a thought...
 
-D
0 Kudos
Message 2 of 5
(4,939 Views)
Ok I tried this out, and the issue I'm having when I convert my Data type is that the loop still outputs only the last iteration of the Data if I put the array outside the while loop without indexing or if I try to index the data on the edge of the while loop then this makes it a 3D array and I cannot save that to Spreadsheet.  So, do I need to have my DAQ Assistant VI inside a while loop?  I know Im missing something silly here.
0 Kudos
Message 3 of 5
(4,937 Views)

Ok, why not just stick the Write to Measurement File Express VI inside the While Loop, and choose the "Append to file" option on the configuration page?

-D

0 Kudos
Message 4 of 5
(4,934 Views)
yeah, see I knew I was missing something simple.  Thanks alot 🙂
0 Kudos
Message 5 of 5
(4,931 Views)