# cbDOut32()

Writes a byte to a 32-bit 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 the UL digital I/O methods.

## Function Prototype

C/C++

int cbDOut32(int BoardNum, int PortType, uint DataValue)

Visual Basic

Function cbDOut32(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

- Error code or 0 if no errors.

## Notes

- Port size can vary. The output value is 0 to 232 –1 for a 32-bit port, 0 to 224 –1 for a 24-bit port, 0 to 65,535 for a 16-bit port, 0 to 255 for an 8-bit port, and 0 to 15 for a 4-bit port.
- Refer to the example programs and the board-specific information in the Universal Library User's Guide for clarification of valid PortType values.