ADLINK PCM-9112+ User Manual

Page 75

Advertising
background image

C/C++ Library

67

@ Argument

card_number:

the card number of PCI-9112

auto_scan: TRUE or FALSE
Example1: auto_scan is FALSE, ad_ch_no is 3. Using DMA

mode to read A/D data only channel 3.

Example2: auto_scan is TRUE, ad_ch_no is 3. Using INT

mode to read A/D data with multi-channel , channel
3, 2, 1 and 0. Reading sequence is channel 3,2,1,0,
3,2,1,0,3,2,1,0....

ad_ch_no: A/D channel number
ad_range: A/D analog input range, please refer to the

section 4.3.8 for the possible values.

count: the number of A/D conversion
ad_buffer: the start address of the memory buffer to

store the AD data, the buffer size must large than
the number of AD conversion.

Under DOS environment, please make sure this memory
is double-word alignment. Every 16-bit unsigned
integer data in ad_buffer:

D11 D10 D9 .......................D1 D0 C3 C2 C1 C0

D11, D10, ..., D1, D0: A/D converted data
C3, C2, C1, C0: converted channel no.

c1:

the 16-bit timer frequency divider of timer channel
#1

c2:

the 16-bit timer frequency divider of timer channel
#2

@ Return Code

ERR_NoError, ERR_BoardNoInit

ERR_InvalidADChannel , ERR_AD_InvalidRange
ERR_InvalidTimerValue

@ Example

See Demo Program 'AD_DEMO2.C' , ‘AD_DEMO5.C’

Advertising