LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing data in a usable text format from a DAQmx acquisition

I am currently acquiring 7 channels of data using the DAQmx Read Polymorphic.vi set to Analog 2D DBL N-channel N-samples at 192kHz.  The data output is wired to the WriteFile.vi.  This is all nested in a while loop for continous data acquisition.  When I finish the acquisition, the data file is in some type of binary format that I am unable to use.  I can use the WritetoSpreadsheet.vi instead of the Writefile.vi, but it causes the program to "miss" data since it opens and closes the file every Loop iteration.  Is there some type of simple conversion vi I can use to convert the data into a usable text format?  Should this be done during the write process or afterwards via a separate program?
0 Kudos
Message 1 of 3
(2,628 Views)
Using the Read File function and specifying the same data type as the write, you can import the binary when the acquisition it complete and then save it as text. Saving as binary like you are doing now is the fastest and most effecient way to store it. However, if you wanted to experiment, you could save as text without using Write To Spreadsheet. If you used the Array to Spreadsheet function, it will convert to text and the Write File will save it that way. That is exactly what the Write To Spreadsheet VI does. You can open it up and look at the code.
0 Kudos
Message 2 of 3
(2,620 Views)
 

you are dealing with a very high sampling rate

so, my advise would be to use this example vi ( for DAQmx)

The data logged by this vi can be read by example vi 'High speed data reader.vi' that you will find in examples shipped with LabVIEW, Find examples>>Hardware input output>>Traditional DAQ>> solutions>>Data loggers folder

In the same folder, you will find two more vi's  Data logger to spread sheet file.vi (traditional DAQ) and read data from spread sheet file.vi.

see if it helps

Note: If you are using traditional DAQ, use the 'high speed data logger .vi' that you will find in the same folder

 

0 Kudos
Message 3 of 3
(2,618 Views)