National Instruments 320682C Musical Toy Instrument User Manual


 
Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-50 © National Instruments Corporation
Parameters
Input
device
short integer Assigned by configuration utility.
portNumber
string Specifies the digital port this function
configures.
line
short integer Specifies the individual bit or line within the
port to be used for I/O (zero-based).
portWidth
short integer The total width in bits of the port. For example,
you can combine two 4-bit ports into an 8-bit
port on an MIO (non E-Series) board by setting
portWidth to 8.
configure
long integer 1: Configure the digital port before reading;
0: Don’t configure the digital port before
reading. When this function is called in a loop,
it can be optimized by only configuring the
digital port on the first iteration.
Output
lineState
unsigned
long integer
Returns the state of the digital line. 1 = logical
high; 0 = logical low.
Return Value
error
short integer Refer to error codes in Table 10-5.
Parameter Discussion
portNumber specifies the digital port this function configures.
A portNumber value of 0 signifies port 0, a portNumber of 1 signifies port 1, and so on. If
you use an SCXI-1160, SCXI-1161, SCXI-1162, or SCXI-1163 module, use the
"SCx!MDy!0"
syntax, where x is the chassis ID and y is the module device number, to specify the port on a
module.
portWidth is the total width in bits of the port. For example, you can combine two 4-bit ports
into an 8-bit port on an MIO (non E-Series) board by setting portWidth to 8.
When portWidth is greater than the physical port width of a digital port, the following
restrictions apply. The portWidth must be an integral multiple of the physical port width,
and the port numbers in the combined port must begin with the port named by portNumber
and must increase consecutively. For example, if portNumber is 3 and portWidth is
24(bits), LabWindows/CVI uses ports 3, 4, and 5.