.

Controller.DigitalOutFromName

Returns the index of the digital output whose name matches the one specified.

Version History

Introduced in MPX 2.0.

Result

UInt32

Arguments

 
Argument Type Description
name String The name of the digital output.

Common Exceptions

 
Error Occurs when...
ObjectNotFound The digital output with the specified name could not be located.

Visual Basic

Syntax

Function DigitalOutFromName(name As String) As UInt32

Sample Code

 
Try
Dim digitalOutIndex As UInt32 = _
controller.DigitalInFromName("OPTO_A_IN") Console.WriteLine("Digital Output with name OPTO_A_OUT has index {0}", _ digitalOutIndex) Catch ex As mpx.Exception Console.WriteLine("No Digital Output with name OPTO_A_OUT")
End Try


Sample Application

 

C#

Syntax

UInt32 DigitalOutFromName(string name);

Sample Code

 
try
{
UInt32 digitalOutIndex = controller.DigitalOutFromName("OPTO_A_OUT"); Console.WriteLine("Digital Output with name OPTO_A_OUT has index {0}", digitalOutIndex); }
catch (Mpx.Exception)
{ Console.WriteLine("No Digital Output with name OPTO_A_OUT");
}

 

See Also

 

 

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