Chapter 2 Function Reference — DAQ_to_Disk
©
National Instruments Corporation 2-143 NI-DAQ FRM for PC Compatibles
count is the number of samples to be acquired (that is, 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), NI-DAQ ignores the count parameter.
Range: 3 through 2
32
– 1 (except the E Series devices).
2 through 2
24
(E Series devices).
2 through 2
24
– 3 (PCI-6110E and PCI-6111E), count must be EVEN.
2 through 2
24
(PCI-445X devices).
2 through 2
32
– 1 (PCI-455X devices).
sampleRate is the sample rate you want in units of pts/s.
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.
Note If you are using an SCXI-1200 with remote SCXI, the maximum rate will depend
on the baud rate setting and count. Refer to the SCXI-1200 User Manual for more
details.
concat enables concatenation of data to an existing file. Regardless of the value of concat,
if the file does not exist, it is created.
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
NI-DAQ acquires and saves all the samples you want (or until an acquisition error occurs).
Note If you select external start triggering for the DAQ operation, a high-to-low edge at
the STARTTRIG* I/O connector of the MIO-16/16D, the EXTTRIG* input of the
AT-MIO-16F-5, AT-MIO-64F-5, and AT-MIO-16X, or a low-to-high edge at the
EXTTRIG input of Lab and 1200 Series devices initiates the DAQ operation. If
you are using an E Series device, you need to apply a trigger that 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. Be aware that 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. NI-DAQ ignores the value of the count parameter