Adlink ACL-8216 Manual de usuario Pagina 60

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 75
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 59
52
C/C++ Library
5.13 _8216_AD_Acquire
@ Description
This function will set the A/D mode as AD_MODE_1 (Software trigger,
Software polling), generate a software trigger to begin A/D conversion,
then poll the A/D conversion data. It reads the 16-bit A/D data until the
data is ready ('data ready' bit becomes low).
@ Syntax
int _8216_AD_Aquire( int *ad_data )
@ Argument
ad_data:
16-bit A/D converted value, the value
should within -32768 to 32767
@ Return Code
ERR_NoError
ERR_BoardNoInit
ERR_AD_AquireTimeOut
@ Example
#include “aclerr.h”
#include "8216.h"
main()
{
intad_data;
intErrCode;
_8216_Initial( CARD_1, 0x220 );
/* Assume NoError when Initialize ACL-8216 */
/* Set to software trigger at first*/
/* then trigger the AD */
/* wait for AD data ready then read it */
ErrCode = _8216_AD_Aquire( &ad_data );
if( ErrCode == ERR_NoError )
printf( "The AD value is %d.\n", ad_data );
else
printf( "AD conversion error happen\n" );
}
Also see demo program ‘AD_DEMO.C’.
Vista de pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 74 75

Comentarios a estos manuales

Sin comentarios