xPCI-3200 API
|
Functions | |
_INT_ | i_PCI3200_InitScanModuleAcquisitionSensor (HANDLE h_DeviceHandle, BYTE b_ModuleIndex, BYTE b_SensorType, BYTE b_SensorModel[4], BYTE b_ConnectionType, DOUBLE d_RtdResistance[2]) |
_INT_ | i_PCI3200_InitScanModuleAcquisition (HANDLE h_DeviceHandle, BYTE b_ModuleIndex, DWORD dw_ConversionFrequency, BYTE b_DelayMode, DWORD dw_DelayTime, BYTE b_DelayUnit, BYTE b_AcquisitionMode, BYTE b_ExtTriggerMode) |
_INT_ | i_PCI3200_StartScanModuleAcquisition (HANDLE h_DeviceHandle, BYTE b_ModuleIndex) |
_INT_ | i_PCI3200_StopScanModuleAcquisition (HANDLE h_DeviceHandle, BYTE b_ModuleIndex) |
_INT_ | i_PCI3200_ReleaseScanModuleAcquisition (HANDLE h_DeviceHandle, UCHAR b_ModuleIndex) |
_INT_ i_PCI3200_InitScanModuleAcquisitionSensor | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModuleIndex, | ||
BYTE | b_SensorType, | ||
BYTE | b_SensorModel[4], | ||
BYTE | b_ConnectionType, | ||
DOUBLE | d_RtdResistance[2] | ||
) |
Initialize the sensor connected to a analog-input module of the board.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleIndex | Index of the module (0-3) |
[in] | b_SensorType | The type of the sensor connected (ADDIDATA_THERMOCOUPLE for TC sensors, ADDIDATA_RTD for RTD sensors) |
[in] | b_SensorModel | A array that contains the model of the sensors that are connected. If b_SensorType is ADDIDATA_THERMOCOUPLE :
|
[in] | b_ConnectionType | The type of the connection that is used (APCI3200_CONNECTION_TYPE_SINGLE for single-ended, and APCI3200_CONNECTION_TYPE_DIFFERENTIAL for differential) If b_SensorType is RTD, b_ConnectionType must be set to APCI3200_CONNECTION_TYPE_DIFFERENTIAL |
[in] | d_RtdResistance | A array that contains the resistance R0 of the RTD sensors. Only fill this array if you use RTD sensors. R0 is the resistance of your sensor for a temperature of 0 Celcius |
0 | : No error |
-1 | : The h_DeviceHandle parameter is wrong |
-2 | : The b_ModuleIndex parameter is wrong |
-3 | : The b_SensorType parameter is wrong |
-4 | : The b_ConnectionType parameter is wrong |
-5 | : One of the sensor model in b_SensorModel is wrong (not in the TC sensors model list) |
-6 | : b_SensorType is set to ADDIDATA_RTD, but the connection type is not set to APCI3200_CONNECTION_TYPE_DIFFERENTIAL |
-7 | : One of the sensor model in b_SensorModel is wrong (not in the RTD sensors model list) |
-8 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3200_InitScanModuleAcquisition | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModuleIndex, | ||
DWORD | dw_ConversionFrequency, | ||
BYTE | b_DelayMode, | ||
DWORD | dw_DelayTime, | ||
BYTE | b_DelayUnit, | ||
BYTE | b_AcquisitionMode, | ||
BYTE | b_ExtTriggerMode | ||
) |
Initialize the selected analog-input module for a scan acquisition. Before calling this function, you must call i_PCI3200_InitScanModuleAcquisitionSensor function.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleIndex | Index of the module (0-3) |
[in] | dw_ConversionFrequency | The frequency of conversion (20Hz, 40Hz, 80Hz or 160Hz) |
[in] | b_DelayMode | Specify if you want to use a delay (APCI3200_DELAY_NOT_USED or APCI3200_DELAY_MODE1_USED) |
[in] | dw_DelayTime | The delay time value. It is the time between two scan acquisition (the acquisition time is included). (0-1023) |
[in] | b_DelayUnit | The unit of dw_DelayTime (APCI3200_UNIT_MS or APCI3200_UNIT_S) |
[in] | b_AcquisitionMode | Specify if you want to use continuous acquisition or not (APCI3200_SINGLE_SCAN or APCI3200_CONTINUOUS_SCAN) |
[in] | b_ExtTriggerMode | Specify if you want to use an external trigger (digital input) or not.
|
0 | : No error |
-1 | : The h_DeviceHandle parameter is wrong |
-2 | : The b_ModuleIndex parameter is wrong |
-3 | : The dw_ConversionFrequency parameter is wrong |
-4 | : The b_DelayMode parameter is wrong |
-5 | : The b_DelayUnit parameter is wrong |
-6 | : The dw_DelayTime parameter is wrong |
-7 | : The b_AcquisitionMode parameter is wrong |
-8 | : The b_ExtTriggerMode parameter is wrong |
-9 | : The sensors of the module were not initialized. Call i_PCI3200_InitScanModuleAcquisitionSensor before calling this function |
-10 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3200_StartScanModuleAcquisition | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModuleIndex | ||
) |
Start a scan acquisition on the selected analog-input module.
Once the acquisition is started, you will receive the values measured by the board with your interrupt routine callback. Before calling this function, you must call the function i_PCI3200_InitScanModuleAcquisition. You must also install an interrupt routine.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleIndex | Index of the module (0-3) |
0 | : No error |
-1 | : The h_DeviceHandle parameter is wrong |
-2 | : The b_ModuleIndex parameter is wrong |
-3 | : No interrupt routine installed. Call the function i_PCI3200_SetBoardIntRoutine before calling this function |
-4 | : The module was not initialized. Call the function i_PCI3200_InitScanModuleAcquisition before calling this function |
-5 | : A scan acquisition is still started on this module. Stop it before trying to start it. |
-6 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3200_StopScanModuleAcquisition | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModuleIndex | ||
) |
Stop a scan acquisition on the selected analog-input module.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleIndex | Index of the module (0-3) |
0 | : No error |
-1 | The h_DeviceHandle parameter is wrong |
-2 | The b_ModuleIndex parameter is wrong |
-3 | Error while calling IOCTL function (wrong handle ?) |
-4 | The module is not initialized for scan |
-5 | The scan is not started on this module |
-6 | Failed to stop scan on this module |
_INT_ i_PCI3200_ReleaseScanModuleAcquisition | ( | HANDLE | h_DeviceHandle, |
UCHAR | b_ModuleIndex | ||
) |
Reset scan on the selected module
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleIndex | Index of the module (0 to numberOfModules) |
0 | : No error |
-1 | The h_DeviceHandle parameter is wrong |
-2 | the b_ModuleIndex parameter is wrong |
-3 | the scan is started on this module call i_PCI3200_StopScanModuleAcquisition before. |
-4 | Error while calling IOCTL function (wrong handle ?) |