EasyManua.ls Logo

VTI Instruments EX1629 - Vtex1629_Get_Dio_Input

Default Icon
346 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
www.vtiinstruments.com
EX1629 Command Set 149
vtex1629_get_dio_input
FUNCTION PROTOTYPE
ViStatus vtex1629_get_dio_input (ViSession vi, ViPInt32 dioIn);
FUNCTION PARAMETERS
vi = contains a session handle to the instrument. This handle is obtained by the function and remains valid until the
session is closed.
dioIn = an integer return value indicating the input state of the digital I/O. See the Description below for more
information concerning this parameter. Valid return values: 0 to 65535.
DATA ITEM RESET VALUE
Not applicable to this function.
DESCRIPTION
This function queries and returns the current input state of both banks of the digital I/O. The dioIn parameter is a
decimal value that must be converted to a 16-bit binary value. Once done, the eight most significant bits correspond
to the eight channels of bank one (channels 8-15). The eight least significant bits correspond to the eight channels of
bank zero (channels 0-7). This is illustrated below.
bank one
channel #
bank zero
dioIn
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
0
The upper 16-bits will always be zero.
For example, a user queries the output state and the following was returned:
dioIn = 49164 → 0x0000C00C → 11000000 00001100
This indicates that channels 2 and 3 of digital I/O bank zero and channels 14 and 15 of digital I/O bank one are high,
while the remaining channels are low.
EXAMPLE
ViSession instrumentHandle;
ViStatus status;
ViInt32 dio_in;
status = vtex1629_get_dio_input(instrumentHandle, &dio_in);

Table of Contents

Related product manuals