The Dashboard Server provides TCP/IP-based remote control of Universal Robots. It allows you to power on/off the robot, load and execute programs, and query robot status.

> **Legacy Protocol**: The Dashboard Server is available on **CB-series** and **e-Series** robots running Polyscope. For robots running **PolyscopeX**, use the [REST API](rest-api) instead.

## Prerequisites

### Enable Remote Mode

Your robot must be in **Remote** mode to accept commands. Toggle the switch at the top right of Polyscope:

![switch remote](/universal-robots/switch-remote.png)

### Enable Dashboard Server

The Dashboard Server must be enabled in Polyscope settings. See [Connection Setup](connect) for details.

## Quick Start

By default, `Connect()` enables the Dashboard protocol:

**C# : Dashboard**
```csharp

using UnderAutomation.UniversalRobots;

class Dashboard
{
  static void Main(string[] args)
  {
    /**/
    // Create a new robot instance
    var robot = new UR();

    // Setup connection to the robot
    var param = new ConnectParameters();
    param.IP = "192.168.0.1";

    // Optional : dashboard server is enabled by default in ConnectParameters
    param.Dashboard.Enable = true;

    //...

    // Access all commands
    robot.Dashboard.PowerOn();
    robot.Dashboard.ReleaseBrake();
    robot.Dashboard.Play();

    //...

    // Close connection to the robot
    robot.Dashboard.Disable();
    /**/
  }
}
```

### Standalone Client

Create a Dashboard client independently from `UR`:

**C# : DashboardDirect**
```csharp

using UnderAutomation.UniversalRobots.Dashboard;

class DashboardDirect
{
  static void Main(string[] args)
  {
    /**/
    // Create a dashboard client alone, outside any UR instance
    var client = new DashboardClient();

    // Set robot IP
    client.Enable("192.168.0.1");

    //...

    // Access all commands
    client.PowerOn();
    client.ReleaseBrake();
    client.Play();

    //...

    // Close connection to the robot
    client.Disable();
    /**/
  }
}
```

### Windows Example

![DashboardServer](/universal-robots/WinformsScreenshots/DashboardServer.jpg)

## Response Handling

All commands return a `CommandResponse` object:

**Members of Dashboard.CommandResponse**
```csharp
public class CommandResponse {
    public CommandResponse()

    // A message that described the error or the action done
    public string Message

    // The command as succeeded
    public bool Succeed

    // A human readable answer
    public override string ToString()
}
```

Commands with return values provide `CommandResponse<T>` with an additional `Value` property containing the result.

---

## Power Commands

### GetRobotMode

Get the current robot mode.

<Dashboard isCommand={true} method="GetRobotMode" value="RobotModes robotMode" />

**Members of Common.RobotModes**
```csharp
public enum RobotModes {
    // The robot is hand guided  by pushing teached button
    BackDrive = 6

    // The robot controller is booting
    Booting = 2

    // Robot has stopped due to a Safety Stop
    ConfirmSafety = 1

    // Robot is not connected to its controller
    Disconnected = 0

    // Power is on but breaks are not released
    Idle = 5

    // Robot is in an obsolete CB2 mode
    Other = -1

    // The robot is powered off
    PowerOff = 3

    // The robot is powered on
    PowerOn = 4

    // Robot is in normal mode
    Running = 7

    // Firmware is upgrading
    UpdatingFirmware = 8
}
```

### PowerOn

Power on the robot.

<Dashboard isCommand={true} method="PowerOn" />

### PowerOff

Power off the robot.

<Dashboard isCommand={true} method="PowerOff" />

### ReleaseBrake

Release the brakes after powering on.

<Dashboard isCommand={true} method="ReleaseBrake" />

### UnlockProtectiveStop

Unlock the robot from protective stop state.

<Dashboard isCommand={true} method="UnlockProtectiveStop" />

### Shutdown

Completely shut down the robot.

<Dashboard isCommand={true} method="Shutdown" />

---

## Program Commands

### LoadProgram

Load a program from the robot's file system.

<Dashboard isCommand={true} method="LoadProgram" arg1='"prg1.urp"' />

### GetLoadedProgram

Get the name of the currently loaded program.

<Dashboard isCommand={true} method="GetLoadedProgram" value="string loadedProgram" />

### Play

Start executing the loaded program.

<Dashboard isCommand={true} method="Play" />

### Stop

Stop program execution.

<Dashboard isCommand={true} method="Stop" />

### Pause

Pause the running program.

<Dashboard isCommand={true} method="Pause" />

### IsProgramRunning

Check if a program is currently running.

<Dashboard isCommand={true} method="IsProgramRunning" value="bool isProgramRunning" />

