DBitOut()

Sets the state of a single digital output bit.

This method treats all of the DIO chips of a particular type on a board as a single large port. It lets you set the state of any individual bit within this large port.

Most configurable ports require configuration before writing. Check board-specific information to determine if the port should be configured for your hardware. When configurable, use DConfigPort() to configure a port for output, and DConfigBit() to configure a bit for output.

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

Member of the MccBoard class.

Function Prototype

VB .NET

Public Function DBitOut(ByVal portType As MccDaq.DigitalPortType, ByVal bitNum As Integer, ByVal bitValue As MccDaq.DigitalLogicState) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo DBitOut(MccDaq.DigitalPortType portType, int bitNum, MccDaq.DigitalLogicState bitValue)

Parameters

portType

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 which digital port you want to set.

bitNum

The bit number within the single large port. The specified bit must be in a port that is configured for output.

bitValue

Value will be 0 (logic low) or 1 (logic high). Logic high does not necessarily mean 5 V – refer to the device hardware user guide for chip input specifications.

Returns