I resolved the issue by just using DigitalPortType.FirstPortA for bitValues 0-7 and then using DigitalPortType.FirstPortB for bitValues 8-11 when using the Dout() command.
Private Sub OutputValue(value As Integer)
Dim ULStat As ErrorInfo
Dim PortType As DigitalPortType
' Determine the port type based on the state of CheckBox1
If CheckBox1.Checked Then
PortType = DigitalPortType.FirstPortB
Else
PortType = DigitalPortType.FirstPortA
End If
' Output the value using DOut(), converting it to UShort
' Parameters:
' PortType : The output port type
' DataValue: The value to be written to the port
ULStat = DaqBoard.DOut(PortType, CUShort(value))
If ULStat.Value <> ErrorInfo.ErrorCode.NoErrors Then
MessageBox.Show("Error occurred while outputting value: " & ULStat.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub