I8026W_Writeao - ICP DAS USA I-8026W Manual

Multifunction i/o module
Table of Contents

Advertisement

3.5. i8026W_WriteAO

This function is used to write the output value to a single specified Analog Output channel in
floating point format.
Prototype
short i8026W_WriteAO(int slot, int ch, short gain, float fData);
Parameters
slot: specifies the slot number (1 ~ 8)
ch: specifies the Analog Output channel number (0 - 2)
gain: specifies the input type (0 - 4), where:
0: +/-10 V, 1: +/-5 V, 2: +/-2.5 V, 3: +/-1.25 V, 4: +/-20 mA
fData: the Analog Output data in floating point format
Return Values
0 = No Error
For other return values, see the Error Codes in Appendix A.
Example
[C]
int slot,ch,gain;
float fVal=0.0;
slot = 1;
gain = 0;
// "+/-10 V"
Open_Slot(slot);
for(ch=0;ch<2;ch++)
{
fVal = 5.0;
i8026W_WriteAO ( slot, ch, gain, fVal);
printf("\n[%02d]= [ %05.4f ]",ch,,fVal);
}
I-8026W API User Manual, v1.0.1, June 2015
Copyright © 2015 ICP DAS Co., Ltd. All Rights Reserved.
E-mail: service@icpdas.com
3-19

Advertisement

Table of Contents
loading

Table of Contents