cbDOut()

Writes a byte to a digital output port.

Most configurable ports require configuration before writing. Check the board-specific information in the Universal Library User's Guide to determine if the port should be configured for your hardware. When configurable, use cbDConfigPort() to configure a port for output.

Refer to the Digital Input / Output Hardware" topic for additional details on using digital I/O boards with the Universal Library's digital I/O functions.

Function Prototype

C/C++

int cbDOut(int BoardNum, int PortType, unsigned short DataValue)

Visual Basic

Function cbDOut(ByVal BoardNum&, ByVal PortType&, ByVal 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 type. There are three general types of digital ports — ports that are programmable as input or output, ports that are fixed input or output, and ports for which each bit may be programmed as input or output. For the first of these types, set PortType to FIRSTPORTA. For the latter two types, set PortType to AUXPORT. For devices with both types of digital ports, set PortType to either FIRSTPORTA or AUXPORT, depending on the digital port you want to set.

DataValue

Digital value to write.

Returns

Notes