# ACalibrateData()

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

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function ACalibrateData(ByVal numPoints As Integer, ByVal range As MccDaq.Range, ByVal adData As Short()) As MccDaq.ErrorInfo

Public Function ACalibrateData(ByVal numPoints As Integer, ByVal range As MccDaq.Range, ByVal adData As System.UInt16()) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo ACalibrateData(int numPoints, MccDaq.Range range, short[] adData)

public MccDaq.ErrorInfo ACalibrateData(int numPoints, MccDaq.Range range, ushort[] adData)

##### Deprecated methods

The following methods are deprecated, and should only be used for legacy applications. The methods above are preferred, and must be used for 64-bit application development.

VB .NET

Public Function >ACalibrateData(ByVal numPoints As Integer, ByVal range As MccDaq.Range, ByRef adData As Short) As MccDaq.ErrorInfo

Public Function ACalibrateData(ByVal numPoints As Integer, ByVal range As MccDaq.Range, ByRef adData As System.UInt16) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo ACalibrateData(int numPoints, MccDaq.Range, ref ushort adData)

public MccDaq.ErrorInfo ACalibrateData(int numPoints, MccDaq.Range range, ref short adData)

## Parameters

numPoints

The 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

Reference to data array.

## Returns

- An ErrorInfo object that indicates the status of the operation.
- adData - Converted data

## Notes

- When collecting data using AInScan() with the NoCalibrateData option, use this method to calibrate the data after it is collected.
- The name of the array must match that used in AInScan() or WinBufToArray().
- 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, withhold calibration until after the acquisition run is complete. Turning off real-time software calibration saves CPU time during a high-speed acquisition run.
- Processor speed is a factor for DMA transfers and for real-time software calibration. Processors of less than 150 MHz Pentium class may impose speed limits below the capability of the board (refer to board-specific information.) If your processor is less than a 150 MHz Pentium, and you need an acquisition speed in excess of 200 kHz, use the NoCalibrateData option to a turn off real-time software calibration and save CPU time. After the acquisition is run, calibrate the data with ACalibrateData().