National Instruments PC-OPDIO-16 Telescope User Manual


 
Chapter 6 NI-DAQ Function Reference
© National Instruments Corporation 6-5 PC-OPDIO-16 User Manual
Device Numbers
The first parameter to almost every NI-DAQ function is the device number of the DAQ device
you want NI-DAQ to use for the given operation. After you have followed the instructions in
Chapter 2, Installation and Configuration, the configuration utility displays the device number
for each device you have installed in the system. You can use the configuration utility to verify
your device numbers. You can use multiple DAQ devices in one application; to do so, simply
pass the appropriate device number to each function.
Function Descriptions
The following is an alphabetically ordered list of NI-DAQ functions that support the
PC-OPDIO-16. Remember that port A is the output port and port B is the input port, so you will
perform digital writes to port A and digital reads from port B. However, you may wish to
perform a digital read from port A to determine the value of a previous write.
DIG_In_Line
Format
status = DIG_In_Line (deviceNumber, port, line, state)
Purpose
Returns the digital logic state of the specified digital line in the specified port.
Parameters
Direction Name Type Description
Input deviceNumber I16 assigned by configuration utility
port I16 digital I/O port number
line I16 digital line to be read
Output state I16 returns the digital logic state
Parameter Discussion
port is the digital I/O port number.
Range: 0 through 1
Port A = 0
Port B = 1
Note: You will normally use input port B with this function.
line is the digital line to be read.
Range: 0 through 7
state returns the digital logic state of the specified line.
0: The specified digital line is at a digital logic low.
1: The specified digital line is at a digital logic high.