xPCI-3009 API
PCI-3009 analog input sequence functions

Functions

_INT_ i_PCI3009_AnalogInputInitSequence (DWORD_ dw_BoardHandle, BYTE_ b_NbrOfChannels, PBYTE_ pb_ChannelList, BYTE_ b_ConvertTimeUnit, WORD_ w_ConvertTime, BYTE_ b_DelayMode, BYTE_ b_DelayTimeUnit, WORD_ w_DelayTime, DWORD_ dw_NumberOfSequence, BYTE_ b_UseDMA, DWORD_ dw_NumberOfSequenceForEachInterrupt)
 
_INT_ i_PCI3009_AnalogInputStartSequence (DWORD_ dw_BoardHandle)
 
_INT_ i_PCI3009_AnalogInputStopSequence (DWORD_ dw_BoardHandle)
 
_INT_ i_PCI3009_AnalogInputReleaseSequence (DWORD_ dw_BoardHandle)
 
_INT_ i_PCI3009_AnalogInputConvertDMADigitalToRealAnalogValues (DWORD_ dw_BoardHandle, PDWORD_ pdw_DigitalValue, DOUBLE *pd_AnalogValue)
 
_INT_ i_PCI3009_AnalogInputConvertDMADigitalToRealAnalogValuesNew (DWORD_ dw_BoardHandle, DWORD_ dw_Size, PWORD_ pw_DigitalValue, DOUBLE *pd_AnalogValue)
 

Detailed Description

Function Documentation

_INT_ i_PCI3009_AnalogInputInitSequence ( DWORD_  dw_BoardHandle,
BYTE_  b_NbrOfChannels,
PBYTE_  pb_ChannelList,
BYTE_  b_ConvertTimeUnit,
WORD_  w_ConvertTime,
BYTE_  b_DelayMode,
BYTE_  b_DelayTimeUnit,
WORD_  w_DelayTime,
DWORD_  dw_NumberOfSequence,
BYTE_  b_UseDMA,
DWORD_  dw_NumberOfSequenceForEachInterrupt 
)

Initialise an analog input sequence conversion

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_NbrOfChannels: Nbr of channels so setings (1 to 16)
[in]pb_ChannelList: Channel number list of the analog input to read
[in]b_ConvertTimeUnit: Convert time unit for the analog input:
  • PCI3009_MICRO_SECOND :micros
  • PCI3009_MILLI_SECOND :ms
[in]w_ConvertTime: Convert time value for the analog input conversion
  • PCI3009_MICRO_SECOND :(10 to 65535)
  • PCI3009_MILLI_SECOND :(1 to 65535)
[in]b_DelayMode: Delay mode for the analog input:
  • PCI3009_DISABLE: Delay no used
  • PCI3009_DELAY_MODE_1: Mode 1
  • PCI3009_DELAY_MODE_2: Mode 2
[in]b_DelayTimeUnit: Delay time unit for the analog input:
  • PCI3009_MICRO_SECOND :micros
  • PCI3009_MILLI_SECOND :ms
[in]w_DelayTime: Delay time value for the analog input conversion
[in]dw_NumberOfSequence: Define the number of sequence acquisitions
  • 0: continuous mode
  • <> 0: single mode
[in]b_UseDMA: ADDIDATA_ENABLE : Use DMA
ADDIDATA_DISABLE : Don't use DMA
[in]dw_NumberOfSequenceForEachInterrupt: Number of sequence to do before generating an interrupt (Only for DMA)
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Wrong channels number selection
-3: Wrong channel index 0 number
-4: Channel index 0 not initialised
-5: Wrong channel index 1 number
-6: Channel index 1 not initialised
-7: Wrong channel index 2 number
-8: Channel index 2 not initialised
-9: Wrong channel index 3 number
-10: Channel index 3 not initialised
-11: Wrong channel index 4 number
-12: Channel index 4 not initialised
-13: Wrong channel index 5 number
-14: Channel index 5 not initialised
-15: Wrong channel index 6 number
-16: Channel index 6 not initialised
-17: Wrong channel index 7 number
-18: Channel index 7 not initialised
-19: Wrong channel index 8 number
-20: Channel index 8 not initialised
-21: Wrong channel index 9 number
-22: Channel index 9 not initialised
-23: Wrong channel index 10 number
-24: Channel index 10 not initialised
-25: Wrong channel index 11 number
-26: Channel index 11 not initialised
-27: Wrong channel index 12 number
-28: Channel index 12 not initialised
-29: Wrong channel index 13 number
-30: Channel index 13 not initialised
-31: Wrong channel index 14 number
-32: Channel index 14 not initialised
-33: Wrong channel index 15 number
-34: Channel index 15 not initialised
-35: Wrong convert time unit
-36: Wrong convert time
-37: Wrong delay mode
-38: Wrong delay time unit
-39: Wrong delay time
-40: Wrong DMA mode
-41: Wrong number of sequence value for each interrupt
-42: Conversion is already started
-43: Scatter gather memory allocation error
-44: Scatter gather list descriptor creation error
_INT_ i_PCI3009_AnalogInputStartSequence ( DWORD_  dw_BoardHandle)

Start an analog input sequence conversion

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Sequence not initialised
-3: Interrupt routine not installed see function "i_PCI3009_SetBoardIntRoutine"
-4: A conversion is already started
-5: Description list setting error
-6: Enable DMA transfer error
-7: Start DMA transfer error
-8: Enable DMA transfer interrupt error
_INT_ i_PCI3009_AnalogInputStopSequence ( DWORD_  dw_BoardHandle)

Stop an analog input sequence conversion

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Sequence not started
-3: Disable the DMA transfer error
-4: Abort the DMA transfer error
-5: Stop the DMA transfer error
-6: Reset descriptor list error
_INT_ i_PCI3009_AnalogInputReleaseSequence ( DWORD_  dw_BoardHandle)

Release an analog input sequence conversion

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Sequence not initialised
-3: Sequence acquisition started
-4: Function call level error
_INT_ i_PCI3009_AnalogInputConvertDMADigitalToRealAnalogValues ( DWORD_  dw_BoardHandle,
PDWORD_  pdw_DigitalValue,
DOUBLE *  pd_AnalogValue 
)

Converts the sequence digital input value array (pdw_DigitalValue) into a real metric value (pd_MetricValue)

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]pdw_DigitalValue: Digital DMA value array
[out]pd_AnalogValue: Returns the real analog value array
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Sequence not initialised
-3: DMA not enabled
_INT_ i_PCI3009_AnalogInputConvertDMADigitalToRealAnalogValuesNew ( DWORD_  dw_BoardHandle,
DWORD_  dw_Size,
PWORD_  pw_DigitalValue,
DOUBLE *  pd_AnalogValue 
)

Converts the sequence digital input value array (pdw_DigitalValue) into a real metric value (pd_MetricValue)

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]dw_Size: Number of values in pw_DigitalValue
[in]pw_DigitalValue: Digital DMA value array
[out]pd_AnalogValue: Returns the real analog value array
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Sequence not initialised
-3: DMA not enabled