beautypg.com

ADLINK ACL-8111 User Manual

Page 47

background image

C/C++ Library for DOS 41

5.8 _8111_AD_Set_Channel

@ Description

This function is used to set AD channel by means of writing data to the
multiplexer scan channel register. There are 8 single-ended A/D channels
in ACL-8111, so the channel number should be set between 0 to 7 only.
The initial state is channel 0 which is a default setting by the ACL-8111
hardware configuration.

@ Syntax

int _8111_AD_Set_Channel( int ad_ch_no )

@ Argument:

ad_ch_no: channel number to perform AD conversion

@ Return Code:

ERR_NoError
ERR_BoardNoInit
ERR_InvalidADChannel

@ Example:

#include “aclerr.h”
#include “8111.h”

main()
{


_8111_Initial( CARD_1, 0x220 );

/* Assume NoError when Initialize ACL-8111
*/


_8111_AD_Set_Channel( 3 );

printf( "AD channel 3 is now selected.\n" );


...

/* the following A/D's operation is based on channel

3 */


}