EasyManua.ls Logo

VTI Instruments EX1629 - Vtex1629_Set_Dio_Output

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...
VTI Instruments Corp.
252 EX1629 Command Set
vtex1629_set_dio_output
FUNCTION PROTOTYPE
ViStatus vtex1629_set_dio_output (ViSession vi, ViInt32 dioOut);
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.
dioOut = an integer input value indicating the programmed output state of the digital I/O. See the Description below
for more information concerning this parameter. Valid input values: 0 to 65535.
DATA ITEM RESET VALUE
dioOut = 0
DESCRIPTION
This function sets the programmed output state for both digital I/O banks. The dioOut parameter is an integer value
that represents the desired state of the digital I/O. This binary value is constructed through the assignment of the
eight most significant bits to the eight channels of bank one (channels 8-15) and the eight least significant bits to the
eight channels of bank zero (channels 0-7). This is illustrated below.
bank one
channel #
bank zero
dioOut
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
For example, if a user wants to configure digital I/O channels 2 and 3 of bank zero and digital I/O channels 14 and
15 of bank one as high outputs, then dioOut should be set to the following:
dioOut = 11000000 00001100b → 0xC00C → 49164
NOTE The control of the digital I/O programmed output state and its direction are disjoint operations.
Thus, the setting of a nonzero output state only affects its actual state if the direction of the
appropriate bank is set to output. This is done with the vtex1629_set_dio_bank0_direction and
vtex1629_set_dio_bank1_direction functions.
EXAMPLE
ViSession instrumentHandle;
ViStatus status;
status = vtex1629_set_dio_output(instrumentHandle, 0x0000C00C);

Table of Contents

Related product manuals