I8026W_Writeaohex - ICP DAS USA I-8026W Manual

Multifunction i/o module
Table of Contents

Advertisement

3.6. i8026W_WriteAOHex

This function is used to write the output value to a single specified Analog Output channel in
hexadecimal format.
Prototype
short i8026W_WriteAOHex(int slot, int ch, short gain, short hData);
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
hData: the Analog Output data in hexadecimal format
Return Values
0 = No Error
For other return values, see the Error Codes in Appendix A.
Example
[C]
int slot,ch,gain;
short hVal=0;
slot = 1;
gain = 0;
// "+/-10 V"
Open_Slot(slot);
for(ch=0;ch<2;ch++)
{
hVal =0x3fff;
i8026W_WriteAOHex( slot, ch, gain, hVal);
}
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-20

Advertisement

Table of Contents
loading

Table of Contents