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