ADLINK ACL-8216 User Manual
Page 56

48 • C/C++ Library
5.9 _8216_AD_Set_Channel
@ Description
This function is used to set AD channel by means of writing data to the
channel multiplexer register. There are 16 single-ended A/D channels
in ACL-8216, so the channel number should be set between 0 to 15
only. The initial state is channel 0 which is a default setting by the
ACL-8216 hardware configuration.
@ Syntax
int _8216_AD_Set_Channel( int ad_ch_no )
@ Argument
ad_ch_no:
channel number to perform AD
conversion
Single-ended mode: Channel no. is from
0~15
Differential mode: Channel no. is from
0~7
@ Return Code
ERR_NoError
ERR_BoardNoInit
ERR_InvalidADChannel
@ Example
#include “aclerr.h”
#include "8216.h"
main()
{
_8216_Initial( CARD_1, 0x220 );
/* Assume NoError when Initialize ACL-8216 */
_8216_AD_Set_Channel( 3 );
printf( "AD channel 3 is now selected.\n" );
/* the following A/D's operation is based on channel
3 */
}