AI_ReadChannel Previous topicNext topicFirst topicLast topic

AI_ReadChannel

@ Description

This function performs a software triggered A/D conversion (analog input) on an analog input channel and returns the value converted.

@ Cards Support

9111, 9112, 9113, 9114, 9118, 9812/10

@ Syntax
 
I16 AI_ReadChannel (U16 CardNumber, U16 Channel, U16 AdRange, U16 *Value)

@ Parameter

CardNumber : The card id of the card that want to perform this operation.
Channel : Analog input channel number.
              Range: 0 through 15 for PCI-9112, PCI-9111, PCI-9118
              Range: 0 through 31 for PCI-9113, PCI-9114
              Range: 0 for PCI-9812/10
AdRange : The analog input range the specified channel is setting. Please refer to the Appendix B for the valid range values.
Value : The A/D converted value. The data format in Buffer is described as below:
           PCI-9113
            16-bit unsigned data:
            B15 ... B12 D11 D10 ... D1 D0
            where D11, D10, ... , D0 : A/D converted data
                      B15 ~ B12: dont care
           PCI-9114
            16-bit signed data:
            D15 D14 ... D1 D0
            where D15, D14, ... , D0 : A/D converted data
            For PCI-9111, PCI-9112, PCI-9118, and PCI-9812, please refer to the description of Buffer argument of
            AI_ContReadChannel() for the correct data format.

@ Return Code

NoError, ErrorInvalidCardNumber, ErrorCardNotRegistered, ErrorFuncNotSupport, ErrorInvalidIoChannel, ErrorInvalidAdRange