.

Controller.DigitalOutBit

Reads or sets the current state of a controller digital output.

Version History

Introduced in MPX 2.0.

Type

Boolean

Index

 
Index Type Description
UInt32 The digital output bit to read or set.

Common Exceptions

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

Visual Basic

Syntax

Property DigitalOutBit(index As UInt32) As Boolean

Sample Code

 
If controller.DigitalOutAvailable(4) Then
Dim output4State As Boolean = controller.DigitalOutBit(4)
Dim output4Name As String = controller.DigitalOutName(4)
Console.WriteLine("Digital Output #4 Name: {0}, State: {1}", _
output4Name, _
output4State) If output4State Then controller.DigitalOutBit(4) = False
End If
End If


Sample Application

 

C#

Syntax

bool DigitalOutBit[];

Sample Code

 
if (controller.DigitalOutAvailable[4])
{
bool output4State = controller.DigitalOutBit[4];
string output4Name = controller.DigitalOutName[4]; Console.WriteLine("Digital Output #4 Name: {0}, State: {1}",
output4Name,
output4State); if(output4State == true)
{
controller.DigitalOutBit[4] = false;
}
}

 

See Also

 

 

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