# cbACalibrateData()

New R3.3

Calibrates the raw data collected by cbAInScan() from boards with real time software calibration when the real time calibration has been turned off. The cbAInScan() function can return either raw A/D data or calibrated data, depending on whether or not the NOCALIBRATEDATA option was used.

## Function Prototype

C/C++

int cbACalibrateData(int BoardNum, long NumPoints, int Range, unsigned ADData[ ])

Visual Basic

Function cbACalibrateData(ByVal BoardNum&, ByVal NumPoints&, ByVal Range&, ADData%) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

NumPoints

Number of samples to convert

Range

The programmable gain/range used when the data was collected. Refer to board specific information for a list of the supported A/D ranges of each board.

ADData

Pointer to data array.

## Returns

- Error code or 0 if no errors.
- ADData - converted data.

## Notes

- When collecting data using cbAInScan() with the NOCALIBRATEDATA option, use this function to calibrate the data once collected.
- The name of the array must match that used in cbAInScan() or cbWinBufToArray().
- Applying software calibration factors in real time on a per sample basis eats up machine cycles. If your CPU is slow, or if processing time is at a premium, do not calibrate until the acquisition run finishes. Turn off real time software calibration to save CPU time during high speed acquisitions by using the NOCALIBRATEDATA option to a turn off real-time software calibration. After the acquisition is run, calibrate the data with cbACalibrateData().