D-21, Daqcvtrawdataformat, Daqcvtsetadcrange – Measurement Computing WaveBook rev.3.0 User Manual
Page 217: Daqdefaulterrorhandler

WaveBook User’s Manual,
6-24-99
daqX API - Command Reference D-21
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);
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
Parameters
chanCount
The number of channels per scan in the raw data buffer
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqAdcSetDataFormat
Program References
None
Used With
All devices
Description
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.
daqCvtSetAdcRange
DLL Function
daqCvtSetAdcRange(FLOAT Admin, FLOAT Admax);
C
daqCvtSetAdcRange(FLOAT Admin, FLOAT Admax);
Visual BASIC
VBdaqCvtSetAdcRange&(ByVal ADmin!, ByVal ADmax!)
Delphi
daqCvtSetAdcRange(Admin:single; Admax:single)
Admin
A/D minimum voltage range
Parameters
Admax
A/D maximum voltage range
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
Program References
None
Used With
All devices
Description
daqCvtSetAdcRange
allows you to set the current ADC range for use by the daqCvt… functions. This function should not need to be
called if used for data collected by the Daq* devices.
daqDefaultErrorHandler
DLL Function
daqDefaultErrorHandler(DaqHandleT handle, DaqError errCode);
C
daqDefaultErrorHandler(DaqHandleT handle, DaqError errCode);
Visual BASIC
VBdaqDefaultErrorHandler(ByVal handle&, ByVal errCode&)
Delphi
daqDefaultErrorHandler(handle:DaqHandleT; errCode:DaqError)
handle
Handle to the device to which the default error handler is to be attached.
Parameters
ErrCode
The error code number of the detected error (see table API Error Codes at end of this chapter).
Returns
Nothing (see the API Error Codes table at the end of this chapter).
See Also
DaqGetLastError, daqProcessError, daqSetDefaultErrorHandler
Program References
None
Used With
All devices
Description
daqDefaultErrorHandler
displays an error message and then exits the application program. When the Daq* library is loaded, it
invokes the default error handler whenever it encounters an error. The error handler may be changed with daqSetErrorHandler.