Click or drag to resize

ControllerOperatingMode Property

Gets the controller operating mode.

Namespace:  ABB.Robotics.Controllers
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public ControllerOperatingMode OperatingMode { get; }

Return Value

Type: ControllerOperatingMode
A ControllerOperatingMode value representing the current operating mode of the controller.
Exceptions
ExceptionCondition
GeneralExceptionA General Exception has occurred.
Remarks
A call to the controller is performed each time this property is called. Thus, if you want to repeatedly check the ControllerOperatingMode in a conditional clause, you should get the controller state and save the value locally. See code example below.
Examples
This example gets the operating mode and displays an associated text.
// c is a reference to a controller object
// Get the state of the controller and save it in order to 
// avoid unnecessary round trips to the controller 
ControllerOperatingMode mode = c.OperatingMode;

// Display a text associated to the corresponding operating mode
switch (mode)
{
    case ControllerOperatingMode.Auto:
        label4.Text = "Auto mode";
        break;
    case ControllerOperatingMode.AutoChange:
        label4.Text = "Auto change mode";
        break;
    case ControllerOperatingMode.Init:
        label4.Text = "Initial mode";
        break;
    case ControllerOperatingMode.ManualFullSpeed:
        label4.Text = "Manual full speed mode";
        break;
    case ControllerOperatingMode.ManualFullSpeedChange:
        label4.Text = "Manual full speed change mode";
        break;
    case ControllerOperatingMode.ManualReducedSpeed:
        label4.Text = "Manual reduced speed";
        break;
    case ControllerOperatingMode.Unknown:
        label4.Text = "Unknown mode";
        break;
}
See Also