### GetProgramState

Get the current program state.

<Dashboard isCommand={true} method="GetProgramState" value="ProgramState state" />

**Members of Dashboard.ProgramState**
```csharp
public class ProgramState {
    public ProgramState()

    // Name of the loaded program
    public string Name

    // Running state of the loaded program
    public ProgramStates State

    public override string ToString()
}
```

### IsProgramSaved

Check if the current program has unsaved changes.

<Dashboard isCommand={true} method="IsProgramSaved" value="ProgramSaveState state" />

**Members of Dashboard.ProgramSaveState**
```csharp
public class ProgramSaveState {
    public ProgramSaveState()

    // Is the program saved
    public bool IsSaved

    // Name of the loaded program
    public string Name

    public override string ToString()
}
```

---

## User Interface Commands

### ShowPopup

Display a popup message on the teach pendant.

<Dashboard isCommand={true} method="ShowPopup" arg1='"This is a popup message !"' />

### ClosePopup

Close any open popup message.

<Dashboard isCommand={true} method="ClosePopup" />

### AddToLog

Add a message to the robot's log.

<Dashboard isCommand={true} method="AddToLog" arg1='"This is a log message !"' />

---

## Robot Information

### GetPolyscopeVersion

Get the Polyscope software version.

<Dashboard isCommand={true} method="GetPolyscopeVersion" />

### GetSerialNumber

Get the robot's serial number.

<Dashboard isCommand={true} method="GetSerialNumber" />

### GetRobotModel

Get the robot model (UR3, UR5, UR10, etc.).

<Dashboard isCommand={true} method="GetRobotModel" value="RobotModels model" />

**Members of Common.RobotModels**
```csharp
public enum RobotModels {
    UR10 = 2

    UR16 = 4

    UR20 = 7

    UR3 = 3

    UR30 = 8

    UR5 = 1
}
```

### LoadInstallation

Load an installation file.

<Dashboard isCommand={true} method="LoadInstallation" arg1='"default.installation"' />

---

## Operational Mode Commands

### GetOperationalMode

Get the current operational mode.

<Dashboard isCommand={true} method="GetOperationalMode" value="OperationalModes mode" />

**Members of Dashboard.OperationalModes**
```csharp
public enum OperationalModes {
    // Loading and editing programs and installations is not allowed, only playing programs
    Automatic = 1

    // Loading and editing programs is allowed
    Manual = 0

    // The password has not been set.
    None = 2
}
```

### SetOperationalMode

Set the operational mode.

<Dashboard isCommand={true} method="SetOperationalMode" arg1="OperationalModes.Manual" />

### ClearOperationalMode

Clear the current operational mode.

<Dashboard isCommand={true} method="ClearOperationalMode" />

### IsInRemoteControl

Check if the robot is in remote control mode.

<Dashboard isCommand={true} method="IsInRemoteControl" value="bool isRemoteControl" />

---

## Safety Commands

### GetSafetyStatus

Get the current safety status.

<Dashboard isCommand={true} method="GetSafetyStatus" value="SafetyStatus status" />

**Members of Common.SafetyStatus**
```csharp
public enum SafetyStatus : byte {
    AutomaticModeSafeguardStop = 10

    // Safety is in fault mode
    Fault = 9

    // Safety is in normal operating conditions
    Normal = 1

    // Protective safeguard Stop. This safety function is triggeredby an external protective device using safety inputs which will trigger a Cat 2 stop3per IEC 60204-1.
    ProtectiveStop = 3

    // When a safety limit is violated, the safety system must be restarted.
    Recovery = 4

    // Speed is reduced
    Reduced = 2

    // (EA + EB + SBUS-&gt;Screen) Physical e-stop interface input activated
    RobotEmergencyStop = 7

    // (SI0 + SI1 + SBUS) Physical s-stop interface input
    SafeguardStop = 5

    // (EA + EB + SBUS-&gt;Euromap67) Physical e-stop interface input activated
    SystemEmergencyStop = 6

    SystemThreePositionEnablingStop = 11

    // Safety is in violation mode (for example, violation of the allowed delay between redundant signals)
    Violation = 8
}
```

### CloseSafetyPopup

Close any safety-related popup.

<Dashboard isCommand={true} method="CloseSafetyPopup" />

### RestartSafety

Restart the safety system after a safety fault.

<Dashboard isCommand={true} method="RestartSafety" />

---

## Protocol Reference

| Property | Value |
|----------|-------|
| Port | 29999 |
| Protocol | TCP/IP |
| Documentation | [Universal Robots Dashboard Server](https://www.universal-robots.com/articles/ur/dashboard-server-cb-series-port-29999/) |