VTI Instruments Corp.
160
EX10xxA/RX1032/EX1044 Function Calls
vtex10xxA_get_dio_input
F
UNCTION
P
ROTOTYPE
ViStatus vtex10xxA_get_dio_input(ViSession
vi
,
ViPInt32 dio_in
);
F
UNCTION
P
ARAMETERS
vi
= contains a session handle to the instrument. This handle is obtained by the function and remains valid until the
session is closed.
dio_in
= an integer output value in decimal representing the 8-bit value of the port. Within the 8-bit field, the MSB
corresponds to DIO channel 7 and the LSB corresponds to DIO channel 0. Valid return values: 0 through 255.
D
ATA
I
TEM
R
ESET
V
ALUE
Not applicable to this function.
D
ESCRIPTION
This function returns the current input state of the digital I/O port.
E
XAMPLE
// check state of DIO bits 7, 4, and 0
ViInt32 dio_in;
vtex10xxA_get_dio_input(vi, &dio_in);
if (dio_in & 0x80)
printf(“Bit 7 is high”);
else printf(“Bit 7 is low”);
if (dio_in & 0x10)
printf(“Bit 4 is high”);
else printf(“Bit 4 is low”);
if (dio_in & 0x01)
printf(“Bit 0 is high”);
else printf(“Bit 0 is low”);
Summary of Contents for EX1000A
Page 28: ...VTI Instruments Corp 28 EX10xxA Introduction EX1044 DIAGRAM ...
Page 29: ...www vtiinstruments com EX10xxA Introduction 29 FIGURE 1 5 EX1044 TABLE TOP USAGE ...
Page 34: ......
Page 56: ......
Page 74: ......
Page 130: ......
Page 282: ......