Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

saving array in files during Continuous Aquisition

I Want to aquire more than 1000000 (1 million) samples from one of the analog input. For finite length aquisition, When the length of array exceeds 1 million i get floating point error. So i have decided to go for continuous aquisition. I am finding it difficult to save the aquired data in array to file when aquisition is in progress. I am using ANSI C API for programming NIDAQ card.
 
Please help.
 
Dhaval
0 Kudos
Message 1 of 2
(2,507 Views)
Hello Dhaval,

The NI-DAQ driver installs ANSI C example programs that show how to perform a continuous acquisition in the default location of C:\Program Files\National Instruments\NI-DAQ\Examples.  I would start by taking a look at the examples that illustrate how to program continuous acquisition, and alter these examples to add file I/O functionality.  More examples can be found in the Example Code Library at www.ni.com.  As far as file I/O, it really depends on what library of functions you are using to program saving the data to file.  ANSI C has the stdio.h header file that declares a variety of functions that perform input and output to files.  LabWindows/CVI has an ArrayToFile function that makes programming this task even easier, as shown in this example:

NI-DAQmx: Continuously Acquire From Multiple Channels and Save To Spreadsheet File

I hope this helps,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support

0 Kudos
Message 2 of 2
(2,491 Views)