beautypg.com

Daqclose, Daqcvtrawdataformat – Measurement Computing TempBook rev.3.0 User Manual

Page 144

background image

11-20 daqCommand Reference (Enhanced API)

TempBook User’s Manual

daqClose

DLL Function

daqClose(DaqHandleT handle);

C

daqClose(DaqHandleT handle);

Visual BASIC

VBdaqClose&(ByVal handle&)

Delphi

daqClose(handle:DaqHandleT)

Parameters

handle

Handle to the device to be closed

Returns

DerrNoError

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

See Also

daqOpen

Program References

ADCEX1.C, DACEX1.C, DIGEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS, ERREX.PAS (Delphi)

Used With

All devices

daqClose

is used to close a Daq* device. Once the specified device has been closed, no

subsequent communication with the device can be performed. In order to re-establish
communications with a closed device, the device must be re-opened with the daqOpen function.

daqCvtRawDataFormat

DLL Function

daqCvtRawDataFormat(PWORD buf

,

DaqAdcCvtAction

action, DWORD lastRetCount, DWORD

scanCount, DWORD chanCount);

C

daqCvtRawDataFormat(PWORD buf

,

DaqAdcCvtAction

action, DWORD lastRetCount, DWORD

scanCount, DWORD chanCount);

Visual BASIC

VBdaqCvtRawDataFormat&(buf%, ByVal action&, ByVal lastRetCount&,ByVal

scanCount&, ByVal chanCount&)

Delphi

daqCvtRawDataFormat(PWORD buf, action:DaqAdcCvtAction; lastRetCount:DWORD

;

scanCount:DWORD: chanCount:DWORD);

Parameters

buf

Pointer to the buffer containing the raw data

action

The type of conversion action to perform on the raw data

lastRetCount

The last retCount returned from

daqAdcTransferGetStat

scanCount

The length of the raw data buffer in scans

chanCount

The number of channels per scan in the raw data buffer

Returns

DerrNoError

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

See Also

daqAdcSetDataFormat

Program References

None

Used With

All devices

daqCvtRawDataFormat

allows the conversion of raw data to a specified format. This function

should be called after the raw data has been acquired. See the transfer data functions
(daqAdcTransfer…) for more details on the actual collection of raw data.

The buf parameter specifies the pointer to the data buffer containing the raw data. Prior to calling
this function, this user-allocated buffer should already contain the entire raw data transfer. Upon
completion, this data buffer will contain the converted data (the buffer must be able to contain all the
converted data).

The action parameter specifies the type of conversion to perform. The DacaUnpack value can
be used de-compress raw data. The DacaRotate can be used to reformat a circular buffer into a
linear buffer.

The scanCount parameter specifies the length of the raw buffer in scans. Since the converted data
will overwrite the raw data in the buffer, make sure the specified buffer is large enough, physically,
to contain all of the converted data.

The chanCount parameter specifies the number of channels in each scan.