D-10, Daqadcsetdataformat, Daqadcsetdiskfile – Measurement Computing WaveBook rev.3.0 User Manual
Page 206

D-10 daqX API - Command Reference,
6-24-99
WaveBook User’s Manual
DaqAdcSetDataFormat
DLL Function
DaqAdcSetDataFormat
(
DaqHandleT handle,
DaqAdcRawDataFormatT
rawFormat,
DaqAdcPostProcDataFormatT
postProcFormat);
C
DaqAdcSetDataFormat(DaqHandleT handle, DaqAdcRawDataFormatT
rawFormat,
DaqAdcPostProcDataFormatT
postProcFormat);
Visual BASIC
VbdaqAdcSetDataFormat &(ByVal handle&, ByVal rawFormat&, ByVal postProcFormat&)
Delphi
DaqAdcSetDataFormat(Handle:DaqHandleT; rawFormat:DaqAdcRawDataFormatT
rawFormat;
PostProcFormat:DaqAdcPostProcDataFormatT);
handle
The handle to the device for which to set the option
RawFormat
The channel number on the device for which the option is to be set
Parameters
PostProcFormat
Flags specifying the options to use
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
DaqCvtRawDataFormat, daqCvtRawDataFormat
Program References
None
Used With
All devices
Description
daqAdcSetDataFormat
allows the setting of the raw and the post-acquisition data formats which will be returned by the acquisition
transfer functions.
Note: Certain devices may be limited to the types of raw and post-acquisition data formats which can be presented.
The rawFormat parameter indicates how the raw data format is to be presented. Normally, the raw-data format represents the data from
the A/D converter. The default value for this parameter is DardfNative where the raw-data format follows the native-data format of the
A/D for the particular device. An optional parameter is DardfPacked where raw A/D values are compressed to make full use of all
unused bits for any native format that leaves unused bits in the byte-aligned count value. For instance, a 12-bit raw A/D value (which
would normally be represented in a 16-bit word, 2-byte count value) will be compressed so that 4 12-bit A/D raw counts can be
represented in 3 16-bit word count values. Currently, only the WaveBook/512 supports this packed format (used with the generic functions
of the form daqAdcTransfer…).
The postProcFormat parameter specifies the format for which post-acquisition data will be presented. This format is used by the one-
step functions of the form daqAdcRd…. The default value is DappdfRaw where the post-acquisition data format will follow the
rawFormat
parameter.
daqAdcSetDiskFile
DLL Function
DaqAdcSetDiskFile(DaqHandleT handle, LPSTR filename, DaqAdcOpenMode openMode,
DWORD preWrite);
C
DaqAdcSetDiskFile(DaqHandleT handle, LPSTR filename, DaqAdcOpenMode openMode,
DWORD preWrite);
Visual BASIC
VbdaqAdcSetDiskFile&(ByVal handle&, ByVal filename$, ByVal openMode&, ByVal
preWrite&)
Delphi
DaqAdcSetDiskFile(handle:DaqHandleT; filename:PChar; openMode:DaqAdcOpenMode;
preWrite:DWORD)
handle
Handle to the device for which direct to disk ADC acquisition is to be performed.
filename
String representing the path and name of the file to place the raw ADC acquisition data.
openMode
Specifies how to open the file for writing
Parameters
preWrite
Specifies the amount to pre-write(in bytes) the file
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
DaqAdcTransferGetStat, daqAdcTransferSetBuffer, daqAdcTransferStart,
daqAdcTransferStop
Program References
ADCEX1.C, DACEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi)
Used With
All devices
Description
daqAdcSetDiskFile
allows you to set a destination file for ADC data transfers. ADC data transfers will be directed to the specified disk
file. The filename parameter is a string representing the path\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:
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.
DoamWriteFile
- Rewrite or write over an existing file. This operation will destroy the original contents of the file.
DoamCreateFile
- Create a new file for subsequent ADC transfers. This mode does not require that the file exist beforehand.
The preWrite parameter may, optionally, be used to specify the amount that the file is to be pre-written before the actual data collection
begins. Specifying the pre-write amount may increase the data-to-disk performance of the acquisition if it is known beforehand how much
data will be collected. If no pre-write is to be done, then the preWrite parameter should be set to 0.