beautypg.com

Function usage, Prototypes, Program references – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 84

background image

Function Usage

The daqAdcSetDiskFile function sends acquisition scan data to a disk file specified by the user. Data
written to the disk file is the same raw scan data that is read into the buffer. After the data is written to the disk,
it is passed on to whatever application makes use of the buffer. The following diagram illustrates the transfer of
data:

daqAdcSetDiskFile

only establishes where and how the data will be sent.

The writing of data takes place only after calling either the

daqAdcTransferGetStat

or

daqWaitForEvents functions.

The filename parameter is a string representing the path and name of the file to be opened.

The openMode parameter indicates how the file is to be opened for writing data. Valid file open modes are
defined as follows:

DaomCreateFile

- Create a new file for subsequent ADC transfers. This mode does not require that the file

exist beforehand.

DaomWriteFile

- Rewrite or write over an existing file. This operation will destroy the original contents of

the file.

DaomAppendFile

- Open an existing file to append subsequent ADC transfers. This mode should only be

used when the existing file has a similar ADC channel group configuration as the subsequent transfers.

The preWrite parameter may be used to specify the extent that the file will be pre-written before the actual
data collection begins. This may increase the data-to-disk performance of the acquisition, if the amount of data
to be collected is known beforehand. If pre-writing is not desired, then the preWrite parameter should be
set to 0.

Prototypes

C/C++

daqAdcSetDiskFile(DaqHandleT handle, LPSTR filename, DaqAdcOpenMode
openMode, DWORD preWrite);

Visual BASIC

VBdaqAdcSetDiskFile&(ByVal handle&, ByVal filename$, ByVal openMode&,
ByVal preWrite&)

Program References

DAQADCEX04.CPP, DAQEX.FRM

(VB)

4.2-28 Daq API Command Reference

988594

Programmer’s Manual