//Get the AIN1 voltage.
GetNextResult (lngHandle, 0, 0, &dblValue, 0, 0);
, 0, 0);
utputs
he IOType to set the voltage on an analog output is:
AC1:
used with the get/put config IOTypes, to configure a
_chDAC_BINARY
to 2.5 volts:
d digital I/O information:
_ioGET_DIGITAL_BIT //Also sets direction to input.
_ioGET_DIGITAL_PORT //Also sets directions to input. x1 is number of bits.
//x1 is number of bits.
T_STATE //x1 is number of bits.
.
x1 is number of bits.
l parameter is used to specify
ameter. That means that if two (or
different x1, the result
undefined. The GetFirstResult/GetNextResult commands do
sponses from multiple port requests
//Get the AIN1 voltage (special 0-3.6 volt range).
etNextResult (lngHandle, 0, 0, &dblValue
G
4.3.4 Analog O
T
J_ioPUT_DAC L
The following are IOTypes used to write/read the enable bit for D
LJ_ioPUT_DAC_ENABLE
J_ioGET_DAC_ENABLE
L
The following is a special channel,
parameter that applies to all DACs:
LJ
Following is example pseudocode to set DAC0
//Set DAC0 to 2.5 volts.
ePut (lngHandle, LJ_ioPUT_DAC, 0, 2.50, 0);
4.3.5 Digital I/O
There are eight IOTypes used to write or rea
LJ
LJ_ioGET_DIGITAL_BIT_DIR
LJ_ioGET_DIGITAL_BIT_STATE
LJ
LJ_ioGET_DIGITAL_PORT_DIR
LJ_ioGET_DIGITAL_POR
LJ_ioPUT_DIGITAL_BIT //Also sets direction to output
LJ_ioPUT_DIGITAL_PORT //Also sets directions to output.
When a request is done with one of the port IOTypes, the Channe
the starting bit number, and the x1 parameter is used to specify the number of applicable bits.
The bit numbers corresponding to different I/O are:
0-7 FIO0-FIO7
8-15 EIO0-EIO7
16-19 CIO0-CIO3
Note that the GetResult function does not have an x1 par
ore) port requests are added with the same IOType and Channel, but
m
retrieved by GetResult would be
have the x1 parameter, and thus can handle retrieving re
with the same IOType and Channel.
65