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
    SDKBase.Dispose()
    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

    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()

    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.

    Controller(ControllerInfo, Boolean)

    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.

    Boolean validateServerCertificate

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

    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.

    Controller(Guid, Boolean)

    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.

    Boolean validateServerCertificate

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

    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.

    Controller(String, Boolean)

    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.

    Boolean validateServerCertificate

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

    Properties

    AuthenticationSystem

    Gets the user authentication subsystem.

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

    BackupInProgress

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

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

    Configuration

    Gets the controller configuration.

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

    Connected

    Indicates whether the controller is connected or not.

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

    CurrentUser

    Gets the currently logged on user.

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

    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

    DefaultSystemId

    Gets the configured default system id.

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

    EventLog

    Gets the event log of the controller.

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

    FileSystem

    Gets the controller file system.

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

    HasUnicodeSupport

    Gets if the controller supports Unicode in RAPID.

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

    IOSystem

    Gets the IOSystem of the controller.

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

    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.

    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.

    IsMaster

    Gets the current mastership state.

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

    IsRobotWare7

    Declaration
    public bool IsRobotWare7 { get; }
    Property Value
    Type Description
    Boolean

    IsVirtual

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

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

    MacAddress

    Gets the MAC address of the controller.

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

    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

    MastershipPolicy

    Specifies how mastership should be handled by a GUI client

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

    MotionSystem

    Gets the motions system domain of the controller.

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

    Name

    Gets the name of the controller.

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

    NetworkSettings

    Gets the network settings of the controller.

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

    Not supported by Virtual Controller.

    OperatingMode

    Gets the current operating mode of the controller.

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

    Rapid

    Gets the Rapid Domain of the controller.

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

    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

    RobotWare

    Gets information about the current system and options.

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

    RobotWareVersion

    Gets the version of the robotware the current system uses.

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

    RunLevel

    Gets the current run level of the controller.

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

    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.

    SystemId

    Gets the id of the current system of the controller.

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

    SystemName

    Gets the name of the current system of the controller.

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

    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.

    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.

    UICulture

    Gets the UI Culture.

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

    Methods

    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.

    CheckAvailability(IEnumerable<String>, IEnumerable<MastershipResource>, Boolean, Boolean, Boolean)

    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)

    Boolean allowedInSysFail
    Boolean allowedInExecuting
    Boolean requiresLogon
    Remarks

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

    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
    Boolean

    True if restore will complete successfully.

    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
    Boolean

    True if restore will complete successfully.

    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
    Boolean

    True if restore will complete successfully.

    CheckRestore(String, RestoreIncludes, RestoreIgnores, RestoreIncludeControllerSettings)

    ABB internal use only.

    Declaration
    public bool CheckRestore(string path, RestoreIncludes includes, RestoreIgnores ignores, RestoreIncludeControllerSettings includeControllerSettings)
    Parameters
    Type Name Description
    String path
    RestoreIncludes includes
    RestoreIgnores ignores
    RestoreIncludeControllerSettings includeControllerSettings
    Returns
    Type Description
    Boolean

    Connect(ControllerInfo, ConnectionType, Boolean)

    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

    Boolean validateServerCertificate

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

    Returns
    Type Description
    Controller

    Connect(Guid, ConnectionType, Boolean)

    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

    Boolean validateServerCertificate

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

    Returns
    Type Description
    Controller

    Dispose(Boolean)

    Disposes the current controller object.

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

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

    Overrides
    SDKBase.Dispose(Boolean)

    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.

    Finalize()

    Declaration
    protected void Finalize()

    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.

    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).

    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.

    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.

    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)

    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)

    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)

    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.

    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.

    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.

    Restore(String, RestoreIncludes, RestoreIgnores, RestoreIncludeControllerSettings, Boolean)

    ABB internal use only

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

    Restore(String, RestoreIncludes, RestoreIgnores, Boolean)

    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.

    Boolean 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()

    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

    SetNetworkSettings(Boolean, 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
    Boolean 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 RobotStudio.Services.RobApi.RobIPMethod.FixIP is configured.

    String subnetMask

    Subnet mask to use when RobotStudio.Services.RobApi.RobIPMethod.FixIP is configured.

    String gateway

    Default gateway to use when RobotStudio.Services.RobApi.RobIPMethod.FixIP is configured. May be left empty.

    Events

    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>

    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>

    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>

    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>

    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>

    Explicit Interface Implementations

    IController.FileSystem

    Declaration
    IFileSystem IController.FileSystem { get; }
    Returns
    Type Description
    IFileSystem

    IMastershipResource.Ensure()

    Call this method to Ensure the mastership of all(Rapid,Configuration) resources.

    Declaration
    void IMastershipResource.Ensure()

    IMastershipResource.Release()

    Call this method to release the mastership of all(Rapid,Configuration) resources.

    Declaration
    void IMastershipResource.Release()

    IMastershipResource.Request()

    Call this method to request the mastership of all(Rapid,Configuration) resources.

    Declaration
    void IMastershipResource.Request()

    IServiceProvider.GetService(Type)

    Declaration
    object IServiceProvider.GetService(Type serviceType)
    Parameters
    Type Name Description
    Type serviceType
    Returns
    Type Description
    Object

    Implements

    System.IComparable
    INamedObject
    IController
    System.IDisposable
    System.IServiceProvider
    IMastershipResourceController
    IMastershipResource
    In This Article
    Back to top Copyright © 2021 ABB