Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ TO DISK

HI dears
i want to get information abpout the api " DAQ_TO_DISK" please tell:
1) how this API work
2) how i can get the multiple channel data at the same time using this API
3) how analog input data can be got by this API on HDD and again can be coverted into voice files like .wav,.m3
i mean how i can again get the original voice from these channels again that is stored on HDD.
4) Is this api give the data on HDD after Analog to digital conversion or not please specify..?
5) please send sample like that in which i can get the voice samples on HDD using this API.
 other guidance as u sugest better
                                                                        thanks
                                                                                           ajmal
Lead Data Scientist
0 Kudos
Message 1 of 3
(3,175 Views)

Hi ajmal,

I think you are referring to the function DAQ_To_Disk when using Traditional DAQ calls.  You can always find out more information on what a specific command does by going to the Traditional NI-DAQ Function Reference Help (Start > All Programs > National Instruments > NI-DAQ). 

I will go ahead and paste all of the information from that help file in this post

DAQ_to_Disk

status = DAQ_to_Disk (deviceNumber, chan, gain, filename, count, sampleRate, concat)

Purpose

Performs a synchronous, single-channel DAQ operation and saves the acquired data in a disk file. DAQ_to_Disk does not return until Traditional NI-DAQ has acquired and saved all the data or an acquisition error has occurred.

Parameters

Direction Name Type Description
Input deviceNumber i16 assigned by Measurement & Automation Explorer
  chan i16 analog input channel number
  gain i16 gain setting
  filename STR name of data file to be created
  count u32 number of samples to be acquired
  sampleRate f64 rate in units of pts/s
  concat i16 enables concatenation to an existing file

Parameter Discussion

chan is the analog input channel number. If you are using SCXI, you must use the appropriate analog input channel on the DAQ device that corresponds to the SCXI channel you want. Select the SCXI channel using SCXI_Single_Chan_Setup before calling this function. Refer to the Traditional NI-DAQ User Manual for PC Compatibles for more information on SCXI channel assignments.

Range: See the DAQ Device Analog Input Channel Settings topic.

gain is the gain setting to be used for that channel. This gain setting applies only to the DAQ device. If SCXI is used, you must establish any gain at the SCXI module either by setting jumpers on the module or by calling SCXI_Set_Gain. Refer to the DAQ Device Analog Input Channel Settings topic for valid gain settings. If you use invalid gain settings, Traditional NI-DAQ returns an error. Traditional NI-DAQ ignores gain for the LPM.

Note  If you want to supply a gain of 0.5, use the value -1.

count is the number of samples to be acquired (the number of A/D conversions to be performed). The length of your data file in bytes should be exactly twice the value of count upon completion of the acquisition. If you have previously enabled pretrigger mode (by a call to DAQ_StopTrigger_Config), Traditional NI-DAQ ignores the count parameter.

Range: 3 through 232 - 1 (except the E Series devices).
0 through 232 - 1 (E Series devices).
2 through 224 - 3 (PCI-6110 and PCI-6111) count must be even.
2 through 224 (44XX devices).
2 through 232 - 1(45XX devices).

More to come,
0 Kudos
Message 2 of 3
(3,163 Views)
Here's the rest:

sampleRate is the sample rate you want in units of points per second.

Range: Roughly 0.00153 pts/s through 5,000,000 pts/s. The maximum range varies according to the type of device you have and the speed and degree of fragmentation of your disk storage device.

concat enables concatenation of data to an existing file. Regardless of the value of concat, if the file does not exist, it is automatically created.

Range: 0: Overwrite file if it exists.
1: Concatenate new data to an existing file.

Using This Function

DAQ_to_Disk initiates a synchronous process of acquiring A/D conversion samples and storing them in a disk file. DAQ_to_Disk does not return control to your application until Traditional NI-DAQ acquires and saves all the samples you want (or until an acquisition error occurs).

Note  If you are using an E Series device, apply a trigger you select through the Select_Signal or DAQ_Config functions to initiate data acquisition. If you are using all E Series devices, see the Select_Signal function for information about the external timing signals. If you do not apply the start trigger, DAQ_to_Disk does not return control to your application. Otherwise, DAQ_to_Disk issues a software trigger to initiate the DAQ operation.

If you enable pretrigger mode, the sample counter does not begin counting acquisitions until you apply a signal at the stop trigger input. Until you apply this signal, the acquisition continues to write data into the disk file. Traditional NI-DAQ ignores the value of the count parameter when you enable pretrigger mode. If you do not apply the stop trigger, DAQ_to_Disk eventually returns control to your application because you eventually run out of disk space.

In any case, you can use Timeout_Config to establish a maximum length of time for DAQ_to_Disk to execute.


0 Kudos
Message 3 of 3
(3,161 Views)