.

Controller.IsConnected

Represents the connection status of the MPX controller software object.

IsConnected returns True if the controller object is connected to a physical controller or if the controller object has loaded a memory dump file of a physical controller. IsConnected returns False otherwise.

If IsConnected is False, then most controller methods and properties will throw exceptions if accessed. To connect to a controller, call Controller.Connect.

Version History

Introduced in MPX 2.0.

Type

Boolean (read only)

Common Exceptions

 
Error Occurs when...
Argument An invalid argument is specified.

Visual Basic

Syntax

Property IsConnected As Boolean

Sample Code

 
' Make sure we are disconnected before connecting to new controller
If controller.IsConnected Then
    controller.Disconnect()
End If

' Now connect to new controller
controller.Type     = Mpx.ControllerType.Remote
controller.Location = "192.168.1.74"
controller.Connect()
            


Sample Application

 

C#

Syntax

bool IsConnected;

Sample Code

 
// Make sure we are disconnected before connecting to new controller
if (controller.IsConnected)
{
    controller.Disconnect();
}

// Now connect to new controller
controller.Type     = Mpx.ControllerType.Remote;
controller.Location = "192.168.1.74";
controller.Connect();
                 

 

 

See Also

 

 

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