.

Controller.DigitalInBit

Reads the current state of a controller digital input.

Version History

Introduced in MPX 2.0.

Type

Boolean (read only)

Index

 
Index Type Description
UInt32 The digital input bit to read.

Common Exceptions

 
Error Occurs when...
Argument An invalid argument is specified. The specified bit does not exist on the controller.

Visual Basic

Syntax

Property DigitalInBit(index As UInt32) As Boolean

Sample Code

 
If controller.DigitalInAvailable(2) Then
Dim input2State As Boolean = controller.DigitalInBit(2)
Dim input2Name As String = controller.DigitalInName(2)
Console.WriteLine("Digital Input #2 Name: {0}, State: {1}", _
input2Name, _
input2State)
End If


Sample Application

 

C#

Syntax

bool DigitalInBit[];

Sample Code

 
if (controller.DigitalInAvailable[2])
{
bool input2State = controller.DigitalInBit[2];
string input2Name = controller.DigitalInName[2];

Console.WriteLine("Digital Input #2 Name: {0}, State: {1}",
input2Name,
input2State);
}

 

See Also

 

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering