I8017H_Ad_Polling - ICP DAS USA MP-8 43 Series Function Reference

Hide thumbs Also See for MP-8 43 Series:
Table of Contents

Advertisement

2.5.7 I8017H_AD_POLLING

Description:
This function is used to get the analog input values of the specific channel
from an analog input module and convert the value in HEX format according to
the configuration of the slot, the gain and the data number.
Syntax:
int I8017H_AD_POLLING(int
Parameter:
slot :
[Input] Specified slot in the MP-8x43 system (Range: 1 to 7)
ch :
[Input] Specified channel for I-8017H(S) (Range: 0 to 7)
gain :
[Input] Input range:
datacount : [Input] Range from 1 to 8192, total ADCs number
*DataPtr :
[Output] The starting address of data array[ ] and the array size
must be equal to or bigger than the datacount.
Return Value:
0:
indicates success.
1:
indicates failure.
Example:
int
slot=1, ch=0, gain=0, count=10, data[10];
I8017H_AD_POLLING(slot, ch, gain, datacount, data);
//You gain ten record data values via channel 0 in the i-8017H module.
Remark:
This function can be applied on module: i8017H, i8017HS.
http://www.icpdas.com
++
[C
slot,
int
ch,
0:
+/- 10.0V,
1:
+/- 5.0V,
2:
+/- 2.5V,
3:
+/- 1.25V,
4:
+/- 20mA.
MP-8x43 Function Reference V 1.0
]
int
gain,
int
datacount,
int
*DataPtr)
51 

Advertisement

Table of Contents
loading

Table of Contents