cbDIn()

Reads a digital input port.

Note that for some port types, such as 8255 ports, if the port is configured for DIGITALOUT, this function will provide readback of the last output value.

Refer to the "Digital Input/Output Hardware" topic for additional details on using the UL digital I/O functions.

Function Prototype

C/C++

int cbDIn(int BoardNum, int PortType, unsigned short *DataValue)

Visual Basic

Function cbDIn(ByVal BoardNum&, ByVal PortType&, DataValue%) As Long

Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

PortType

The digital port to read. Some hardware allows readback of the state of the output using this function; refer to the board-specific information in the Universal Library User's Guide.

DataValue

The digital input value.

Returns

Notes