beautypg.com

Daqadcsetdataformat – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 81

background image

daqAdcSetDataFormat

Also See: daqAdcSetMux, daqAdcSetClockSource, daqAdcSetTrig, daqAdcRdN

Format

daqAdcSetDataFormat(handle, rawFormat, postProcFormat)

Purpose

daqAdcSetDataFormat

sets the format for both the raw and post-acquisition data returned by the

acquisition transfer functions.

Parameter Summary

Parameter Type

Description

handle DaqHandleT

The handle to the device for which to set
the data format

rawFormat DaqAdcRawDataFormatT Specifies the raw data format
postProcFormat DaqAdcPostProcDataFormatT Parameter value specifying the data

formats available

Parameter Values

handle:

obtained from the daqOpen function

rawFormat:

see table below

postProcFormat:

see table below

Parameter Type Definitions

rawFormat-(DaqAdcRawDataFormatT)

Definition

Description

DardfNative

Data format follows the native-data format of the device it originated from.

DardfPacked

Raw acquisition values are compressed, using empty bits in native format (WaveBook/512 only)

postProcFormat-(DaqAdcPostProcFormatT)

Definition

Description

DappdfRaw

Post-acquisition data follows the rawFormat parameter --this is the default setting.

DappdfTenthsDegC

Data format is in tenths of a degree Celsius

Returns

DerrNoError

No

error

Function Usage

Raw Data Formats

The rawFormat parameter indicates how the raw data format will 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. The parameter
can also be set to DardfPacked, which compresses raw A/D values in order to make full use of all unused
bits in 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

).

Programmer’s Manual

908594

Daq API Command Reference 4.2-25