beautypg.com

Daqadcsetdataformat – Measurement Computing TempBook rev.3.0 User Manual

Page 135

background image

TempBook User’s Manual

daqCommand Reference (Enhanced API) 11-11

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);

Parameters

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

postProcFormat

Flags specifying the options to use

Returns

DerrNoError

- No error (also, refer to API Error Codes on page 11-39)

See Also

daqCvtRawDataFormat,daqCvtRawDataFormat

Program References

None

Used With

All devices

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. The TempBook/66 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.