xPCI-3001 API
|
Functions | |
_INT_ | i_PCI3001_Read1AnalogInput (BYTE_ b_BoardHandle, BYTE_ b_Channel, BYTE_ b_Gain, BYTE_ b_Polarity, UINT_ ui_ConvertTiming, BYTE_ b_InterruptFlag, PUINT_ pui_AnalogInputValue) |
_INT_ | i_PCI3001_ReadMoreAnalogInput (BYTE_ b_BoardHandle, BYTE_ b_SequenzArraySize, PBYTE_ pb_ChannelArray, PBYTE_ pb_GainArray, PBYTE_ pb_PolarityArray, UINT_ ui_ConvertTiming, BYTE_ b_InterruptFlag, PUINT_ pui_AnalogInputValueArray) |
_INT_ | i_PCI3001_InitAnalogInputAcquisition (BYTE_ b_BoardHandle, BYTE_ b_SequenzArraySize, unsigned char *pb_ChannelArray, unsigned char *pb_GainArray, unsigned char *pb_PolarityArray, BYTE_ b_AcquisitionMode, BYTE_ b_ExternTrigger, UINT_ ui_AcquisitionTiming, LONG_ l_DelayTiming, ULONG_ ul_NumberOfAcquisition, BYTE_ b_DMAMode, BYTE_ b_AcquisitionCycle) |
_INT_ | i_PCI3001_StartAnalogInputAcquisition (BYTE_ b_BoardHandle) |
_INT_ | i_PCI3001_StopAnalogInputAcquisition (BYTE_ b_BoardHandle) |
_INT_ | i_PCI3001_ClearAnalogInputAcquisition (BYTE_ b_BoardHandle) |
_INT_ i_PCI3001_Read1AnalogInput | ( | BYTE_ | b_BoardHandle, |
BYTE_ | b_Channel, | ||
BYTE_ | b_Gain, | ||
BYTE_ | b_Polarity, | ||
UINT_ | ui_ConvertTiming, | ||
BYTE_ | b_InterruptFlag, | ||
PUINT_ | pui_AnalogInputValue | ||
) |
Reads the current value of the analog input b_Channel with a gain b_Gain, an input voltage range of b_Polarity and a conversion time of ui_ConvertTiming
[in] | b_BoardHandle | : Handle of the board PCI3001 |
[in] | b_Channel | : Number of the analog input to be read (0 to 15) |
[in] | b_Gain | : Gain selection (PCI3001_1_GAIN, PCI3001_2_GAIN, PCI3001_5_GAIN, PCI3001_10_GAIN) |
[in] | b_Polarity | : Selection of the input voltage range of the analog input to convert (PCI3001_UNIPOLAR, PCI3001_BIPOLAR) |
[in] | ui_ConvertTiming | : Selection of the conversion time from 10 to 32767 |
[in] | b_InterruptFlag | : PCI3001_ENABLE : An interrupt is generated at the end of conversion PCI3001_DISABLE: No interrupt is generated at the end of the conversion. The analog value is in the parameter pui_AnalogInputValue. |
[in] | pui_AnalogInputValue | : The analog value is returned (0 to 0x0FFF) (12 bits) |
_INT_ i_PCI3001_ReadMoreAnalogInput | ( | BYTE_ | b_BoardHandle, |
BYTE_ | b_SequenzArraySize, | ||
PBYTE_ | pb_ChannelArray, | ||
PBYTE_ | pb_GainArray, | ||
PBYTE_ | pb_PolarityArray, | ||
UINT_ | ui_ConvertTiming, | ||
BYTE_ | b_InterruptFlag, | ||
PUINT_ | pui_AnalogInputValueArray | ||
) |
Reads several analog inputs. The priority of the analog inputs is set with the scan list. The scan list allows to determine the input voltage range and the gain for each analog input. The gain is defined with parameter pb_Gain for each analog input. The input voltage range is defined with parameter pb_PolarityArray for each analog input.
[in] | b_BoardHandle | : Handle of the board PCI3001 |
[in] | b_SequenzArraySize | : Size of the scan lists(1 up to 16 elements) |
[in] | pb_ChannelArray | : Scan list for the analog inputs. |
[in] | pb_GainArray | : Scan list for gain |
[in] | pb_PolarityArray | : Scan list for the input voltage range |
[in] | ui_ConvertTiming | : Selection of the conversion time From 10 μs up to 32767 μs. |
[in] | b_InterruptFlag | : PCI3001_ENABLE: An interrupt is generated when the last conversion of the channel group is completed (EOS). See function "i_PCI3001_SetBoardIntRoutine". PCI3001_DISABLE: No interrupt is generated at the end of conversion. The analog values are located in parameter pui_AnalogInputValueArray. |
[out] | pui_AnalogInputValueArray | : Input values are returned. |
_INT_ i_PCI3001_InitAnalogInputAcquisition | ( | BYTE_ | b_BoardHandle, |
BYTE_ | b_SequenzArraySize, | ||
unsigned char * | pb_ChannelArray, | ||
unsigned char * | pb_GainArray, | ||
unsigned char * | pb_PolarityArray, | ||
BYTE_ | b_AcquisitionMode, | ||
BYTE_ | b_ExternTrigger, | ||
UINT_ | ui_AcquisitionTiming, | ||
LONG_ | l_DelayTiming, | ||
ULONG_ | ul_NumberOfAcquisition, | ||
BYTE_ | b_DMAMode, | ||
BYTE_ | b_AcquisitionCycle | ||
) |
This function initialises a cyclic conversion. The priority of the analog inputs is set through the scan list. The scan list allows to set the input voltage range and the gain for each analog input. See example 1 (pdf documentation of the old driver). The DMA option (PCI3001_DMA_USED) allows to acquire in the background analog values at high frequencies. An interrupt is generated at the end of conversion. A "2" is passed through the parameter b_InterruptMask in your interrupt routine. The DMA buffer is returned through the parameter pui_AnalogInputValue. See function "i_PCI3001_SetBoardIntRoutineXX". You have to:
[in] | b_BoardHandle | : Handle of the board PCI3001 |
[in] | b_SequenzArraySize | : Size of the scan lists(1 up to 16 elements) |
[in] | pb_ChannelArray | : Scan list for the analog inputs. |
[in] | pb_GainArray | : Scan list for gain |
[in] | pb_PolarityArray | : Scan list for the input voltage range |
[in] | b_AcquisitionMode | : Two conversion cycles are possible:
|
[in] | b_ExternTrigger | Two modes are possible :
|
[in] | ui_AcquisitionTiming | Time interval in μs between 2 conversions of successive inputs. (10 μs to 32767 μs) See example 1 and 2 (See pdf documentation old driver) |
[in] | l_DelayTiming | : Waiting time in μs between two conversion cycles (from 100 μs to 3276750 μs) This parameter is relevant only if you use PCI3001_DELAY_MODUS or PCI3001_DELAY_1_MODUS. |
[in] | ul_NumberOfAcquisition | : If you use DMA, this parameter determines how many conversions have to be performed. DOS: 1 to 32767 Win32: 1 to 232 If you do not use DMA, this parameter determines how many acquisition cycles must be performed. Warning: if you work in DMA_CONTINUOUS with an acquisition time of 10 μs and under VB 5.0 the minimum value is 16. |
[in] | b_DMAMode | : Determines if DMA should be used or not.
|
[in] | b_AcquisitionCycle | : Determines the type of DMA conversion.
|
_INT_ i_PCI3001_StartAnalogInputAcquisition | ( | BYTE_ | b_BoardHandle | ) |
Starts the cyclic conversion. It has been previously initialised with function "i_PCI3001_InitAnalogInputAcquisition".
[in] | b_BoardHandle | : Handle of the board PCI3001 |
_INT_ i_PCI3001_StopAnalogInputAcquisition | ( | BYTE_ | b_BoardHandle | ) |
Stops the cyclic conversion. It has been started previously with function "i_PCI3001_StartAnalogInputAcquisition"
[in] | b_BoardHandle | : Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-101 | : i_PCI3001_StopAnalogAcquisition returned an error. |
_INT_ i_PCI3001_ClearAnalogInputAcquisition | ( | BYTE_ | b_BoardHandle | ) |
Deinstalls the DMA buffer
[in] | b_BoardHandle | : Handle of the board |
0 | : No Error |
-1 | : The handle parameter of the board is wrong |
-2 | : The cyclic conversion has not been initialized. |