Search Results for

    Show / Hide Table of Contents

    Class Controller

    The main entry point for any operation against the controller.

    Inheritance
    object
    NamedObject
    SDKBase
    Controller
    Implements
    IComparable
    INamedObject
    IController
    IDisposable
    IServiceProvider
    IMastershipResourceController
    IMastershipResource
    Inherited Members
    NamedObject.Equals(string)
    NamedObject.Equals(NamedObject)
    NamedObject.Equals(object)
    NamedObject.CompareTo(string)
    NamedObject.CompareTo(NamedObject)
    NamedObject.CompareTo(object)
    NamedObject.GetHashCode()
    NamedObject.ToString()
    Namespace: ABB.Robotics.Controllers
    Assembly: ABB.Robotics.Controllers.PC.dll
    Syntax
    public sealed class Controller : SDKBase, IComparable, INamedObject, IController, IDisposable, IServiceProvider, IMastershipResourceController, IMastershipResource

    Constructors

    View Source

    Controller()

    Creates a controller from the defaultController id in the capi section of the App.config file.

    Declaration
    [Obsolete("Use Controller.Connect(Controller.DefaultSystemId,...)")]
    public Controller()
    View Source

    Controller(ControllerInfo)

    Creates a controller from a controller info object.

    Declaration
    [Obsolete("Use Controller.Connect()")]
    public Controller(ControllerInfo controller)
    Parameters
    Type Name Description
    ControllerInfo controller

    Info object from NetworkScanner.

    View Source

    Controller(ControllerInfo, bool)

    Creates a controller from a controller info object.

    Declaration
    [Obsolete("Use Controller.Connect()")]
    public Controller(ControllerInfo controller, bool validateServerCertificate)
    Parameters
    Type Name Description
    ControllerInfo controller

    Info object from NetworkScanner.

    bool validateServerCertificate

    Validate the SSL certificate when connecting to a 7.x controller.

    View Source

    Controller(Guid)

    Creates a controller instance from a system id.

    Declaration
    [Obsolete("Use Controller.Connect()")]
    public Controller(Guid systemId)
    Parameters
    Type Name Description
    Guid systemId

    System id.

    View Source

    Controller(Guid, bool)

    Creates a controller instance from a system id.

    Declaration
    [Obsolete("Use Controller.Connect()")]
    public Controller(Guid systemId, bool validateServerCertificate)
    Parameters
    Type Name Description
    Guid systemId

    System id.

    bool validateServerCertificate

    Validate the SSL certificate when connecting to a 7.x controller.

    View Source

    Controller(string)

    Not for public use.

    Declaration
    [Obsolete("Use Controller.Connect()")]
    public Controller(string controllerID)
    Parameters
    Type Name Description
    string controllerID

    Not for public use.

    View Source

    Controller(string, bool)

    Not for public use.

    Declaration
    [Obsolete("Use Controller.Connect()")]
    public Controller(string controllerID, bool validateServerCertificate)
    Parameters
    Type Name Description
    string controllerID

    Not for public use.

    bool validateServerCertificate

    Validate the SSL certificate when connecting to a 7.x controller.

    Properties

    View Source

    AuthenticationSystem

    Gets the user authentication subsystem.

    Declaration
    public UserAuthorizationSystem AuthenticationSystem { get; }
    Property Value
    Type Description
    UserAuthorizationSystem
    View Source

    BackupInProgress

    Gets a flag that indicates if a backup is in progress or not.

    Declaration
    public bool BackupInProgress { get; }
    Property Value
    Type Description
    bool
    View Source

    Configuration

    Gets the controller configuration.

    Declaration
    public ConfigurationDatabase Configuration { get; }
    Property Value
    Type Description
    ConfigurationDatabase
    View Source

    Connected

    Indicates whether the controller is connected or not.

    Declaration
    public bool Connected { get; }
    Property Value
    Type Description
    bool
    View Source

    CurrentUser

    Gets the currently logged on user.

    Declaration
    public UserInfo CurrentUser { get; }
    Property Value
    Type Description
    UserInfo
    View Source

    DateTime

    Gets/Sets the time of the controller.

    Declaration
    public DateTime DateTime { get; set; }
    Property Value
    Type Description
    DateTime
    Remarks

    Grant: UAS_CONTROLLER_PROPERTIES_WRITE, not supported by boot server or Virtual Controller.

    The System.DateTimeKind used by this property is System.DateTimeKind.Utc (Coordinated Universal Time). To set current datetime use DateTime.UtcNow.

    DateTimeKind UtcNow
    View Source

    DefaultSystemId

    Gets the configured default system id.

    Declaration
    public static Guid DefaultSystemId { get; }
    Property Value
    Type Description
    Guid
    View Source

    EventLog

    Gets the event log of the controller.

    Declaration
    public EventLog EventLog { get; }
    Property Value
    Type Description
    EventLog
    View Source

    FileSystem

    Gets the controller file system.

    Declaration
    public FileSystem FileSystem { get; }
    Property Value
    Type Description
    FileSystem
    View Source

    HasUnicodeSupport

    Gets if the controller supports Unicode in RAPID.

    Declaration
    public bool HasUnicodeSupport { get; }
    Property Value
    Type Description
    bool
    View Source

    IOSystem

    Gets the IOSystem of the controller.

    Declaration
    public IOSystem IOSystem { get; }
    Property Value
    Type Description
    IOSystem
    View Source

    IPAddress

    Gets the IPAddress of the controller.

    Declaration
    public IPAddress IPAddress { get; }
    Property Value
    Type Description
    IPAddress
    Remarks

    For a virtual controller the value is the loopback address i.e. 127.0.0.1.

    View Source

    Ipc

    Gets a reference to the Ipc class of the controller.

    Declaration
    public Ipc Ipc { get; }
    Property Value
    Type Description
    Ipc

    A Ipc reference that can be used to access the Ipc functionality of the controller.

    View Source

    IsMaster

    Gets the current mastership state.

    Declaration
    public bool IsMaster { get; }
    Property Value
    Type Description
    bool
    View Source

    IsVirtual

    Gets a flag that indicates if the controller is virtual or not.

    Declaration
    public bool IsVirtual { get; }
    Property Value
    Type Description
    bool
    View Source

    MacAddress

    Gets the MAC address of the controller.

    Declaration
    public string MacAddress { get; }
    Property Value
    Type Description
    string
    View Source

    MainComputerServiceInfo

    Gets service information for the main computer. This property is not valid for Virtual Controllers.

    Declaration
    public MainComputerServiceInfo MainComputerServiceInfo { get; }
    Property Value
    Type Description
    MainComputerServiceInfo
    View Source

    MastershipPolicy

    Specifies how mastership should be handled by a GUI client

    Declaration
    public ControllerMastershipPolicy MastershipPolicy { get; set; }
    Property Value
    Type Description
    ControllerMastershipPolicy
    View Source

    MotionSystem

    Gets the motions system domain of the controller.

    Declaration
    public MotionSystem MotionSystem { get; }
    Property Value
    Type Description
    MotionSystem
    View Source

    Name

    Gets the name of the controller.

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    string
    Overrides
    NamedObject.Name
    View Source

    NetworkSettings

    Gets the network settings of the controller.

    Declaration
    public NetworkSettingsInfo NetworkSettings { get; }
    Property Value
    Type Description
    NetworkSettingsInfo
    Remarks

    Not supported by Virtual Controller.

    View Source

    OperatingMode

    Gets the current operating mode of the controller.

    Declaration
    public ControllerOperatingMode OperatingMode { get; }
    Property Value
    Type Description
    ControllerOperatingMode
    View Source

    Rapid

    Gets the Rapid Domain of the controller.

    Declaration
    public Rapid Rapid { get; }
    Property Value
    Type Description
    Rapid
    View Source

    RemoteLogin

    Gets the RemoteLogin which allosw a certain type of users to request a remote login/logout of a TPU user.

    Declaration
    public RemoteLogin RemoteLogin { get; }
    Property Value
    Type Description
    RemoteLogin
    View Source

    RobotWare

    Gets information about the current system and options.

    Declaration
    public SystemRobotWare RobotWare { get; }
    Property Value
    Type Description
    SystemRobotWare
    View Source

    RobotWareVersion

    Gets the version of the robotware the current system uses.

    Declaration
    public Version RobotWareVersion { get; }
    Property Value
    Type Description
    Version
    View Source

    RunLevel

    Gets the current run level of the controller.

    Declaration
    public Level RunLevel { get; }
    Property Value
    Type Description
    Level
    View Source

    StartTime

    Gets the system clock at the last startup of the controller.

    Declaration
    public DateTime StartTime { get; }
    Property Value
    Type Description
    DateTime
    View Source

    State

    Gets/Sets the current state of the controller.

    Declaration
    public ControllerState State { get; set; }
    Property Value
    Type Description
    ControllerState
    Remarks

    Set requires Auto mode. Can only be used to change between MotorsOn and MotorsOff respectively. You can not change from MotorsOn to MotorsOff while a RAPID program is executing.

    View Source

    SystemId

    Gets the id of the current system of the controller.

    Declaration
    public Guid SystemId { get; }
    Property Value
    Type Description
    Guid
    View Source

    SystemName

    Gets the name of the current system of the controller.

    Declaration
    public string SystemName { get; }
    Property Value
    Type Description
    string
    View Source

    TimeServer

    Gets or sets the NTP time server of the controller.

    Declaration
    public string TimeServer { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Value may be IP, DNS name or null/empty.

    View Source

    TimeZone

    Gets or sets the time zone of the controller.

    Declaration
    public string TimeZone { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Value may be a time zone as specified in the time zone database (also known as Olson database) or null/empty. For example: Europe/Stockholm.

    View Source

    UICulture

    Gets the UI Culture.

    Declaration
    public CultureInfo UICulture { get; }
    Property Value
    Type Description
    CultureInfo

    Methods

    View Source

    Backup(string)

    Initiates a new backup operation. This operation stores the backup in the specified directory on the controller file system.

    Declaration
    public void Backup(string path)
    Parameters
    Type Name Description
    string path

    Output path for backup operation.

    Remarks

    This method is asynchronous, wait for the BackupCompleted event.

    View Source

    CheckAvailability(IEnumerable<string>, IEnumerable<MastershipResource>, bool, bool, bool)

    Checks Availability preconditions for performing an action on the controller.

    Declaration
    public void CheckAvailability(IEnumerable<string> requiredGrants, IEnumerable<MastershipResource> requiredMastership, bool allowedInSysFail, bool allowedInExecuting, bool requiresLogon)
    Parameters
    Type Name Description
    IEnumerable<string> requiredGrants

    Required UAS grants (can be null)

    IEnumerable<MastershipResource> requiredMastership

    Required mastership resources (can be null)

    bool allowedInSysFail
    bool allowedInExecuting
    bool requiresLogon
    Remarks

    Mastership is only checked for a connection with MastershipPolicy.Manual.

    View Source

    CheckRestore(string)

    Checks for possible mismatches and other problems with a backup.

    Declaration
    public bool CheckRestore(string path)
    Parameters
    Type Name Description
    string path

    Path of directory.

    Returns
    Type Description
    bool

    True if restore will complete successfully.

    View Source

    CheckRestore(string, RestoreIncludes)

    Checks for possible mismatches and other problems with a backup.

    Declaration
    public bool CheckRestore(string path, RestoreIncludes includes)
    Parameters
    Type Name Description
    string path

    Path of directory.

    RestoreIncludes includes

    What to include from backup.

    Returns
    Type Description
    bool

    True if restore will complete successfully.

    View Source

    CheckRestore(string, RestoreIncludes, RestoreIgnores)

    Checks for possible mismatches and other problems with a backup.

    Declaration
    public bool CheckRestore(string path, RestoreIncludes includes, RestoreIgnores ignores)
    Parameters
    Type Name Description
    string path

    Path of directory.

    RestoreIncludes includes

    What to include from backup.

    RestoreIgnores ignores

    What errors to ignore.

    Returns
    Type Description
    bool

    True if restore will complete successfully.

    View Source

    CheckRestore2(string, RestoreIncludes, RestoreIgnores, RestoreIncludeSafetySettings, RestoreIncludeUasSettings)

    Checks for possible mismatches and other problems with a backup.

    Declaration
    public RestoreInfo CheckRestore2(string path, RestoreIncludes includes, RestoreIgnores ignores, RestoreIncludeSafetySettings includeSafetySettings, RestoreIncludeUasSettings includeUasSettings)
    Parameters
    Type Name Description
    string path

    Path to the backup.

    RestoreIncludes includes

    What to include from backup.

    RestoreIgnores ignores

    What errors to ignore.

    RestoreIncludeSafetySettings includeSafetySettings

    Include safety settings. Supported from RobotWare 6.05.

    RestoreIncludeUasSettings includeUasSettings

    Include UAS settings. Supported from RobotWare 7.15.

    Returns
    Type Description
    RestoreInfo

    A RestoreInfo object with information about the operation.

    Remarks

    This method is supported for all RobotWare versions, but provides additional functionality for 7.17 and later.

    View Source

    Connect(ControllerInfo, ConnectionType, bool)

    Creates a Controller object with a connection to a controller.

    Declaration
    public static Controller Connect(ControllerInfo controllerInfo, ConnectionType connectionType, bool validateServerCertificate = false)
    Parameters
    Type Name Description
    ControllerInfo controllerInfo

    The controller info from NetScan

    ConnectionType connectionType

    ABB.Robotics.Controllers.Controller.ConnectionType

    bool validateServerCertificate

    Validate the SSL certificate when connecting to a 7.x controller.

    Returns
    Type Description
    Controller
    View Source

    Connect(Guid, ConnectionType, bool)

    Creates a Controller object with a connection to a controller.

    Declaration
    public static Controller Connect(Guid systemId, ConnectionType connectionType, bool validateServerCertificate = false)
    Parameters
    Type Name Description
    Guid systemId

    The system id of the controller

    ConnectionType connectionType

    ABB.Robotics.Controllers.Controller.ConnectionType

    bool validateServerCertificate

    Validate the SSL certificate when connecting to a 7.x controller.

    Returns
    Type Description
    Controller
    View Source

    Dispose(bool)

    Disposes the current controller object.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Flag that indicates the origin of the call, true indicates a dispose false indicates a finalizer.

    Overrides
    SDKBase.Dispose(bool)
    View Source

    ExpandEnvironmentVariables(string)

    Substitutes environment variables in a string with their values.

    Declaration
    public string ExpandEnvironmentVariables(string s)
    Parameters
    Type Name Description
    string s
    Returns
    Type Description
    string

    The value.

    View Source

    ~Controller()

    Declaration
    protected ~Controller()
    View Source

    GetEnvironmentVariable(string)

    Gets the value of an environment variable.

    Declaration
    public string GetEnvironmentVariable(string name)
    Parameters
    Type Name Description
    string name

    The name.

    Returns
    Type Description
    string

    The value.

    View Source

    Logoff()

    Logs off the current user.

    Declaration
    public void Logoff()
    Remarks

    RobotStudio addins may not manually log on or off. RobotStudio will handle the same. See also Logon(UserInfo).

    View Source

    Logon(UserInfo)

    Logon as the specified user.

    Declaration
    public void Logon(UserInfo user)
    Parameters
    Type Name Description
    UserInfo user

    The user.

    Remarks

    RobotStudio addins may not manually log on or off. RobotStudio will handle the same. See HostingServices.

    View Source

    ReleaseUnmanagedResources()

    Releases unmanaged resources, thus preventing memory leaks. If the PC SDK application is running in a Single Threaded Apartment (STA), the Dispose call will dispose of managed objects, but native objects created internally by the PC SDK will remain. To release these unmanaged resources, this method should be called periodically.

    Declaration
    [Obsolete("The method Controller.ReleaseUnmanagedResources is not valid from PC SDK 5.60 onwards.")]
    public static void ReleaseUnmanagedResources()
    Remarks

    For an application running in a Multi Threaded Apartment (MTA) the Dispose call will remove both managed and native objects.

    View Source

    Restart()

    Performs a warm restart of the controller.

    Declaration
    public void Restart()
    Remarks

    On a Virtual Controller the content of the temporary folder (TEMP)$ will be deleted. GetEnvironmentVariable(string)

    View Source

    Restart(ControllerStartMode)

    Restarts the controller.

    Declaration
    public void Restart(ControllerStartMode mode)
    Parameters
    Type Name Description
    ControllerStartMode mode

    The startup mode.

    Remarks

    On a Virtual Controller the content of the temporary folder (TEMP)$ will be deleted. GetEnvironmentVariable(string)

    View Source

    RestartAndWaitForReconnect(ControllerStartMode)

    Restarts the controller and does not return until it has restarted and reconnected again.

    Declaration
    public void RestartAndWaitForReconnect(ControllerStartMode mode)
    Parameters
    Type Name Description
    ControllerStartMode mode

    The startup mode.

    Remarks

    On a Virtual Controller the content of the temporary folder (TEMP)$ will be deleted. GetEnvironmentVariable(string)

    View Source

    Restore(string)

    Performs a Restore operation of a controller system.

    Declaration
    public void Restore(string path)
    Parameters
    Type Name Description
    string path

    Path to the backup.

    Remarks

    Requires mastership of Rapid and Configuration domains. Requires UAS_RESTORE grant. Requires Auto mode.

    View Source

    Restore(string, RestoreIncludes)

    Performs a Restore operation of a controller system.

    Declaration
    public void Restore(string path, RestoreIncludes includes)
    Parameters
    Type Name Description
    string path

    Path to the backup.

    RestoreIncludes includes

    Defines what to restore from the backup.

    Remarks

    Requires mastership of Rapid and Configuration domains. Requires UAS_RESTORE grant. Requires Auto mode.

    View Source

    Restore(string, RestoreIncludes, RestoreIgnores)

    Performs a Restore operation of a controller system.

    Declaration
    public void Restore(string path, RestoreIncludes includes, RestoreIgnores ignores)
    Parameters
    Type Name Description
    string path

    Path to the backup.

    RestoreIncludes includes

    Defines what to restore from the backup.

    RestoreIgnores ignores

    Defines what mismatches between current system and backup to ignore.

    Remarks

    Requires mastership of Rapid and Configuration domains. Requires UAS_RESTORE grant. Requires Auto mode.

    View Source

    Restore(string, RestoreIncludes, RestoreIgnores, RestoreIncludeSafetySettings, RestoreIncludeUasSettings, bool)

    Performs a Restore operation of a controller system.

    Declaration
    public void Restore(string path, RestoreIncludes includes, RestoreIgnores ignores, RestoreIncludeSafetySettings includeSafetySettings, RestoreIncludeUasSettings includeUasSettings, bool removeBackup)
    Parameters
    Type Name Description
    string path

    Path to the backup.

    RestoreIncludes includes

    Defines what to restore from the backup.

    RestoreIgnores ignores

    Defines what mismatches between current system and backup to ignore.

    RestoreIncludeSafetySettings includeSafetySettings

    Include safety settings. Supported from RobotWare 6.05.

    RestoreIncludeUasSettings includeUasSettings

    Include UAS settings. Supported from RobotWare 7.15.

    bool removeBackup

    Flag to indicate if the backup folder shall be removed.

    Remarks

    Requires mastership of Rapid and Configuration domains. Requires UAS_RESTORE grant. Requires Auto mode.

    On a Virtual Controller the restore operation will delete the content of the temporary folder (TEMP)$. Restart()

    View Source

    Restore(string, RestoreIncludes, RestoreIgnores, bool)

    Performs a Restore operation of a controller system.

    Declaration
    public void Restore(string path, RestoreIncludes includes, RestoreIgnores ignores, bool removeBackup)
    Parameters
    Type Name Description
    string path

    Path to the backup.

    RestoreIncludes includes

    Defines what to restore from the backup.

    RestoreIgnores ignores

    Defines what mismatches between current system and backup to ignore.

    bool removeBackup

    Flag to indicate if the backup folder shall be removed.

    Remarks

    Requires mastership of Rapid and Configuration domains. Requires UAS_RESTORE grant. Requires Auto mode.

    On a Virtual Controller the restore operation will delete the content of the temporary folder (TEMP)$. Restart()

    View Source

    SaveDiagnosticsInfoToController(string)

    Creates a file with RobotWare diagnostics information on the controllers file system

    Declaration
    public void SaveDiagnosticsInfoToController(string dignosticsFileName)
    Parameters
    Type Name Description
    string dignosticsFileName
    View Source

    SendHeartBeat()

    Send a heartbeat to the controller to show presence while executing.

    Declaration
    public void SendHeartBeat()
    Remarks

    Depending on controller version and configuration, a client that holds mastership must send a heartbeat to the controller to show presence during execution.
    If the client does not send a heartbeat with a specified interval, execution will stop and the controller will go to motors off.
    This functionality is availabe in RobotWare 7.8 and later and is controlled via the configuration instance SYS/MASTER_BOOL/HeartBeat:

    • If the parameter Select is true, a client that holds mastership must send heartbeats or program execution will stop.
    • The parameter Timeout corresponds to the maximum heartbeat interval.

    This is required for standalone applications, but not for RobotStudio add-ins.

    View Source

    SetNetworkSettings(bool, string, string, string)

    Sets the controller LAN adaptor settings.

    Declaration
    public void SetNetworkSettings(bool isDhcp, string ipAddress, string subnetMask, string gateway)
    Parameters
    Type Name Description
    bool isDhcp

    True when using DHCP, false for fixed IP. When using DHCP the remaining parameters will have no effect.

    string ipAddress

    IP to use when FixIP is configured.

    string subnetMask

    Subnet mask to use when FixIP is configured.

    string gateway

    Default gateway to use when FixIP is configured. May be left empty.

    Events

    View Source

    BackupCompleted

    This event is raised when a backup operation completes, the event arguments hold information about the success of the backup operation.

    Declaration
    public event EventHandler<BackupEventArgs> BackupCompleted
    Event Type
    Type Description
    EventHandler<BackupEventArgs>
    View Source

    ConnectionChanged

    This event is raised when the connection status to the controller has changed.

    Declaration
    public event EventHandler<ConnectionChangedEventArgs> ConnectionChanged
    Event Type
    Type Description
    EventHandler<ConnectionChangedEventArgs>
    View Source

    MastershipChanged

    Please use MastershipChanged or MastershipChanged instead.

    Declaration
    [Obsolete("Use Controller.Rapid.MastershipChanged or Controller.Configuration.MastershipChanged instead.")]
    public event EventHandler<MastershipChangedEventArgs> MastershipChanged
    Event Type
    Type Description
    EventHandler<MastershipChangedEventArgs>
    View Source

    OnCertificateError

    Raised when connecting to an OmniCore controller with an untrusted SSL certificate.

    Declaration
    public static event EventHandler<CertificateErrorEventArgs> OnCertificateError
    Event Type
    Type Description
    EventHandler<CertificateErrorEventArgs>
    Remarks

    Will not be raised if running in RobotStudio or if passing validateServerCertificate = false when connecting.

    View Source

    OperatingModeChanged

    This event is raised when the operation mode of the controller has changed.

    Declaration
    public event EventHandler<OperatingModeChangeEventArgs> OperatingModeChanged
    Event Type
    Type Description
    EventHandler<OperatingModeChangeEventArgs>
    View Source

    StateChanged

    This event is raised when the current state of the controller has changed.

    Declaration
    public event EventHandler<StateChangedEventArgs> StateChanged
    Event Type
    Type Description
    EventHandler<StateChangedEventArgs>

    Implements

    IComparable
    INamedObject
    IController
    IDisposable
    IServiceProvider
    IMastershipResourceController
    IMastershipResource
    • View Source
    In this article
    Back to top Copyright © 2026 ABB Robotics