C/C++ Library
•
53
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()
{
int
ad_data;
int
ErrCode;
_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’.
Summary of Contents for NuDAQ ACL-8216
Page 1: ...N u D A Q ACL 8216 16 bit High Resolution Data Acquisition Card User s Guide...
Page 3: ......
Page 7: ......
Page 14: ...Installation 7 Figure 2 1 PCB Layout of the ACL 8216...
Page 17: ...10 Installation...
Page 27: ......
Page 45: ......
Page 55: ...48 C C Library...
Page 58: ...C C Library 51...
Page 62: ...C C Library 55 int count int ad_buffer unsigned int c1 unsigned int c2...
Page 65: ...58 C C Library...
Page 71: ......
Page 75: ......
Page 77: ......