Click or drag to resize

ControllerName Property

Returns the name of the robot controller.

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

Property Value

Type: String
Exceptions
ExceptionCondition
GeneralExceptionA General Exception has occurred.
Examples
This example gets the name of the controller and the current date and time. A GTPUMessageBox displays the information.
private void DisplayNameNnTime(Controller myControllerRef)
{
       // Get the name of the controller
       string name = myControllerRef.Name;

       // Get current date and time in the controller
    DateTime now = myControllerRef.DateTime;

    // Compose text
    string text = string.Format("Name of controller is: {0}\r\nCurrent date is: {1}\r\nand the time is: {2}.{3}",name,
        now.Date.ToString(),now.Hour,now.Minute);

    // Display message box
    GTPUMessageBox.Show(this,new MessageBoxEventHandler(MyMessageBoxEventHandler),
        text,
        "My Caption",
        System.Windows.Forms.MessageBoxIcon.Asterisk,
        System.Windows.Forms.MessageBoxButtons.OK);
}
See Also