DioConfig.GetDOutMask() method

Determines the bits on a specified port that are configured for output.

Member of the cDIOConfig class. Accessible from the MccBoard.DioConfig property.

Function Prototype

VB .NET

Public Function GetDOutMask(ByVal devNum As Integer, ByRef configVal As Integer) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo GetDOutMask(int devNum, out int configVal)

Parameters

devNum

Number of the port whose output bit configuration you want to determine.

configVal

Returns the bit configuration of the specified port. Any of the lower eight bits that return a value of 1 are configured for output.

Returns

Notes

Use GetDOutMask() with the GetDInMask() method to determine if an AuxPort is configurable. If you apply both methods to the same port, and both configVal parameters returned have input and output bits that overlap, the port is not configurable. You can determine overlapping bits by ANDing both parameters.

For example, the PCI-DAS08 has seven bits of digital I/O (four outputs and three inputs). For this board, the configVal parameter returned by GetDInMask()is always 7 (0000 0111), while the configVal parameter returned by GetDOutMask() is always 15 (0000 1111). When you And both configVal parameters together, you get a non-zero number (7). Any non-zero number indicates that input and output bits overlap for the specified port, and that port is a non-configurable AuxPort.