|
APCIE-3660 API
1719
|
Functions | |
| int | i_APCIE3660_SetUserCalibrationValue (uint8_t boardId, uint8_t moduleIndex, uint32_t calibrationGain, uint32_t calibrationOffset) |
| int | i_APCIE3660_SetCalibrationValues (uint8_t boardId, uint8_t moduleMask, uint8_t gainValues) |
| int | i_APCIE3660_InitAnalogInputModule (uint8_t boardId, uint8_t moduleIndex, uint8_t singleDiffMode, uint8_t coupling, uint8_t enableCurrentSource, uint8_t gainSelection, uint8_t dataRate) |
| int | i_APCIE3660_Read1AnalogInputModule (uint8_t boardId, uint8_t moduleIndex, uint32_t *value) |
| int | i_APCIE3660_ReleaseAnalogInputModule (uint8_t boardId, uint8_t moduleIndex) |
| int | i_APCIE3660_InitAnalogInputModuleCyclicAcquisition (uint8_t boardId, uint8_t moduleIndex, uint8_t mode, uint32_t onBoardBufferSize, uint32_t compareValue) |
| int | i_APCIE3660_TriggerAnalogInputModuleCyclicAcquisition (uint8_t boardId, uint8_t moduleIndex) |
| int | i_APCIE3660_StartAnalogInputModuleCyclicAcquisition (uint8_t boardId, uint8_t moduleIndex) |
| int | i_APCIE3660_StartMultipleAnalogInputModuleCyclicAcquisition (uint8_t boardId, uint8_t moduleMask) |
| int | i_APCIE3660_StopAnalogInputModuleCyclicAcquisition (uint8_t boardId, uint8_t moduleIndex) |
| int | i_APCIE3660_ReleaseAnalogInputModuleCyclicAcquisition (uint8_t boardId, uint8_t moduleIndex) |
| int i_APCIE3660_SetUserCalibrationValue | ( | uint8_t | boardId, |
| uint8_t | moduleIndex, | ||
| uint32_t | calibrationGain, | ||
| uint32_t | calibrationOffset | ||
| ) |
Sets the calibration value
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| [in] | calibrationGain | Gain value determine by calibration for each channel (calibration values are stored in file apcie3660_calibration.conf is stored in /etc/APCIE3660) |
| [in] | calibrationOffset | Gain value determine by calibration for each channel (calibration file apcie3660_calibration.conf is stored in /etc/APCIE3660) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex parameter is wrong |
| -3 | Error with calibration selection |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_SetCalibrationValues | ( | uint8_t | boardId, |
| uint8_t | moduleMask, | ||
| uint8_t | gainValues | ||
| ) |
Sets the calibration value (calibration values are loaded from file apcie3660_calibration.conf in /etc/APCIE3660).
Structure of file apcie3660_calibration.conf :
| [in] | boardId | Target board index |
| [in] | moduleMask | Mask of the analog input module to configure (0 to 15) |
| [in] | gainValues | gain value of the analog input module to configure (0 to 15)(bit 0 : gain Module 0 ...) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleMask parameter is wrong |
| -3 | The gainMask parameter is wrong |
| -4 | The gainMask parameter is wrong |
| -13 | Error with calibration selection module 0 (error from SetUserCalibrationValue) |
| -14 | Error with calibration selection module 1 (error from SetUserCalibrationValue) |
| -15 | Error with calibration selection module 2 (error from SetUserCalibrationValue) |
| -16 | Error with calibration selection module 3 (error from SetUserCalibrationValue) |
| -24 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_InitAnalogInputModule | ( | uint8_t | boardId, |
| uint8_t | moduleIndex, | ||
| uint8_t | singleDiffMode, | ||
| uint8_t | coupling, | ||
| uint8_t | enableCurrentSource, | ||
| uint8_t | gainSelection, | ||
| uint8_t | dataRate | ||
| ) |
Initializes the analog input module moduleIndex
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| [in] | singleDiffMode | Single-Ended / Differential mode of each channel
|
| [in] | coupling | Coupling mode (AC / DC) of each channels
|
| [in] | enableCurrentSource | Enable / Disable the current source for each channel
|
| [in] | gainSelection | Gain selection
|
| [in] | dataRate | Acquisition frequency, depends on digitalFilter and filterPath parameter:
|
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The b_ModuleIndex parameter is wrong |
| -3 | Module is already initialized. |
| -4 | Wrong Single/Diff Mode selection |
| -5 | Wrong coupling selection |
| -6 | Wrong gain selection |
| -7 | Wrong Current source flag |
| -8 | When the current source is used, the configuration of the channel must be Single-Ended and AC |
| -9 | Wrong filterPath parameter |
| -10 | Wrong digitalFilter parameter |
| -11 | Wrong dataRate parameter |
| -12 | Wrong dataRate parameter due to filterPath and digitalFilter configuration |
| -13 | Wrong filterPath and digitalFilter configuration, both parameter cannot be 0 |
| -14 | An error occurred while calling the IOCTL function |
| Data Rate | Sampling frequency |
|---|---|
| 0 | 0.125 |
| 1 | 0.250 |
| 2 | 0.5 |
| 3 | 1 |
| 4 | 2 |
| 5 | 4 |
| int i_APCIE3660_Read1AnalogInputModule | ( | uint8_t | boardId, |
| uint8_t | moduleIndex, | ||
| uint32_t * | value | ||
| ) |
Read one analog input module
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| [out] | value | Value of the analog input channel |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The ModuleIndex parameter is wrong |
| -3 | Module is not initialized. |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_ReleaseAnalogInputModule | ( | uint8_t | boardId, |
| uint8_t | moduleIndex | ||
| ) |
Release the analog input module moduleIndex
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex is wrong |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_InitAnalogInputModuleCyclicAcquisition | ( | uint8_t | boardId, |
| uint8_t | moduleIndex, | ||
| uint8_t | mode, | ||
| uint32_t | onBoardBufferSize, | ||
| uint32_t | compareValue | ||
| ) |
Init analog input module cyclic acquisition
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| [in] | mode | In both modes, when the compare value is reached, an interrupt occurs to read the value from the buffer.
|
| [in] | onBoardBufferSize | Board buffer size, the size of this buffer is 1024 * (2^dw_OnBoardBufferSize). |
| [in] | compareValue | Define the number of acquisition to have in the board buffer to generate an interrupt to start the DMA transfer (must be < (1024 * (2^dw_OnBoardBufferSize)). |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex parameter is wrong |
| -3 | Wrong mode selection |
| -4 | The module is not initialized |
| -5 | The compare value parameter is wrong, must be < (2^dw_OnBoardBufferSize) * 1024) |
| -6 | The cyclic acquisition is already initialized |
| -7 | Not enough place in the on board RAM |
| -8 | The onBoardBufferSize parameter is wrong (bigger than the board RAM size) |
| -9 | The calibration is running on the module |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_TriggerAnalogInputModuleCyclicAcquisition | ( | uint8_t | boardId, |
| uint8_t | moduleIndex | ||
| ) |
Trigger analog input module cyclic acquisition
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex is wrong |
| -3 | The cyclic acquisition is initialized |
| -4 | The cyclic acquisition is already started |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_StartAnalogInputModuleCyclicAcquisition | ( | uint8_t | boardId, |
| uint8_t | moduleIndex | ||
| ) |
Start analog input module cyclic acquisition
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex is wrong |
| -3 | The cyclic acquisition has not been initialized |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_StartMultipleAnalogInputModuleCyclicAcquisition | ( | uint8_t | boardId, |
| uint8_t | moduleMask | ||
| ) |
Start analog input module cyclic acquisition
| [in] | boardId | Target board index |
| [in] | moduleMask | mask of the index of the analog input module(s) to start (0 to 15)(0x0 to 0xF: 0x1 = module1, 0x2 = module2, 0x3 = module1 and module2,...) |
| 0 | No error |
| -2 | The moduleIndex parameter is wrong |
| -3 | The cyclic acquisition is not initialized or not by this process |
| -4 | An acquisition is already started on one of the module in mask |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_StopAnalogInputModuleCyclicAcquisition | ( | uint8_t | boardId, |
| uint8_t | moduleIndex | ||
| ) |
Stop analog input module cyclic acquisition
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module (0 to 3) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex is wrong |
| -14 | An error occurred while calling the IOCTL function |
| int i_APCIE3660_ReleaseAnalogInputModuleCyclicAcquisition | ( | uint8_t | boardId, |
| uint8_t | moduleIndex | ||
| ) |
Release analog input module cyclic acquisition
| [in] | boardId | Target board index |
| [in] | moduleIndex | Index of the analog input module to release (0 to 3) |
| 0 | No error |
| -1 | The boardId is wrong |
| -2 | The moduleIndex is wrong |
| -14 | An error occurred while calling the IOCTL function |