uSyntax

Visual C++ (Window s-95)

int W_9112_AD_Set_Mode (int card_number, int ad_mode)

Visual Basic (Windows-95)

W_9112_AD_Set_Mode (ByVal card_number As Long, ByVal ad_mode As Long) As Long

C/C++ ( DOS)

int _9112_AD_Set_Mode (int card_number, int ad_mode )

uArgument

card_number : the card number of PCI-9112

ad_mode : AD trigger and data transfer mode

( please refer to above table.)

uReturn Code

ERR_NoError

ERR_BoardNoInit ERR_InvalidMode

uExample

#include “9112.h” main()

{

Int baseAddr, irqNo;

_9112_Initial( CARD_1, &baseAddr, &irqNo);

/* Assume NoError when Initialize PCI-9112 */

_9112_AD_Set_Range(CARD_1, AD_B_5_V );

printf( "The A/D analog input range is +/- 5V \n" );

_9112_AD_Set_Mode(CARD_1, AD_MODE_4 );

printf( "Now, The Internal Timer Pacer trigger is set \n" );

/* All A/D conversion will be trigger by internal timer pacer, and the converted data should be transfered in the interrupt service routine. ( ISR). */

}

5.11 _9112_AD_Set_Autoscan

uDescription

This function is used to set automatic hardware channel scan to be enable or disable. If the PCI-9112 is set as enable mode, then the A/D channel can be converted automatically, that is, the hardware will automatically decrement until channel 0. Then, it will go back to channel which is set by _9112_AD_Set_Channle and wrap back to zero again. For example, the channel is set as 4, the A/D conversion sequence will be

48 C/C++ Library