niFgen_ReadCalADC
ViStatus niFgen_ReadCalADC (ViSession vi, ViInt32 numberofReadstoAverage, ViBoolean returnCalibratedValue, ViReal64* calADCValue);
Purpose
Takes one or more voltage measurements from the onboard calibration ADC and returns the value or the average value. The signal that the ADC actually measures can be specified using the NIFGEN_ATTR_CAL_ADC_INPUT attribute. The ADC has some inherent gain and offset. These values can be determined during an external calibration session and stored in the calibration EEPROM.
If the returnCalibratedValue parameter is VI_TRUE, NI-FGEN adjusts the value that is returned to account for the gain and offset of the ADC. Otherwise, the raw voltage value reported by the ADC is returned.
Parameters
Input | ||
Name | Type | Description |
vi | ViSession | Identifies your instrument session. vi is obtained from the niFgen_init or the niFgen_InitExtCal function and identifies a particular instrument session. |
numberofReadstoAverage | ViInt32 | Specifies the number of measurements to be taken and averaged to determine the return value. |
returnCalibratedValue | ViBoolean | Specifies whether the voltage returned from the ADC should be adjusted to account for the gain and offset of the ADC. |
Output | ||
Name | Type | Description |
calADCValue | ViReal64* | Specifies the average of the voltage measurements taken from the onboard calibration ADC. |
Return Value
Name | Type | Description | ||||||||
Status | ViStatus | Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You can examine the status code from each call to an NI-FGEN function to determine if an error occurred.
To obtain a text description of the status code, call the niFgen_error_message function. To obtain additional information about the error condition, call the niFgen_GetError function. To clear the error information from NI-FGEN, call the niFgen_ClearError function. The general meaning of the status code is as follows:
|