xPCI-3009 API
PCI-3009 analog input single acquisition functions

Functions

_INT_ i_PCI3009_AnalogInputRead1Channel (DWORD_ dw_BoardHandle, BYTE_ b_Channel, BYTE_ b_ConvertTimeUnit, WORD_ w_ConvertTime, BYTE_ b_Interrupt, PDWORD_ pdw_DigitalValue)
 
_INT_ i_PCI3009_AnalogInputReadMoreChannels (DWORD_ dw_BoardHandle, BYTE_ b_NbrOfChannels, PBYTE_ pb_ChannelList, BYTE_ b_ConvertTimeUnit, WORD_ w_ConvertTime, BYTE_ b_Interrupt, PDWORD_ pdw_DigitalValue)
 

Detailed Description

Function Documentation

_INT_ i_PCI3009_AnalogInputRead1Channel ( DWORD_  dw_BoardHandle,
BYTE_  b_Channel,
BYTE_  b_ConvertTimeUnit,
WORD_  w_ConvertTime,
BYTE_  b_Interrupt,
PDWORD_  pdw_DigitalValue 
)

Starts the conversion of one analog input channel

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_Channel: Channel number of the input to be 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_Interrupt: Interrupt flag
  • PCI3009_DISABLE : Interrupt not used. pdw_DigitalValue return the digital value
  • PCI3009_ENABLE : Interrupt generated after conversion (EOC). pdw_DigitalValue is not used
[out]pdw_DigitalValue: Return the digital analog value if interrupt not used
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: Wrong channel number
-3: Channel not initialised
-4: Wrong convert time unit
-5: Wrong convert time
-6: Wrong interrupt flag
-7: Interrupt routine not installed see function "i_PCI3009_SetBoardIntRoutine"
-8: A conversion is already started
_INT_ i_PCI3009_AnalogInputReadMoreChannels ( DWORD_  dw_BoardHandle,
BYTE_  b_NbrOfChannels,
PBYTE_  pb_ChannelList,
BYTE_  b_ConvertTimeUnit,
WORD_  w_ConvertTime,
BYTE_  b_Interrupt,
PDWORD_  pdw_DigitalValue 
)

Starts the conversion of more analog input channels

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_Interrupt: Interrupt flag
  • PCI3009_DISABLE : Interrupt not used. pdw_DigitalValue return the digital value
  • PCI3009_ENABLE : Interrupt generated after conversion (EOC). pdw_DigitalValue is not used
[out]pdw_DigitalValue: Return the digital analog value if interrupt not used
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 interrupt flag
-38: Interrupt routine not installed see function "i_PCI3009_SetBoardIntRoutine"
-39: A conversion is already started