# Introduction

**Robpod Studio** is an integrated development environment for Collaborative Robotics and Artificial Inelligence applications.

Supported robots are **Universal Robots** and **Doosan Robotics**.

Robpod Studio is based on [PyCharm](https://www.jetbrains.com/pycharm/) platform provided by [JetBrains](https://www.jetbrains.com/). You can reffer to [PyCharm Docs](https://www.jetbrains.com/help/pycharm/quick-start-guide.html) for general purpose usage and documentation.&#x20;

In this guide you will find Robpod Studio specific documentation for robotics related topics.

Robpod Studio is available for Windows, macOS, and Linux operating systems.

## Take a Tour

Before you start take a tour of Robpod Studio main features.

{% embed url="<https://youtu.be/DS31s1qcUw0>" %}

## Get Started

[Download](/get-started/download) and [Install](/get-started/installation) Robpod Studio to get started with the development platform.

Check the [First Steps](/get-started/first-steps) guide to learn how to create your first project.

## Robpod Studio Features

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center">Robot</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FtLdrjEAI8qkqtZGMGwpz%2Fcard-robot.png?alt=media&amp;token=0e379a62-87bf-400c-852f-787364092937">card-robot.png</a></td><td><a href="/robot/robot-toolbar">ROBOT</a></td></tr><tr><td align="center">Advanced Scripting</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FZ5OtJspSrGdXXXChIvWs%2Fcard-scripting.png?alt=media&amp;token=a3bfd18a-3f07-43da-b452-808fed5784df">card-scripting.png</a></td><td><a href="/advanced-scripting/live-auto-completion">Advanced Scripting</a></td></tr><tr><td align="center">Synchronization</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FSrPJduMNW7we53p8q7fF%2Fcard-synchronize.png?alt=media&amp;token=cd563f59-6ea7-4e25-bcfe-49bc0a477302">card-synchronize.png</a></td><td><a href="/synchronization/upload-on-robot">Synchronization</a></td></tr><tr><td align="center">Simulation</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FuNIDpJLf3MmxLZuuUw1k%2Fcard-simulator.jpg?alt=media&amp;token=94271023-fd69-435a-93c7-93426cb45493">card-simulator.jpg</a></td><td><a href="/simulation/connect-a-simulator">Simulation</a></td></tr><tr><td align="center">AI CoWorker</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FLN7Jtd08PRQzYHeANJOV%2Faaaaaaaaa.png?alt=media&amp;token=956b5d02-43ba-497d-82e2-4389e2aa2529">aaaaaaaaa.png</a></td><td><a href="/ai-coworker/introduction">Introduction</a></td></tr><tr><td align="center">HMI Designer</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FHDHWr6VrGJ8WMK7IouTn%2Fcard-hmi-designer.jpg?alt=media&amp;token=60ab8d6b-ca14-474f-9dbb-10169b4e583b">card-hmi-designer.jpg</a></td><td><a href="/hmi-designer/introduction">HMI Designer</a></td></tr></tbody></table>


# Download

Download for Robpod Studio is available in two formats: **Robpod Studio Platform** and **Robpod Studio Plugin**.

* **Robpod Studio Platform** comes with everything you need to develop robotics applications already installed.
* **Robpod Studio Plugin** is just the Plugin component that must be installed on your existing PyCharm installation.

## Latest Release

<table data-card-size="large" data-view="cards"><thead><tr><th align="center"></th><th align="center"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center">Download</td><td align="center">Robpod Studio Platform</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FX1BkUUEhtnlYs8PxJWn5%2Fcard-download-platform.png?alt=media&amp;token=8254e045-cf40-493b-83ab-92d20d361099">card-download-platform.png</a></td><td><a href="https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-platform.zip">https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-platform.zip</a></td></tr><tr><td align="center">Download</td><td align="center">Robpod Studio Plugin</td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F6Z86rLhCa82f5lkaJoek%2Fcard-download-plugin.png?alt=media&amp;token=d37e0594-0abf-479b-8040-c69c3a759325">card-download-plugin.png</a></td><td><a href="https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-plugin.zip">https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-plugin.zip</a></td></tr></tbody></table>

## Robot Plugins

<table><thead><tr><th width="195.4000244140625">ROBOT</th><th width="200.79998779296875" align="center">PLUGIN DOWNLOAD</th><th>INSTRUCTIONS</th></tr></thead><tbody><tr><td><strong>Universal Robots Polyscope 5</strong></td><td align="center"><a href="http://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-plugin.urcap" class="button primary" data-icon="square-down">URCAP</a></td><td><a data-mention href="/appendix/robot-specific-functions/universal-robots/installing-robpod-plugin">Installing Robpod Plugin</a></td></tr><tr><td><strong>Universal Robots Polyscope X</strong></td><td align="center"><a href="http://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-plugin.urcapx" class="button primary" data-icon="square-down">URCAPX</a></td><td><a data-mention href="/appendix/robot-specific-functions/universal-robots/installing-robpod-plugin">Installing Robpod Plugin</a></td></tr><tr><td><strong>Doosan Robotics Integrated Controller</strong> </td><td align="center"><a href="http://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-plugin.dm" class="button primary" data-icon="square-down">DART  </a></td><td><a data-mention href="/appendix/robot-specific-functions/doosan-robotics/installing-robpod-plugin">Installing Robpod Plugin</a></td></tr></tbody></table>

## Other Releases

You can find and download previous releases on Robpod Studio [GitHub repository](https://github.com/robpodcloud/robpod-studio/releases).


# Installation

Robpod Studio is available with two installation option: **Robpod Studio Platform** and **Robpod Studio Plugin.**

* **Robpod Studio Platform** comes with everything you need to develop robotics applications already installed.
* **Robpod Studio Plugin** instead is just the Plugin component that must be installed on your existing PyCharm installation.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Install Platform</strong></td><td>Windows </td><td><a href="/get-started/installation/install-platform">Install Platform</a></td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FX1BkUUEhtnlYs8PxJWn5%2Fcard-download-platform.png?alt=media&amp;token=8254e045-cf40-493b-83ab-92d20d361099">card-download-platform.png</a></td></tr><tr><td><strong>Install Plugin</strong></td><td>Windows, macOS, Linux.</td><td><a href="/get-started/installation/install-plugin">Install Plugin</a></td><td><a href="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F6Z86rLhCa82f5lkaJoek%2Fcard-download-plugin.png?alt=media&amp;token=d37e0594-0abf-479b-8040-c69c3a759325">card-download-plugin.png</a></td></tr></tbody></table>

{% hint style="info" %}
Windows users can choose both Platform or Plugin. While macOS and Linux users should use the Plugin option.
{% endhint %}


# Install Platform

Follow these steps to install Robpod Studio **Platform**.&#x20;

1. &#x20;[Download ](https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-platform.zip)Robpod Studio installer **.exe**.
2. Run the installer and follow the wizard steps.

To run Robpod Studio, find it in the Windows Start menu or use the desktop shortcut. You can also run the launcher batch script or executable in the installation directory under bin.

When you run Robpod Studio for the first time, you can take [several steps](/get-started/first-steps) to complete the installation, customize your instance, and start working with the IDE.


# Install Plugin

Follow these steps to install Robpod Studio **Plugin** on your existing PyCharm installation.&#x20;

You can install Robpod Studio Plugin in two different ways:&#x20;

* Plugin .zip installer
* Plugin Repository URL

{% tabs %}
{% tab title="Plugin Installer" %}

1. [Download](http://download.jetbrains.com/python/pycharm-community-2023.2.exe) PyCharm Community 2023.2.
2. Run the installer and follow the wizard steps.
3. Run PyCharm. To run PyCharm, find it in the Windows Start menu or use the desktop shortcut. You can also run the launcher batch script or executable in the installation directory under bin.
4. [Download ](https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-plugin.zip)Robpod Studio Plugin installer **.zip**.
5. Inside Pycharm navigate to **File -> Settings -> Plugins -> Install Plugin from disk...**

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsuIYVh2NhHmfjEbJWa2c%2Finstall-plugin-numbers.png?alt=media&amp;token=6211e4c9-6f5c-4e1e-8cd4-1761c243a942" alt=""><figcaption></figcaption></figure>
6. Select Robpod Studio Plugin **.zip** file.
7. OK.
8. Restart PyCharm.
   {% endtab %}

{% tab title="Plugin Repository" %}

1. [Download](https://download.jetbrains.com/python/pycharm-community-2023.2.7.exe?_gl=1*5zilwi*_gcl_au*NjQzNTY1NzQxLjE3MTg2OTY5MjE.*_ga*MTc3Njg1NTkzNS4xNzE4Njk2OTE4*_ga_9J976DJZ68*MTcxOTA3MDU0OS4yLjEuMTcxOTA3MDcwOS4yMi4wLjA.&_ga=2.14101631.996091142.1719070550-1776855935.1718696918)[ ](https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-studio-setup.exe)PyCharm Community.
2. Run the installer and follow the wizard steps.
3. Run PyCharm. To run PyCharm, find it in the Windows Start menu or use the desktop shortcut. You can also run the launcher batch script or executable in the installation directory under bin.
4. Inside Pycharm navigate to **File -> Settings -> Plugins -> Manage Plugin Repositories...**

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FmBUAhZtyPVcTMg2U6e4I%2Finstall-plugin-repo-numbers.png?alt=media&amp;token=9aba55c7-9e9a-4b86-85eb-6cd361329724" alt=""><figcaption></figcaption></figure>
5. Add Robpod Repository URL: `https://raw.githubusercontent.com/robpodcloud/robpod-studio/main/repository/updatePlugins.xml`
6. Open the Marketplace tab and search for Robpod Studio.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsVchO94wNJxGRIori69M%2Finstall-plugin-repo-2-numbers.png?alt=media&amp;token=658828c0-a66e-4055-b625-34ab61174aae" alt=""><figcaption></figcaption></figure>
7. Install.
8. OK.
9. Restart Pycharm.
   {% endtab %}
   {% endtabs %}

When you run Robpod Studio for the first time, you can take [several steps](/get-started/first-steps) to complete the installation, customize your instance, and start working with the IDE.


# First Steps


# Choose Studio Flavor

Robpod Studio provides specific features and a customized experience for each robot brand.&#x20;

The robot brand and its associated experience is called **Flavor**.&#x20;

When opening Robpod Studio for the first time you will be requested to choose your preferred **Flavor**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F1KVyQ8GfjwztU7j6hIQE%2Fchoose-flavor.PNG?alt=media&amp;token=c7478a77-7902-4c71-a23e-626d157bfa6b" alt=""><figcaption></figcaption></figure>

You will be able to change Robpod Studio Flavor later on the [connection](/robot/robot-toolbar/connect-the-robot) pannel.

{% hint style="info" %}
Check the list of [supported robot brands](/appendix/supported-robots) to see if your robot is already available inside Robpod Studio.
{% endhint %}


# Welcome Screen

A Welcome screen is displayed when no project is opened. For example, when you run Robpod Studio for the first time, or when you close the only open instance of a project. From this screen, you can [create a new project,](/get-started/first-steps/create-a-project) [import](https://www.jetbrains.com/help/pycharm/importing-project-from-existing-source-code.html), open, or [check out](https://www.jetbrains.com/help/pycharm/version-control-integration.html) an existing project from version control.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FXNvQ7jhMrKOHlISvKIos%2Fwelcom-screen.png?alt=media&amp;token=6d1835d3-f8d0-4111-bd77-98b533e69e88" alt=""><figcaption></figcaption></figure>

Click **New Project** to start developing your applications.


# Create a Project

A **project** is the container of all files and scripts composing your robotic application.

To create a new project, if you’re on the[ Welcome screen](/get-started/first-steps/welcome-screen), click **New Project**. If you’ve already got any project open, choose **File -> New Project** from the main menu.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Ft24FkgOy0d5x7TOrah86%2Fcreate-new-poject-numbers.png?alt=media&amp;token=02b84a5c-8b87-4803-bc28-57426399ccce" alt=""><figcaption></figcaption></figure>

1. Choose a **path location** for your project.
2. Choose the enviornment type you prefer. **Virtualenv** is the preferred Python environment to run correctly Robpod Studio simulations.
3. Choose the **Python Interpreter**. Available Python interpreters on your machine will be displayed. If no Python interpreter can be detected on your machine, Robpod Studio will help to download and install one of the latest Python versions.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4ZLs9FY4uNHSFvhIeezO%2Fimmagine.png?alt=media&amp;token=076ef114-3623-411f-9ee9-8f31c4ee9671" alt=""><figcaption></figcaption></figure>
4. Create.


# Create a Script

Robot programs can be created and edited inside Robpod Studio as **script** files. To create your first robot script:

1. Right click on **project folder ->  New -> UR Script File** or **Doosan Script File.**

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F3cNK8tqPi6VH5JTCNdOM%2Fcreate-new-script-2.png?alt=media&amp;token=2e713772-aaa9-4862-9fd9-9519f1dcc92b" alt=""><figcaption></figcaption></figure>
2. Enter the name of your script file.
3. Start [editing ](/advanced-scripting/live-auto-completion)the robot script.

{% hint style="info" %}
Each robot brand has his own associated script type. Unviseral Robots is associated with the **.script** file type and Doosan Robotics with **.py** file type.
{% endhint %}


# User Interface

When you open a project in Robpod Studio, the default user interface looks as follows:

{% tabs %}
{% tab title="New UI" %}

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FddzG5MCyNozN5e04rQDe%2Fuser-interface-2.png?alt=media&amp;token=77d0363f-6d1a-4066-a442-d5abacaae477" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Classic UI" %}

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FO9fNMtDJUW6YjUsMW2M9%2Fuser-interface-labels.png?alt=media&amp;token=0ed95ae3-b952-4408-a31e-d722ba584c35" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Main Toolbar

Top level menu and actions can be acessed using the main Toolbar.

#### Project Explorer

All files and scripts composing your robotic application are displayed in the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FoQowtg7DsY91WUux8uCD%2FtoolWindowProject.png?alt=media\&token=18643b63-7d7a-4e8f-b314-a534be83c33d) **Project Explorer**. You can use the Project Explorer to navigate and keep your contents organized.

#### Robot Toolbar

Top level Robot related actions are provided by the [Robot Toolbar](/robot/robot-toolbar). With this toolbar you can connect to the robot, acquire robot positions and excecute or simulate robot scripts.&#x20;

#### Script Editor

Use the [Script Editor](/advanced-scripting/live-auto-completion) to to read, write, and explore your source code .

#### Code Autocompletion

[Code autocompletion](/advanced-scripting/live-auto-completion) is a powerfull feature to speed up your robotic application development. Functions and current real/simulated robot positions are automatically sugested to compose your code.

#### Notification Tool Window

Important Notification regarding robot or editor status are displayed inside the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjPHiUajbiqh6cSm5DHSx%2Fnotifications.svg?alt=media\&token=f5490a1b-79c3-4ca5-ad27-485ecc5d3424) **Notification Tool Window**.

#### Variables Tool Windows

Global and installation variables can be configured inside the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fm1hF0SwGmF1QYVJDBGFM%2Fvariables.png?alt=media\&token=517ff97c-af81-49bd-83ae-82cae9cfcf11) [Variables Tool Window](/robot/robot-variables).

#### Robot Tool Window

Detailed robot view for monitoring and debuging real robot status is provided by the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) [Robot Tool Window](/robot/robot-tool-window).

#### Simulator Tool Window

Off-line simulation and programming can be managed using ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FFC12ggMbi4My96A9MKVd%2Fsimulator\(1\).png?alt=media\&token=ba6d2889-8112-4efa-85c2-4e7e9fd94d9f) [Simulator Tool Window](/simulation/connect-a-simulator).

#### Logs Tool Window

Robot logs and messages are displayed in the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FzSLp4epcMpAmwPabxe2a%2FlistFiles.png?alt=media\&token=44d56315-3558-4e22-851d-561db4d0aa1d) [Logs Tool Window](/robot/robot-logs).


# New UI

The new user interface (UI) is a new redesigned look of PyCharm. It has been created to reduce visual complexity, provide easy access to essential features, and progressively disclose complex functionality as needed – resulting in a cleaner look and feel.

Among the key changes are the simplified main toolbar, new tool window layout, new themes, and updated icons.

<div><figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fu0ZnJpZ2NFkH8aTU8HQ9%2Fnew-ui.png?alt=media&amp;token=c92f4783-8a21-4705-b2ec-c30ee093921d" alt=""><figcaption><p>New UI</p></figcaption></figure> <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FVaX9loi1yW8pLSqAaE4x%2Fold-ui.PNG?alt=media&amp;token=7b26fbb4-41cf-4325-bd35-0cdec3bfd752" alt=""><figcaption><p>Classic UI</p></figcaption></figure></div>

#### Enable the new UI﻿ <a href="#enable_new_ui" id="enable_new_ui"></a>

1. Press **Ctrl+Alt+S** to open the IDE settings and then select Appearance\&Behavior | New UI.
2. Select the Enable new UI checkbox and apply the changes. Restart the IDE.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjbPH98pBbT3iL4Vi9GVV%2Fimmagine.png?alt=media&amp;token=ee53419c-4706-4a5d-ac71-15471e411436" alt=""><figcaption></figcaption></figure>


# Robpod Studio Assistant

Since PyCharm collects so many features, for new users it can become difficult to find specific features for robots. For this reason, you can open the <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FHs9wjN1fiD7DyrvwJU3y%2Frobpod-icon-280.png?alt=media&amp;token=e7bd769c-e5af-4605-a0ad-c0d1c3b27afe" alt="" data-size="line">  **Robpod Studio Assistant** tool from the [robot toolbar](/robot/robot-toolbar) to view in just one place all robot related actions.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FGsmkarwgk0qFOjMp8iIF%2Frobpod-studio-assistant-v2.png?alt=media&amp;token=abaf73c9-5f48-4220-8e50-a19c8d31bcbf" alt=""><figcaption></figcaption></figure>


# License

#### Trial License

When you install Robpod Studio for the first time you will get a free **Trial License** for 15 days. Trial license has no features limitation and can be used to evaluate the product.

To view current license settings go to **File -> Settings -> Robpod -> License.**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4vEDqN9SsVcIdYrOV48e%2Flicense-settings.png?alt=media&amp;token=cd93c7d8-6642-4276-adb6-906aaec035a6" alt=""><figcaption></figcaption></figure>

After 15 days of evaluation you will need a [profesional license](/get-started/license/buy-a-license) to use Robpod Studio.


# Buy a License

#### Get a License

You can buy a license on [Robpod website](https://www.robpod.cloud/#pricing), two license plans are available.

|                                                                                                PRO License                                                                                                |                                                                                                  LTS License                                                                                                 |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|                                                                **One Year** Professional license with all Robpod Studio features included.                                                                |                                                           Extended **Three Years** Professional license with all Robpod Studio features included.​                                                           |
| After one year, all developed programs, scripts and HMI will continue to work even after license expires. You will need to renew the license only if you need to modify the programs ore create new ones. | After three years, all developed programs, scripts and HMI will continue to work even after license expires. You will need to renew the license only if you need to modify the programs ore create new ones. |

You can pay online with Credit or Debit Card, Apple Pay, Google Pay or many other common wallets systems. [Contact us](mailto:info@robpod.cloud) if your prefer to pay by upfront invoice.

After sucessful checkout you will receive an email with your **License Key**:

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FEIdsVrENkpnF0Jt5vJm2%2Femail-license-key.PNG?alt=media&amp;token=d47354ea-1e24-4c23-ac78-edde188cd3d7" alt=""><figcaption></figcaption></figure>

Store your License Key in a safe place and don't share it with others.

#### Floating Licenses

All Robpod Studio licenses are **floating**, this means that you can install the same license on **multiple** PC, but you can use just one PC at time. If you need to use Robpod Studio on multiple machines at the same time, you will need to buy multiple licenses.

**Deveoper Based Licenses**

All Robpod licenses are also **development based**, which means you will only need a valid license during the development phases of your application. When the license expires all your developed programs will continue to run without the necessity of renew the license. All developed programs, scripts and HMI will continue to work even after license expires. You will need to renew the license only if you need to modify the programs.

{% hint style="info" %}
For further information regarding Robpod License check the [License FAQ ](/other/license-faq)section.&#x20;
{% endhint %}


# Install a License

Once you have a [License Key](/get-started/license/buy-a-license) you can proceed to install the license on your Robpod Studio installation.

1. Go to **File -> Settings -> Robpod -> License** or directly on the license popup that appears at startup, and choose **Install New License**.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDNQh9Ck5ug1OOMmLsDqK%2Finstall-new-license.PNG?alt=media&amp;token=cd790457-05f6-4279-8ac6-96f5fab8dd11" alt=""><figcaption></figcaption></figure>
2. Insert the License Key.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjEF1RGfEDT56T2908sxf%2Finstall-license-key.PNG?alt=media&amp;token=6ac59dc2-146b-4cf1-999a-bb21838d540a" alt=""><figcaption></figcaption></figure>
3. New license data will be displayed. Finally you need to activate the license on the current machine. Click on **Activate**.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FZh7ySCKRAOXYyWucKgt2%2Fnew-license-data.PNG?alt=media&amp;token=71ccdb35-ad72-43bc-8ddf-ab6745eb4cde" alt=""><figcaption></figcaption></figure>
4. After sucessfull activation, license complete set of data will be displayed.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FHHqpKmn1EjaZiae4lcin%2Factivated-license.PNG?alt=media&amp;token=49199ab5-3579-4947-a16b-2580a818bde7" alt=""><figcaption></figcaption></figure>

#### Floating Licenses

All Robpod Studio licenses are **floating**, this means that you can install the same license on **multiple** PC, but you can use just one PC at time. If you need to use the same license on another device remember first to **Deactivate** the license on the current device. Once the license is deactivated, you will be able to activate it on an other machine.

#### OnLine Validation

OnLine validation is a process needed to check the validity of your Robpod Studio license. Validation is performed automatically when an Internet connection is available.&#x20;

If too much time has passed since last license validation, an Internet connection will be asked to perform the validation. You can check the remaining days before next validation is required on license settings panel.

{% hint style="info" %}
For further information regarding Robpod License check the [License FAQ ](/other/license-faq)section.&#x20;
{% endhint %}


# Safety

Robpod Studio is a tool for programming industrial and collaborative robots. A robot is heavy and extremely powerful regardless of its speed. A pause or long stop in movement can be followed by a fast hazardous movement. Even if a pattern of movement is predicted, a change in operation can be triggered by an external signal resulting in an unexpected movement.

Therfore:

1. All general safety regulations based on your local country must be respected while programming the robot (i.e. Machinery Directive 2006/42/EC and ISO/TS 15066).
2. Robot specific instructions provided by robot constructors must be respected.&#x20;

Robpod Studio can execute motion programs on the robot or perform motion operation. In the following guide all actions that trigger a robot motion are marked with <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2YkhehrVXOU68s8yLM2o%2Fwarning.png?alt=media&amp;token=82dc315c-09f0-48c4-894c-b68e027b144a" alt="" data-size="line"> warning signal.


# Robot Toolbar

After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), Roobt Toolbar will be available:

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F7QtSpKyXAs368GU7d5bD%2Frobot-toolbar.png?alt=media&amp;token=9a5e029b-8973-42dd-80ce-cf1c809e2b34" alt=""><figcaption></figcaption></figure>

Use the **Robot Toolbar** to execute high level robot actions.

<table data-header-hidden><thead><tr><th width="240"></th><th></th></tr></thead><tbody><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxcicmhhTHjBRO5M4JFEF%2Fdisconnect.png?alt=media&amp;token=18838e5e-66e2-446b-9730-5fd10160bc5a" alt=""> <a href="/robot/robot-toolbar/connect-the-robot">Connect Robot</a></td><td>Connect to a real robot device.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDnKyoJkdTUzisxQHgTVu%2Frefresh_robot.png?alt=media&amp;token=2c94047b-b682-4c5d-a5c4-58667f35f478" alt=""> <a href="/robot/robot-toolbar/control-the-robot">Reset Robot</a></td><td>Refresh robot state, clear errors, power on servos.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lY4qpV8utfO6RK7W0b0%2Fjoint_pose.png?alt=media&amp;token=5a205e61-fce2-47b3-a486-f414d84ba0cb" alt=""> <a href="/robot/robot-toolbar/get-positions">Joints Pose</a></td><td>Add current robot joint pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fd0VExtMny7Vfb9k001io%2Ftask_pose.png?alt=media&amp;token=896a4516-fd59-4797-a273-dba8fff8f1dd" alt=""> <a href="/robot/robot-toolbar/get-positions">Tool Pose</a></td><td>Add current robot tool pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FS8XqHMI81DceXqfSheJy%2Fmovej.png?alt=media&amp;token=b97f9b00-bdb3-42ac-a267-0ace63c90f4b" alt=""> <a href="/robot/robot-toolbar/get-positions">MoveJ</a></td><td>Add MoveJ with current robot joint pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FmGSbGjHYRYK1xNMEOBj0%2Fmovel.png?alt=media&amp;token=2652eeec-6d8d-4f06-a926-88c325a64ddf" alt=""> <a href="/robot/robot-toolbar/get-positions">MoveL</a></td><td>Add MoveL with current robot tool pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FfM9MpgdSBkov1eqk2jru%2Fmove_to.png?alt=media&amp;token=346a6d3c-98e2-48db-8668-976c0e857c64" alt=""> <a href="/robot/robot-toolbar/move-to">Move To</a></td><td><p>Move robot to selected target position.</p><p><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2YkhehrVXOU68s8yLM2o%2Fwarning.png?alt=media&amp;token=82dc315c-09f0-48c4-894c-b68e027b144a" alt="" data-size="line"> Warning: This action executes a robot motion.</p></td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsmZfU3gbqU03BLZfDoT9%2Frun.png?alt=media&amp;token=0cb15a05-c08a-4216-917f-e15ecb12c7b2" alt=""> <a href="/robot/robot-toolbar/run-a-script">Run On Robot</a></td><td><p>Run the current script on connected robot.</p><p><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2YkhehrVXOU68s8yLM2o%2Fwarning.png?alt=media&amp;token=82dc315c-09f0-48c4-894c-b68e027b144a" alt="" data-size="line"> Warning: This action executes robot motions.</p></td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2DuRqVv2ot9qewsnvqCm%2Fpause.png?alt=media&amp;token=d87c7497-6502-4385-a0b5-4fb7f09afc01" alt=""> <a href="/robot/robot-toolbar/run-a-script">Pause Task</a></td><td>Pause current running task on the robot.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FA7hpu5K7RKdLEDtLPCeh%2Fsuspend.png?alt=media&amp;token=ff8467bf-9acf-49a4-8ae4-51dd2bd0800a" alt=""> <a href="/robot/robot-toolbar/run-a-script">Stop Task</a></td><td>Stop current running task on the robot.</td></tr></tbody></table>


# Connect the Robot

You can use the [Robot Toolbar](/robot/robot-toolbar) to connect Robpod Studio to your robot and perform on-line programming.

{% tabs %}
{% tab title="Universal Robots" %}

### Before Connecting

1. Check your [Network Configuration](/appendix/network-configuration).
2. Setup robot [Security Settings](/appendix/security-settings).
3. [Install Robpod Plugin](/appendix/robot-specific-functions/universal-robots/installing-robpod-plugin) on the robot.

### Connect the Robot

1. Click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxcicmhhTHjBRO5M4JFEF%2Fdisconnect.png?alt=media\&token=18838e5e-66e2-446b-9730-5fd10160bc5a) **Connect** from the [Robot Toolbar](/robot/robot-toolbar).
2. Choose **Universal Robots** as robot brand.
3. Insert robot IP address or click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fc3cTcB4ptEOuvWtiDQut%2Fsearch.png?alt=media\&token=340bc706-3d09-4770-95c0-18a07a923d7f) **Scan Network** to automatically detect your robot.
4. Click on **Connect**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fgvb1bHbN6qtnia0OfJ9g%2Fconnect-dialog.png?alt=media&amp;token=8c9bd16e-349b-41bb-a532-e1f3e594fc33" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Doosan Robotics" %}

### Before Connecting

1. Check your [Network Configuration](/appendix/network-configuration).
2. Install [Robpod Plugin](/appendix/robot-specific-functions/doosan-robotics/installing-robpod-plugin) on the robot.

### Connect the Robot

1. Click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxcicmhhTHjBRO5M4JFEF%2Fdisconnect.png?alt=media\&token=18838e5e-66e2-446b-9730-5fd10160bc5a) **Connect** from the [Robot Toolbar](/robot/robot-toolbar).
2. Choose **Doosan Robotics** as robot brand.
3. Insert robot IP address or click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fc3cTcB4ptEOuvWtiDQut%2Fsearch.png?alt=media\&token=340bc706-3d09-4770-95c0-18a07a923d7f) **Scan Network** to automatically detect your robot.
4. Click on **Connect**.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FrQ0hxLmP68PzxQZLIw4z%2Fimmagine.png?alt=media&amp;token=27585690-5cc2-43fd-ad06-ad6be8fe8ce9" alt="" width="347"><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=DWU2Xwwatp0>" %}
{% endtab %}
{% endtabs %}


# Control the Robot

Once [connected](/robot/robot-toolbar/connect-the-robot), you can take control of the robot inside Robpod Studio using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDnKyoJkdTUzisxQHgTVu%2Frefresh_robot.png?alt=media\&token=2c94047b-b682-4c5d-a5c4-58667f35f478) **Reload Robot** icon. This opeation will:

* Clear robot allarms that do not requires manual intervention
* Give power to the robot
* Disengage robot breaks

{% hint style="info" %}
Many robots require to acquire an operational grant before allowing to perform control actions. Check following guide with specific instructions for each supported robot brand.
{% endhint %}

{% tabs %}
{% tab title="UR Polyscope 5" %}
Universal Robot e-series requires to obtain an operational grant before controlling the robot.

1. [Connect ](/robot/robot-toolbar/connect-the-robot)the robot.
2. On robot teach pendant, go to **Settings -> System -> Remote Control** and enable remote control.
3. When you want to control the robot from Robpod Studio switch to **remote control mode** using <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fg3C0ZQOCy4EjDNhR1FiT%2Fimmagine.png?alt=media&amp;token=a4d943c0-4960-47cd-bad9-147ffd27803e" alt="" data-size="line"> / <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FvpykcLUcQJhybkgf9owi%2Fimmagine.png?alt=media&amp;token=cda23c00-28dc-4956-8fed-883dfbbd324a" alt="" data-size="line"> icon.&#x20;
4. Click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDnKyoJkdTUzisxQHgTVu%2Frefresh_robot.png?alt=media\&token=2c94047b-b682-4c5d-a5c4-58667f35f478) **Reload Robot** to power it on.

{% embed url="<https://youtu.be/cjchUKaVanw>" %}
{% endtab %}

{% tab title="UR Polyscope 3" %}
Universal Robot CB series do not require to obtain an operational grant.

You can take control of the robot simply clicking on the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDnKyoJkdTUzisxQHgTVu%2Frefresh_robot.png?alt=media\&token=2c94047b-b682-4c5d-a5c4-58667f35f478) *Reload Robot* icon.

{% embed url="<https://youtu.be/ImtoRP68cKQ>" %}
{% endtab %}

{% tab title="UR Polyscope X" %}
Universal Robots with Polyscope X requires to obtain an operational grant before controlling the robot.

1. [Connect ](/robot/robot-toolbar/connect-the-robot)the robot.
2. On robot teach pendant, go to **Safety Overview -> Mode Selection** and select **Automatic** mode.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FLdUaEpKV9iT1vPycT9Nr%2Fhint_ur_remote_connection_x_step1.gif?alt=media&amp;token=7a177a51-032e-4c4a-9e38-907383ebfa69" alt=""><figcaption></figcaption></figure>
3. Then select **Remote** as Control Mode.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FZRuXBEiOQMBn49peTx60%2Fhint_ur_remote_connection_x_step2.gif?alt=media&amp;token=75e723fa-5e33-443c-b20e-7dd11d827708" alt=""><figcaption></figcaption></figure>

{% endtab %}

{% tab title="Doosan Robotics" %}
Doosan Robotics cobots require to obtain an operational grant before controlling the robot.

1. [Connect ](/robot/robot-toolbar/connect-the-robot)the robot.
2. Click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDnKyoJkdTUzisxQHgTVu%2Frefresh_robot.png?alt=media\&token=2c94047b-b682-4c5d-a5c4-58667f35f478) **Reset Robot** to ask for robot control.
3. On robot teach pendant click on **Accept** to transfer robot control.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FP19JtL01HYRzVSORcyB7%2Fdoosan-transfer-control.PNG?alt=media&amp;token=b2ed1b11-33c8-4ba2-a83f-25d77b80e745" alt=""><figcaption></figcaption></figure>

This will turn on robot servos and give robot control to Robpod Studio.
{% endtab %}
{% endtabs %}


# Get Positions

When [connected ](/robot/robot-toolbar/connect-the-robot)to the robot, you can use ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lY4qpV8utfO6RK7W0b0%2Fjoint_pose.png?alt=media\&token=5a205e61-fce2-47b3-a486-f414d84ba0cb), ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fd0VExtMny7Vfb9k001io%2Ftask_pose.png?alt=media\&token=896a4516-fd59-4797-a273-dba8fff8f1dd), ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FS8XqHMI81DceXqfSheJy%2Fmovej.png?alt=media\&token=b97f9b00-bdb3-42ac-a267-0ace63c90f4b), ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FmGSbGjHYRYK1xNMEOBj0%2Fmovel.png?alt=media\&token=2652eeec-6d8d-4f06-a926-88c325a64ddf) actions to easily add current robot positions to you robot script.  &#x20;

You can use free drive or robot teach pendant to Jog the robot, it is not required to have operational grant in order to acquire robot positions.

<table data-header-hidden><thead><tr><th width="178"></th><th></th></tr></thead><tbody><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lY4qpV8utfO6RK7W0b0%2Fjoint_pose.png?alt=media&amp;token=5a205e61-fce2-47b3-a486-f414d84ba0cb" alt=""> <strong>Joint Pose</strong></td><td>Add current joint pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fd0VExtMny7Vfb9k001io%2Ftask_pose.png?alt=media&amp;token=896a4516-fd59-4797-a273-dba8fff8f1dd" alt=""> <strong>Tool Pose</strong></td><td>Add current cartesian tool pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FS8XqHMI81DceXqfSheJy%2Fmovej.png?alt=media&amp;token=b97f9b00-bdb3-42ac-a267-0ace63c90f4b" alt=""> <strong>MoveJ</strong></td><td>Add MoveJ with current joint pose to script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FmGSbGjHYRYK1xNMEOBj0%2Fmovel.png?alt=media&amp;token=2652eeec-6d8d-4f06-a926-88c325a64ddf" alt=""> <strong>MoveL</strong></td><td>Add MoveL with current cartesian tool pose to script.</td></tr></tbody></table>

{% embed url="<https://youtu.be/pUYM_f84wMw>" %}

{% hint style="info" %}
You can further speed up your development process using [Live Auto Completion](/advanced-scripting/live-auto-completion) feature.
{% endhint %}


# Move To

When you have [acquired robot control](/robot/robot-toolbar/control-the-robot), you can move to robot to a target position using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FfM9MpgdSBkov1eqk2jru%2Fmove_to.png?alt=media\&token=346a6d3c-98e2-48db-8668-976c0e857c64) **Move To** action.

On the robot script just place the cursor on the position you want to reach, then right click and select ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FfM9MpgdSBkov1eqk2jru%2Fmove_to.png?alt=media\&token=346a6d3c-98e2-48db-8668-976c0e857c64) **Move To** action.

<img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2YkhehrVXOU68s8yLM2o%2Fwarning.png?alt=media&amp;token=82dc315c-09f0-48c4-894c-b68e027b144a" alt="" data-size="line"> Warning! this command will execute a robot motion.

{% tabs %}
{% tab title="Universal Robots" %}
{% embed url="<https://www.youtube.com/watch?v=3U7b-uTeb38>" %}
{% endtab %}

{% tab title="Doosan Robotics" %}
{% embed url="<https://youtu.be/F6CZoLo4R3I>" %}
{% endtab %}
{% endtabs %}


# Run a Script

When you have [robot control](/robot/robot-toolbar/control-the-robot), you can execute a robot script with the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsmZfU3gbqU03BLZfDoT9%2Frun.png?alt=media\&token=0cb15a05-c08a-4216-917f-e15ecb12c7b2)**Run On Robot** action.

Select the script you want to execute and click on![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsmZfU3gbqU03BLZfDoT9%2Frun.png?alt=media\&token=0cb15a05-c08a-4216-917f-e15ecb12c7b2)**Run On Robot** from the [robot tool bar](/robot/robot-toolbar).

&#x20;<img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2YkhehrVXOU68s8yLM2o%2Fwarning.png?alt=media&amp;token=82dc315c-09f0-48c4-894c-b68e027b144a" alt="" data-size="line"> Warning! this command will execute a robot motion.

{% hint style="info" %}
A script is selected when its name is highlighted with blue underscore.

![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fl2xnUoKt7RBnWs8sZ79s%2Fimmagine.png?alt=media\&token=aa2b60eb-b6ca-4522-b3e3-11c9ca775634)
{% endhint %}

You can use the robot tool bar also to ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2DuRqVv2ot9qewsnvqCm%2Fpause.png?alt=media\&token=d87c7497-6502-4385-a0b5-4fb7f09afc01) **Pause**, ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsmZfU3gbqU03BLZfDoT9%2Frun.png?alt=media\&token=0cb15a05-c08a-4216-917f-e15ecb12c7b2) **Resume** and ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FA7hpu5K7RKdLEDtLPCeh%2Fsuspend.png?alt=media\&token=ff8467bf-9acf-49a4-8ae4-51dd2bd0800a) **Stop** the running script.

{% tabs %}
{% tab title="Universal Robots" %}
{% embed url="<https://youtu.be/B3sZ_q9Vtqk>" %}

{% endtab %}

{% tab title="Doosan Robotics" %}
{% embed url="<https://youtu.be/yj9hL7sBQps>" %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
In order to run a program correctly check that [S](/synchronization/synchronization-settings)[ynchronization Settings](/synchronization/synchronization-settings) are configured accordingly with your robot specification.
{% endhint %}


# Robot Tool Window

You can check the detailed robot status and manage the robot system using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) **Robot Tool Window.**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FnXANyqJcuEPfVpiV8r8b%2Frobot-tool-window.png?alt=media&amp;token=1b7dc19d-fe79-4d98-821c-0ce0508071f3" alt=""><figcaption></figcaption></figure>

The different tabs inside Robot Tool Window provides access to the different robot functionalities:

{% content-ref url="/pages/gSpfoofuDvvPqrKf7IfS" %}
[Status](/robot/robot-tool-window/status)
{% endcontent-ref %}

{% content-ref url="/pages/U0ocflPz2lsWzuGqcUVG" %}
[Variables](/robot/robot-tool-window/variables)
{% endcontent-ref %}

{% content-ref url="/pages/8pMCHBKTKJtft3KYFK01" %}
[Digital I/O](/robot/robot-tool-window/digital-i-o)
{% endcontent-ref %}

{% content-ref url="/pages/dNesO91RuGwKdiYb8JbR" %}
[Analog I/O](/robot/robot-tool-window/analog-i-o)
{% endcontent-ref %}

{% content-ref url="/pages/kXwo8sXNvsU4VyA2vS8H" %}
[Debug](/robot/robot-tool-window/debug)
{% endcontent-ref %}


# Status

On the **Status** tab of ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) [Robot Tool Window](/robot/robot-tool-window) you can check information about connected robot, such as brand, model, serial number, version, payload and reach.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FtcWSwislmo5BjEn0CZqW%2Fimmagine.png?alt=media&amp;token=025ba695-f4e2-4dd2-9cf4-23b59a6fcf18" alt=""><figcaption></figcaption></figure>

**Robot State** shows the live status of the robot:&#x20;

* SERVO OFF
* SERVO ON
* RECOVERY
* FREE DRIVE
* SAFETY STOP
* EMERGENCY STOP
* SAFETY CHECK

**Program State** shows the status of the running program:&#x20;

* STOPPED
* RUNNING
* PAUSED

With the **Speed** bar you can change the robot runtime velocity during program execution.

{% embed url="<https://youtu.be/XA7G_8YoMyM>" %}

The [Teach Pendant Viewer](/robot/robot-tool-window/teach-pendant-viewer) can be used to remotely display the status of robot teach pendant.


# Teach Pendant Viewer

Once you are [connected](/robot/robot-toolbar/control-the-robot) to a robot, you can use the **Teach Pendant Viewer** to remotely view the status of robot teach pendant.

{% hint style="info" %}
Teach Pendant Viewer is available only for Universal Robots.
{% endhint %}

Inside the [robot status tool ](/robot/robot-tool-window/status)window use the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxcicmhhTHjBRO5M4JFEF%2Fdisconnect.png?alt=media\&token=18838e5e-66e2-446b-9730-5fd10160bc5a) **connect** button to start a remote Teach Pendant Viewer session.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F9txmixg1VzNvjDTFFlZ8%2Fteach-pendant-viewer.png?alt=media&amp;token=e4f76553-80b0-431b-b2f3-452ca684aa8f" alt=""><figcaption></figcaption></figure>

Use the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Ffy926PDUdOUhNqGjpqsl%2Fexpand-icon.png?alt=media\&token=0cdb8b00-f680-482c-9da3-82715f787c3d) **Expand** icon to display the teach pendant viewer in **fullscreen** mode.

Use the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKFhZOQExyXXThagZjikv%2Ficon-screenshot.png?alt=media\&token=8568743c-1fe6-46ed-807d-2966f953fb1b) **Screen Shot** icon to grap a screen shot from the robot tach pendant and save it on PC.

{% embed url="<https://youtu.be/uTAOXPw66cM>" %}

{% hint style="success" %}
For safty reasons the Teach Pendant Viewer is not a complete remote control function, but just a mirroring viewer display. Actual remote control of the robot must be performed with the native local/remote control function of the robot.&#x20;
{% endhint %}


# Variables

{% hint style="info" %}
Variables tab is available only for Universal Robots.
{% endhint %}

You can monitor variables values with the **Variables** Tab of the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) [Robot Tool Window](/robot/robot-tool-window).

Variables tab displays the live values of all defined global and system variables while a script is executed.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FbFpzPDXkuMpVj2u38Y4s%2Fvariables-tabs.png?alt=media&amp;token=00926c0c-11a5-4afb-922d-54c5ba708e52" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Remember to define a variable as **global** if you want to monitor it in the **Variables** tab.
{% endhint %}

{% embed url="<https://youtu.be/PK4l3zOqBxY>" %}


# Digital I/O

You can manage the robot eletrical interface with the **Digital I/O** Tab of the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) [Robot Tool Window](/robot/robot-tool-window). Inside the **Digital I/O** Tab panel, status of digital inputs is displayed and digital outputs can be operated.

{% hint style="info" %}
**Digital I/O Tab** will automatically adapt to the conncted robot to display the correct eletrical interface. In the following example eletrical interface for Universal Robots is displayed.
{% endhint %}

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fzn6Kn5iAFdnX69DdU4ko%2Fdigital-io.png?alt=media&amp;token=78a849f5-ca24-4616-9c45-439dd9bbc9f7" alt=""><figcaption></figcaption></figure>


# Analog I/O

You can manage the robot analog interface with the **Analog I/O** Tab of the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) [Robot Tool Window](/robot/robot-tool-window). Inside the **AnaIog I/O** Tab panel, status of analog inputs is displayed and analog outputs can be operated.

{% hint style="info" %}
**Analog I/O Tab** will automatically adapt to the conncted robot to display the correct eletrical interface. In the following example eletrical interface for Universal Robots is displayed.
{% endhint %}

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FqLY9o5UoHV8HIqohXs7m%2Fanalog-io.png?alt=media&amp;token=4dc39eef-c403-4072-b0d6-31061ebb0306" alt=""><figcaption></figcaption></figure>


# Debug

{% hint style="info" %}
Debug tab is available only for Universal Robots.
{% endhint %}

Inside the **Debug** Tab of the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQTsoZkwjEwU8vyyNtIwp%2Frobot.png?alt=media\&token=05a49291-a367-4c45-bf3f-8f36606c54f4) [Robot Tool Window](/robot/robot-tool-window) you can enable the program cursor to keep trace of the script execution while a program is running.

Enable the **Main Cursor** to trace the main thread execution on the script editor.

Enable the **Threads Cursor** to show also the progress of secondary threads.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FzBjFGAuiHHTUweiS4Ona%2Fdebug-tab.png?alt=media&amp;token=8866de74-43d7-46ff-bb09-d487ca454ce7" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/AJ6S6zIAPuk>" %}


# Robot Variables

Usually scripts are just a part of a structurated robot program. For this reason, when developing a script, sometimes you need to access variables that are not define inside the script, but in some other part of the program.

In order to run and test correctly scripts that use variables defined outside of the script scope you can use the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fm1hF0SwGmF1QYVJDBGFM%2Fvariables.png?alt=media\&token=517ff97c-af81-49bd-83ae-82cae9cfcf11)**Variables Tool Window.**

With the Variables Tool Window you can add, edit and remove global variables, which will be then available inside your script.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fh7odVFAvKGUpSLVsPwA6%2Fvariables-tool-window.png?alt=media&amp;token=4c7751ea-e77a-4b53-87f1-5db58ad4c1ad" alt=""><figcaption></figcaption></figure>

Proceed as follow to define a variable:

1. Click on **Add** <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKnlmpw1OhEWPnPMY3d8G%2Fimmagine.png?alt=media&amp;token=149c2f23-4a2a-412b-9e4d-5d2375581c6c" alt="" data-size="line"> to add a new variable.
2. Choose variable name and set an intialization value.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F8ybrNsUV0JEubHRCpNbv%2Fimmagine.png?alt=media&amp;token=ab484b14-5b19-404f-b81f-b3c161c179e4" alt="" width="305"><figcaption></figcaption></figure>
3. OK.

{% hint style="info" %}
For Polyscope X, optionally you can define the variable as a **Application Variables**. Application variables are defined inside the robot at system level and are shared by all programs, while simple **Global Variables** are defined inside a specific program.
{% endhint %}


# Robot Logs

You can view robot logs, messages and allarms using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FzSLp4epcMpAmwPabxe2a%2FlistFiles.png?alt=media\&token=44d56315-3558-4e22-851d-561db4d0aa1d) **Log Tool Window.**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxRNZCpsFOoTjmEVjSTRS%2Flog-tool-window.png?alt=media&amp;token=04f5b208-055c-49ea-afac-b068c9677569" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Each robot brand has a different script function for logging:

Universal Robots - **textmsg("log content here")**

Doosan Robotics - **tp\_log("log content here")**
{% endhint %}

{% embed url="<https://youtu.be/j1DVItOMCCQ>" %}


# Live Auto Completion

**Live auto completion** is one of the key features of Robpod Studio to speed up your robotic application development. While typing the script code Robod Studio take care to suggest **best metches** for functions, variables and parameters.

When a robot or a simulator is conneted, live auto completion provides suggestion also with **live positions** coming from the robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FuVdyzBLShCYgmVn0vl9Y%2Flive-autocompletion.png?alt=media&amp;token=c5cfc3ed-9e9a-4e61-b4cf-2f5381566fd8" alt=""><figcaption></figcaption></figure>

Smart completion is able to suggest:

* Robot and User Functions
* Variables and Function Parameters
* When a robot is connected: live joint position, live cartesian tool position, live MoveJ command, live MoveL command.
* When a simulator is connected: live joint position, live cartesian tool position, live MoveJ command, live MoveL command.

{% tabs %}
{% tab title="Universal Robots" %}
{% embed url="<https://youtu.be/08MfE5VuKxk>" %}
{% endtab %}

{% tab title="Doosan Robotics" %}
{% embed url="<https://youtu.be/n2OFaLVB2JU>" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can change accuracy of live robot positions inside [Editor Settings](/advanced-scripting/editor-settings).
{% endhint %}


# Templete Completion

**Templete Completion** is the ability of Robpod Studio to complete statements blocks while you type the code.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FH8OMk3bH6twjUjmeOcTN%2Fdocs-template-completion.gif?alt=media&amp;token=671b1367-bdc1-4562-836a-8ca1f05a1616" alt=""><figcaption><p>Templete Completion in action while coding a UR script</p></figcaption></figure>

For example Universal Robots scripts always requires a terminating **end** keyword for each block statements. Using Template Completion the **end** keyword gets automatically inserted each time.

{% hint style="info" %}
You can also add you custom Templete Completion using PyCharm [Live Templetes](https://www.jetbrains.com/help/pycharm/using-live-templates.html#live_templates_configure) options.
{% endhint %}


# Param Info

**Param Info** is the ability of Robpod Studio to preview functions and methods signatures while coding a robot script. This function can be helpful to have a clearer look at parameter and types needed to fill a function call.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FlGs3NExRY7yok0XKhsk1%2Fdocs-param-info.gif?alt=media&amp;token=e89df266-e9a6-4d0a-8c7c-47c49c971a63" alt=""><figcaption><p>Param Info in action while coding a UR Script</p></figcaption></figure>

**Param Info** popup can also be triggered on request with shortcut **Ctrl + P** when cursor is placed inside parenthesis of function signature.&#x20;


# Code Inspections

**Code Inspections** can detect and correct abnormal code in your project before you compile it. The IDE can find and highlight various problems, locate dead code, find probable bugs, spelling problems, and improve the overall code structure.

Code inspections and syntax checking changes accordingly to the robot programming language that you are currently using in your project.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FE3FiCdVKYZQNTcgHrXc8%2Fdocs-syntax-check.gif?alt=media&amp;token=5f3902d5-bbbf-4408-8b8a-fd5747a261cb" alt=""><figcaption><p>Code Inspection in action while coding a UR Script.</p></figcaption></figure>

List of supported code inspection for each robot can be found here:

{% tabs %}
{% tab title="Universal Robots" %}

* Statements structure
* End terminator&#x20;
* Brackets balance

{% hint style="info" %}
Other code inspection features will be incrementally developed and made available in upcoming releases.&#x20;
{% endhint %}
{% endtab %}

{% tab title="Doosan Robotics" %}
Full Python/DRL syntax inspection is available.
{% endtab %}
{% endtabs %}


# Quick Doc

You can check complete documentation of robot functions using the **Quick Doc** feature of Robpod Studio. Just hover the cursor on the function that you want to inspect and the documentation popup with all function details will appear after a short delay.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsaxgxsUKt0u48VLPkd3m%2Fquick-doc.gif?alt=media&amp;token=99b24767-c311-4ff7-82f7-8e6d144632b2" alt=""><figcaption></figcaption></figure>

You can also display the documentation popup on request by placing cursor over the function name and pressing **Ctrl + Q,** function and parameters explanation will be displayed.

{% hint style="info" %}
If you want to keep documentation always visible as a side panel click on <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FpnO01jkcLaIgouOb5RUe%2F8212730.png?alt=media&amp;token=44cd57f4-0ce2-4c30-ab18-f62eb214f967" alt="" data-size="line"> settings icon an choose **Open in Documentation Tool Window.**
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=VHzMH0CAxJg>" %}


# Python Scripting

All the **Python** programming features provided by [PyCharm IDE](https://www.jetbrains.com/pycharm/) are included with Robpod Studio.

**Python scripting** can be useful to develop client applications that control the robot or exchange data externally. In this scenario Robpod Studio can be used as an integrated platform to develop both native robot programs and external Python scripts, and test them in the same environment.

To create a new Python file:

1. Right click on **project folder ->  New -> Python File.**

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDlUJwwnEzZ9yeNm9r9UI%2Fnew_python_script.png?alt=media&amp;token=a4aaab5f-bcab-4110-9de9-56a53eb80c3b" alt=""><figcaption></figcaption></figure>
2. Enter the name of your script file.

You can work now with both robot native program and external Python scripts. If you want you could also display the two scripts side by side and work on them at the same time. To display a script in side by side mode: &#x20;

Right click on script name, then select **Open in Right Split.**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fr5rf7zL2A2FokkNbGECS%2Fside-by-side-mode.png?alt=media&amp;token=89df1042-70fe-43b9-a307-aefe64791cb3" alt=""><figcaption></figcaption></figure>

To test the scripts you can run both of them at the same time:

1. To [execute the robot script](/robot/robot-toolbar/run-a-script), click on the robot program name and select![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FsmZfU3gbqU03BLZfDoT9%2Frun.png?alt=media\&token=0cb15a05-c08a-4216-917f-e15ecb12c7b2)**Run On Robot**
2. To execute the Python script: click on the python script name and select ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCX8kN3hgPuBTNnamCZsS%2Frun.png?alt=media\&token=bb248194-78ef-4af5-8d4a-633d6eb4c59b) **Run**.

{% embed url="<https://youtu.be/MV8yei3aHsc>" %}

### Example: UR external motion control with a Python Script&#x20;

In this example TCP socket comunication is used to share motion data between the robot program and a client Python script. In this way is possible to control the robot form an external application.

**Robot Program**

```python
# Universal Robots script for controlling the robot with external python script
while True:
    if socket_open("192.168.1.67", 8888):
        while True:
            values = socket_read_ascii_float(8)
            joints = [values[1], values[2], values[3], values[4], values[5], values[6]]
            if values[0] > 6:
                textmsg("Moving to: ", joints)
                movej(joints, v=values[7], a=values[8])
            else:
                socket_close()
                break
            end
            socket_send_string("target_reached")
        end

    else:
        textmsg("Connecting...")
        sleep(1)
    end
end
```

**External Client Script**

```python
import socket
# connect to robot
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(('0.0.0.0', 8888))
server.listen()
connection, address = server.accept()


# function to send move commands
def movej(pose, v=1, a=1):
    print("Moving to: {}".format(pose))
    connection.send("({}, {}, {}, {}, {}, {}, {}, {})\n".format(pose[0], pose[1], pose[2], pose[3], pose[4], pose[5], v, a).encode())
    buf = connection.recv(128)
    if len(buf) > 0:
        print(buf.decode())


# movements
movej([0.00, -1.57, -1.57, 0.00, 1.57, 0.00])
movej([0.00, -1.57, 0, 0.00, 1.57, 0.00])
movej([0.00, -1.57, -1.57, 0.00, 1.57, 0.00])
```


# Editor Settings

Go to **File -> Settings -> Robpod -> Editor** to change scripting editor settings.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FpGhKfIm4bMxy8ugyRrWg%2Feditor-settings.PNG?alt=media&amp;token=326967de-1dcf-4b9d-83d7-8286b4b783de" alt=""><figcaption></figcaption></figure>

Inside this panel you can spcify number of decimal digit to increase accuracy of robot live positions.


# Upload On Robot

File **Synchronization** is one of the major features of Robpod Studio.

Synchronization feature allows to **instantly transfer** files between robot and PC, without need of a USB drive or other manual import/export procedures.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FfiYbEuuuR7uEzyORbq4y%2Fsynchronize-white-2.png?alt=media&amp;token=185552e7-deb4-4aed-9b58-84e138b72095" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Universal Robots" %}
After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you  can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

{% hint style="info" %}
To use the Synchronize function correctly, make sure to configure the [synchronization settings](/synchronization/synchronization-settings) .
{% endhint %}

To upload the current selected robot script on the robot click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FcESaCfQwfOLq9tnHGEL7%2Fupload.png?alt=media\&token=e05a4a34-d224-4bf3-8882-7c014275a4c3) **Upload On Robot.** This operation will transfer the script file from Robpos Studio to the connected robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FnZYsk3JYtvU9usevaYaS%2Fimmagine.png?alt=media&amp;token=2d3fad1f-569c-46b3-9588-047c53186ef9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can upload a robot script also using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) Synchronize shortcut on the script editor.

![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Ftkcf2Gw659sX1TayBIPD%2Fsyncronize-shortcut.png?alt=media\&token=b1688323-c24a-4308-83f9-02b2529e65d5)
{% endhint %}

{% hint style="warning" %}
Existing files with the same name on the robot will be overwritten.
{% endhint %}

The robot script can now be used directly on robot teach pendant. Inside a PolyScope program:

1. Add a **Script** node.
2. Choose **File** option.
3. Click on **Edit**.
4. **Open** the synchronized file.

{% embed url="<https://www.youtube.com/watch?v=rE7TT8eKlVc>" %}

{% hint style="info" %}
You need to setup the script node just once, then you can synchronize the scripts directly from Robpod Studio without opening the script file each time. After file synchronization, Script node inside PolyScope will still show previous version of the script inside the preview, but underlying script file has actually been updated, just run the program to see the changes in actions.&#x20;
{% endhint %}
{% endtab %}

{% tab title="Doosan Robotics" %}
Before perfoming any synchronization, open [**Robpod App**](/appendix/robot-specific-functions/doosan-robotics/installing-robpod-plugin) inside Doosan teach pendant, and keep it open durning the procedure.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption></figcaption></figure>

After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

To upload the current selected robot script on the robot click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FcESaCfQwfOLq9tnHGEL7%2Fupload.png?alt=media\&token=e05a4a34-d224-4bf3-8882-7c014275a4c3) **Upload On Robot.** This operation will transfer the script file from Robpos Studio to the connected robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FnZYsk3JYtvU9usevaYaS%2Fimmagine.png?alt=media&amp;token=2d3fad1f-569c-46b3-9588-047c53186ef9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can upload a robot script also using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) Synchronize shortcut on the script editor.

![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Ftkcf2Gw659sX1TayBIPD%2Fsyncronize-shortcut.png?alt=media\&token=b1688323-c24a-4308-83f9-02b2529e65d5)
{% endhint %}

{% hint style="warning" %}
Existing files with the same name on the robot will be overwritten.
{% endhint %}

The robot script can now be used directly on robot teach pendant.

1. Add a **Robpod Script** command inside Task Editor program.
2. Select the DRL Script to be executed, click **confirm**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FZFNA9nlFLVQLgxN2L7mU%2Fimmagine.png?alt=media&amp;token=35f7f8e6-a11a-427a-8339-2a59d212e8ad" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
You need to setup the script command just once, then you can synchronize the scripts directly from Robpod Studio without opening the script file each time.&#x20;
{% endhint %}

{% endtab %}
{% endtabs %}


# Download From Robot

Using files **Synchronization** feature you can donwload files from robot to your PC.

{% tabs %}
{% tab title="Universal Robots" %}
After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you  can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

{% hint style="info" %}
To use the Synchronize function correctly, make sure to configure the [synchronization settings](/synchronization/synchronization-settings) .
{% endhint %}

To download files from the robot click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FIQy3L6YyQoY0iUMECL4h%2Fdownload.png?alt=media\&token=80da10f3-243c-4128-b603-0ead3a2d7d02) **Download From Robot.**&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FROSJmiGoRAXVz1hPKRop%2Fimmagine.png?alt=media&amp;token=e9f41a45-f0c5-42ad-8a88-2e46037a72e2" alt=""><figcaption></figcaption></figure>

Use the dialog to choose the files you want to download.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FtB45z55w2LMQcBzzDKAR%2Fimmagine.png?alt=media&amp;token=baf193c4-8c10-4c81-a0ae-642afc9b3475" alt="" width="305"><figcaption></figcaption></figure>

This operation will transfer selected files from connected robot to Robpod Studio project.

{% embed url="<https://www.youtube.com/watch?v=gUXvskCawjo>" %}
{% endtab %}

{% tab title="Doosan Robotics" %}
Before perfoming any synchronization, open [**Robpod App**](/appendix/robot-specific-functions/doosan-robotics/installing-robpod-plugin) inside Doosan teach pendant, and keep it open durning the procedure.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption></figcaption></figure>

After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

To download files from the robot click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FIQy3L6YyQoY0iUMECL4h%2Fdownload.png?alt=media\&token=80da10f3-243c-4128-b603-0ead3a2d7d02) **Download From Robot.**&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FROSJmiGoRAXVz1hPKRop%2Fimmagine.png?alt=media&amp;token=e9f41a45-f0c5-42ad-8a88-2e46037a72e2" alt=""><figcaption></figcaption></figure>

Use the dialog to choose the files you want to download.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FtB45z55w2LMQcBzzDKAR%2Fimmagine.png?alt=media&amp;token=baf193c4-8c10-4c81-a0ae-642afc9b3475" alt="" width="305"><figcaption></figcaption></figure>

This operation will transfer the script file from connected robot to Robpod Studio project.
{% endtab %}
{% endtabs %}


# Synchronize Project

When you have multiple files inside the project, instead of transfering them one by one to the robot, you can use the **Synchronize Project** action to transfer files all together.

{% tabs %}
{% tab title="Universal Robots" %}
After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you  can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

{% hint style="info" %}
To use the Synchronize function correctly, make sure to configure the [synchronization settings](/synchronization/synchronization-settings) .
{% endhint %}

You  can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

To synchronize project files click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize Project.**&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fr8naHYaLiwUK3uZi8FHl%2Fimmagine.png?alt=media&amp;token=a08a9089-f0af-49b2-a484-3581c8f32e50" alt=""><figcaption></figcaption></figure>

Choose the files you want to synchronize on the robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMUGHBJAGPAgWvvFW3mWg%2Fimmagine.png?alt=media&amp;token=e1102816-9e8a-441d-8214-7949383be42f" alt="" width="305"><figcaption></figcaption></figure>

This opeation will transfer selected files on the robot.

{% hint style="warning" %}
Existing files with the same name on the robot will be overwritten.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=EVqlS4L395g>" %}
{% endtab %}

{% tab title="Doosan Robotics" %}
Before perfoming any synchronization, open [**Robpod App**](/appendix/robot-specific-functions/doosan-robotics/installing-robpod-plugin) inside Doosan teach pendant, and keep it open durning the procedure.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption></figcaption></figure>

After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

To synchronize project files click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize Project.**&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fr8naHYaLiwUK3uZi8FHl%2Fimmagine.png?alt=media&amp;token=a08a9089-f0af-49b2-a484-3581c8f32e50" alt=""><figcaption></figcaption></figure>

Choose the files you want to synchronize on the robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMUGHBJAGPAgWvvFW3mWg%2Fimmagine.png?alt=media&amp;token=e1102816-9e8a-441d-8214-7949383be42f" alt="" width="305"><figcaption></figcaption></figure>

This opeation will transfer selected files on the robot.

{% hint style="warning" %}
Existing files with the same name on the robot will be overwritten.
{% endhint %}
{% endtab %}
{% endtabs %}


# Clean Robot Files

You can delete unused files form the robot with the **Clean Robot Files** function.

{% tabs %}
{% tab title="Universal Robots" %}
You  can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

To delete files from robot click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKVJjJhSh2HtYlvHHkXRh%2Fdelete.png?alt=media\&token=c2ab1a29-0120-49aa-bfa7-07a4180de11f) **Clean Robot Files.**&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FdGsUwX1jqhzpN3IsizMI%2Fimmagine.png?alt=media&amp;token=0c2a87cd-7928-4b7e-af5c-923759335e09" alt=""><figcaption></figcaption></figure>

Choose the files you want to remove from robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjxngvC81KMpaJ6TJXAwW%2Fimmagine.png?alt=media&amp;token=86f5a496-0b9c-4367-8df3-0a73fcd3d891" alt="" width="305"><figcaption></figcaption></figure>

{% hint style="danger" %}
This operation will permanently remove files from robot and can not be undone.
{% endhint %}
{% endtab %}

{% tab title="Doosan Robotics" %}
Before perfoming any synchronization, open [**Robpod App**](/appendix/robot-specific-functions/doosan-robotics/installing-robpod-plugin) inside Doosan teach pendant, and keep it open durning the procedure.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption></figcaption></figure>

After successful [connection with the robot](/robot/robot-toolbar/connect-the-robot), you can access file transfer operations from the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize** ico&#x6E;**.**&#x20;

To delete files from robot click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) **Synchronize ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKVJjJhSh2HtYlvHHkXRh%2Fdelete.png?alt=media\&token=c2ab1a29-0120-49aa-bfa7-07a4180de11f) **Clean Robot Files.**&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FdGsUwX1jqhzpN3IsizMI%2Fimmagine.png?alt=media&amp;token=0c2a87cd-7928-4b7e-af5c-923759335e09" alt=""><figcaption></figcaption></figure>

Choose the files you want to remove from robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjxngvC81KMpaJ6TJXAwW%2Fimmagine.png?alt=media&amp;token=86f5a496-0b9c-4367-8df3-0a73fcd3d891" alt="" width="305"><figcaption></figcaption></figure>

{% hint style="danger" %}
This operation will permanently remove files from robot and can not be undone.
{% endhint %}
{% endtab %}
{% endtabs %}


# Synchronization Settings

In order for Synchronization features to work correctly make sure to setup **Synchronization Settings** accordignly to the robot brand you are using.

Go to **File -> Settings -> Robpod -> Synchronization** to change synchronization settings.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Far0eyhFiFV15vqESos1B%2Fimmagine.png?alt=media&amp;token=4676e5fa-f1e6-4cc2-b416-4c8841238015" alt=""><figcaption></figcaption></figure>

You can find here default settings for supported robots.

{% tabs %}
{% tab title="Universal Robots" %}
**Username:** root\
**Password:** easybot\
**Base path:** /programs

{% hint style="warning" %}
Starting from Polyscope 5.17, robot force you to change the default admin password, make sure to set same password alsor inside Robpod Studio Synchronization Settings.
{% endhint %}
{% endtab %}

{% tab title="Universal Robots URsim" %}
**Username:** ur

**Password:** easybot

**Base path:** /home/ur/ursim-current/programs.UR5

Change base path accordingly to robot model.
{% endtab %}
{% endtabs %}


# Connect a Simulator

With Robpod Studio you can **simulate** a robot script on external [integrated simulators](/appendix/supported-simulators).

Simulators can be used to:

* [Run and test a robot script](/simulation/simulate-a-script) in a virtual envionment
* Develop a robot application with [off-line programming](/simulation/off-line-programming) method

Use the **Simulator Tool Window** to conect Robpod Studio to a simulated robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fh4XoVJPxjj8prUyRPYBs%2Fsimulator-tool-window.png?alt=media&amp;token=463ead11-1ccf-455d-a91c-bd60befc488c" alt=""><figcaption></figcaption></figure>

Inside the Simulator Tool Window:

1. Choose the simulator.
2. **Open** the simulator. When simulator is detected from Robpod Studio status <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMQMlXQ9cybmqVTqis9Hq%2Fimmagine.png?alt=media&amp;token=3f2b85c5-31f6-4038-a2d5-f540aae20cdd" alt="" data-size="line"> will be displayed.
3. Add **Robot Instance** to the simualtor or select an exisiting one.&#x20;
4. If you add a new robot instance you will be requested to **choose a robot model**.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fh2V4CQz2DFVMPMnx0ocw%2Fselect-robot-model.PNG?alt=media&amp;token=0f06cf07-d2ce-49e8-82d7-6beee9029e70" alt=""><figcaption></figcaption></figure>
5. When roobot instance is detected from Robpod Studio status <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FS5rlgE776Mo5FTFWQtbp%2Fimmagine.png?alt=media&amp;token=8217cb19-d89a-42df-86e9-e92dbe7dd091" alt="" data-size="line"> will be displayed.

{% hint style="info" %}
The [embedded viewer](/simulation/simulator-viewer) supported by some simulators is not enabled by default Inside Robpod Studio. The embedded viewer should be enabled inside this [Simulation Settings](/simulation/simulation-settings) panel.
{% endhint %}


# Simulate a Script

With Robpod Studio you can execute a robot script inside a simulation environment.

To simualte a robot script on the [connected simulator](/simulation/connect-a-simulator), select the script you want to execute and click on <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCaLRTJIdgactwErov42Q%2Fsimulator.png?alt=media&amp;token=fc654fd7-d397-496a-baa5-de054035b417" alt="" data-size="line"> **Simulator** -> ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKTE73283GjCIRVc9bKUF%2Frun.png?alt=media\&token=cc5839c3-c69c-48a2-a321-2fef8a6577ef)**Run On Simulator**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FfuGHEn2UEMCmKjRgIykf%2Fimmagine.png?alt=media&amp;token=c53e0d27-e30f-4060-9016-184188468452" alt=""><figcaption></figcaption></figure>

This operation will open the target simualtion environment on your PC if not already opened.

If no robot instance is loaded inside the simulator you will be asked to select the robot model you want to use.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fh2V4CQz2DFVMPMnx0ocw%2Fselect-robot-model.PNG?alt=media&amp;token=0f06cf07-d2ce-49e8-82d7-6beee9029e70" alt=""><figcaption></figcaption></figure>

The robot script will be then executed inside the simulation environment.

{% embed url="<https://www.youtube.com/watch?v=QkLcbun-G3I>" %}


# Off-Line Programming

Robpod Studio can be used to perform **off-line programming** using the [connected simulator ](/simulation/connect-a-simulator)when a real robot is not available.

Integrated simulator functions for off-line programming are provided by the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCaLRTJIdgactwErov42Q%2Fsimulator.png?alt=media\&token=fc654fd7-d397-496a-baa5-de054035b417) **Simulator Tool Bar**:

<table data-header-hidden><thead><tr><th width="234"></th><th></th></tr></thead><tbody><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKTE73283GjCIRVc9bKUF%2Frun.png?alt=media&amp;token=cc5839c3-c69c-48a2-a321-2fef8a6577ef" alt=""> <strong>Run On Simulator</strong></td><td>Run the selected robot script inside the simulation environment.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FiWsn8yDdabINiq49kIs7%2Fjoint_pose.png?alt=media&amp;token=dd5bf917-386a-43de-8a93-0826e4bf69cb" alt=""> <strong>Add Joint Pose</strong></td><td>Add current simulated robot joint pose to robot script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FatTkCp1qc2p2mayylLD3%2Ftask_pose.png?alt=media&amp;token=f4381815-95fa-4fb2-99d8-b84015c03616" alt=""> <strong>Add Tool Pose</strong></td><td>Add current simulated robot tool pose to robot script..</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FYLOJQtkueLhbfH4x6R4y%2Fmovej.png?alt=media&amp;token=114d82f3-b789-47f0-a233-44dd6d04c9b6" alt=""> <strong>Add MoveJ</strong></td><td>Add MoveJ command with current simulated robot joint pose to robot script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FvMw41RvRpperpSeJiDKx%2Fmovel.png?alt=media&amp;token=e6bb2267-760c-4651-9d15-9514444b5158" alt=""> <strong>Add MoveL</strong></td><td>Add MoveL command with current simulated robot tool pose to robot script.</td></tr><tr><td><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMncxlZePGowVH7ZI3YHp%2Fmove_to.png?alt=media&amp;token=2faa8bc7-d3f6-4ff8-98ee-f3b2eca1371b" alt=""> <strong>Move To</strong></td><td>Move simulated robot to selected target position. Place mouse cursor on script position to determin the target pose.</td></tr></tbody></table>

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FbLKqspqg4qdhq0y5qr3g%2Fimmagine.png?alt=media&amp;token=15571b0c-d374-4c0c-ac3a-c22e222f878c" alt=""><figcaption></figcaption></figure>

In order to develop your robotic application with off-line programming approach:

* move the simulated robot inside the simulator environment to target positions
* use ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCaLRTJIdgactwErov42Q%2Fsimulator.png?alt=media\&token=fc654fd7-d397-496a-baa5-de054035b417) **Simulator Tool Bar** functions to acquire target positions and compose the robot script
* run the program inside the simulation environment to test the application
* run the program on real robot

{% hint style="info" %}
[Live Auto Completion](/advanced-scripting/live-auto-completion) can be used also when a simulator is connected to acquire live robot position using the simulator.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=vVp8Fv1z5FA>" %}


# Simulator Viewer

Some simulators support the **Embedded Viewer** feature: a simulation preview directly displayed inside Robpod Studio Simulator Tool window.

{% hint style="info" %}
**Embedded viewer** is not enabled by default, you can enable the embedded preview in [Simulation Settings](/simulation/simulation-settings) panel. After enabling the embedded viewer a Robpod Studio restart may be needed for change to take effect.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=gwBwbwMXv1c>" %}


# Simulation Commands

When coding robotics application with Robpod Studio, a set of special functions called **Simulation Commands** is available to better interact with the simulation environment from the robot program.

Simualtion Commands are particullary suited during [Off-Line Programming ](/simulation/off-line-programming)to let the robot grasp and move objects inside the simulation environment.

{% embed url="<https://youtu.be/a5Q0Mru767E>" %}

All Simulation Commands starts with the **sim\_** prefix, i.e. **sim\_grasp()**.&#x20;

Here the complete list of simulation commands:

<table><thead><tr><th width="203">Command Name</th><th>Description</th><th>Parameters</th></tr></thead><tbody><tr><td><strong>sim_grasp</strong>(object)</td><td>Attach an object to robot tool. </td><td><strong>object</strong>: string - Name of object to attach to robot tool. If object is not specified, closest object to robot tool will be used.</td></tr><tr><td><strong>sim_release</strong>(object)</td><td>Detach an object from robot tool.</td><td><strong>object</strong>: string - Name of object to detach from robot tool. If object is not specified, all attached objects will be detached from robot tool.</td></tr><tr><td><strong>sim_set_parent</strong>(object, parent)</td><td>Attach an object to another parent while maintaining the current absolute position in the simulation.</td><td><strong>object</strong>: string - Name of the object to set the parent to. <strong>parent</strong>: string - Name of parent. If parent is not specified, object is attached to simulation workstation.</td></tr></tbody></table>

You can find here an example of pick and place application using Simulation Commands:

{% file src="/files/1DRNyd3wxPfrTQd4Oa4j" %}
UR Script file
{% endfile %}

{% file src="/files/lLofXXrbjHY5B5GSSwPN" %}
RoboDK workstation
{% endfile %}


# Simulation Settings

Integrated simulators can be configured using Robpod Studio settings panel.

Go to **File -> Settings -> Robpod** to access Robpod Studio settings panel.

Simulator settings are different for each [supported simulator environment](/appendix/supported-simulators), in this section you can find detailed explanation for each simulator.

{% tabs %}
{% tab title="RoboDK" %}
Before configuring RoboDK settings make sure that [RoboDK ](https://robodk.com/index)has been installed on your PC.

Go to **File -> Settings -> Robpod -> RoboDK** to access RoboDK settings panel.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FRAkiTjuorSB59FzhDsBE%2Fimmagine.png?alt=media&amp;token=d8682ee1-4fa4-4e23-9b21-d8947c170343" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="190"></th><th></th></tr></thead><tbody><tr><td><strong>IP Address</strong></td><td>IP address of machine where RoboDK has been installed. Leave blank for default value.</td></tr><tr><td><strong>Port</strong></td><td>RoboDK API port. Leave blank for default value.</td></tr><tr><td><strong>Installation Path</strong></td><td>Path of machine where RoboDK has been installed pointing to RoboDK.exe. Leave blank for default value. Click on <strong>Detect Path</strong> for path automatic detection.</td></tr><tr><td><strong>Show Embedded Viewer</strong></td><td>Mark this option to enable the simulator embedded viewer inside Simulator Tool Window. Make sure that <strong>Web Viewer</strong> option is enabled inside RoboDK settings.</td></tr><tr><td><strong>Web Viewer Port</strong></td><td>Web viewer port configured inside RoboDK. Default: 8091.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# Simulation Examples


# Palletizing

**RoboDK Workstation**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKsxKTSuyetUKoQD7JQT2%2Frobodk-pallet.PNG?alt=media&amp;token=a7290708-13a6-4d98-abfc-29dcf402d65f" alt=""><figcaption></figcaption></figure>

{% file src="/files/BPiEDVjoHaFIlyoMHQni" %}

**Robot Program File - Simulation**

```python
# pallet setup
rows = 2
columns = 4
layers = 8

LEFT_PALLET = "LEFT PALLET"
RIGHT_PALLET = "RIGHT PALLET"
selected_pallet = LEFT_PALLET

LEFT_PALLET_FEATURE = p[-0.580, 0.528, -0.860, 0, 0, 0]
RIGHT_PALLET_FEATURE = p[0.580, -0.528, -0.860, 0, 0, 3.1415]
pallet_feature = LEFT_PALLET_FEATURE

# box setup
box_length = 300
box_width = 400
box_height = 200

PICK_FEATURE = p[-0.860, -0.211, -0.350, 0, 0, 1.571]

# start from setup
FIRST_BOX = "FIRST BOX"
CURRENT_BOX = "CURRENT BOX"
BOX_AT = "BOX AT"
start_from = FIRST_BOX

start_row = 0
start_column = 0
start_layer = 0

# pallet state
current_row = 0
current_column = 0
current_layer = 0


def get_pick_pose():
    x = box_length * 0.0005
    y = box_width * 0.0005
    z = box_height * 0.001
    return pose_trans(PICK_FEATURE, p[x, y, z, 0, 3.1415, 0])
end

def get_place_pose():
    x = box_length * 0.0005 + current_column * box_length * 0.001
    y = box_width * 0.0005 + current_row * box_width * 0.001
    z = box_height * 0.001 + current_layer * box_height * 0.001
    return pose_trans(pallet_feature, p[x, y, z, 0, 3.1415, 0])
end

def get_approach_pose(pose, offset=[0, 0, 0]):
    return pose_add(pose, p[offset[0], offset[1], offset[2], 0, 0, 0])
end

def grasp():
    sim_grasp("box_{}_{}_{}".format(current_row, current_column, current_layer))
end

def release():
    sim_release()
end



def start_task():

    # start from condition
    if start_from == FIRST_BOX:
        current_row = 0
        current_column = 0
        current_layer = 0
    elif start_from == BOX_AT:
        current_row = start_row - 1
        current_column = start_column - 1
        current_layer = start_layer - 1
    else:
        current_row = current_row
        current_column = current_column
        current_layer = current_layer
    end

    # selected pallet
    if selected_pallet == LEFT_PALLET:
        pallet_feature = LEFT_PALLET_FEATURE
    else:
        pallet_feature = RIGHT_PALLET_FEATURE
    end

    while current_layer < layers:
        while current_column < columns:
            while current_row < rows:
                # pick action
                pick_pose = get_pick_pose()
                approach_pose = get_approach_pose(pick_pose, offset=[0, 0, 0.1])
                current_pose = get_actual_tcp_pose()
                if approach_pose[2] < current_pose[2] + 0.05:
                    approach_pose[2] = current_pose[2] + 0.05
                end
                movej(approach_pose)
                movel(pick_pose)
                grasp()

                place_pose = get_place_pose()
                place_approach_pose = get_approach_pose(place_pose, offset=[0.1, 0.1, box_height * 0.001 + 0.05])

                if place_approach_pose[2] > PICK_FEATURE[2] +  box_height * 0.001 + 0.05:
                    approach_pose[2] = place_approach_pose[2]
                end

                movel(approach_pose)

                # place action
                place_pose = get_place_pose()
                approach_pose = get_approach_pose(place_pose, offset=[0.1, 0.1, box_height * 0.001 + 0.05])
                movej(approach_pose)
                movel(place_pose)
                release()
                approach_pose = get_approach_pose(place_pose, offset=[0, 0, 0.1])
                if approach_pose[2] < PICK_FEATURE[2] +  box_height * 0.001 + 0.05:
                    approach_pose[2] = PICK_FEATURE[2] +  box_height * 0.001 + 0.05
                end
                movel(approach_pose)

                current_row = current_row + 1
            end
            current_row = 0
            current_column = current_column + 1
        end
        current_row = 0
        current_column = 0
        current_layer = current_layer + 1
    end
end

start_task()
```


# Introduction

![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMrGmjBMvNWDKwMKe2Afq%2Fhmi_file.png?alt=media\&token=241bf936-463c-4cbf-ae33-0c067a7f611c) **HMI Designer** is a tool provided by [Robpod Studio](/) that can be used to develop custom user interface panels for robot programs.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F5PUShnm5iGCTiDVwOztR%2Fdesign-link-run-white.png?alt=media&amp;token=4015ba4c-a435-47bb-8f32-520e672ed9cc" alt=""><figcaption></figcaption></figure>

Using HMI Designer graphical panels can be developed easily with **drag and drop** actions and linked with robot variables and functions.

Panels developed with HMI Designer can be viewed by users both on [robot teach pendant](/hmi-designer/design-steps/run-hmi-program) and on common [Desktop environments](/hmi-designer/desktop-hmi-viewer).

{% embed url="<https://youtu.be/gX7d7fiKPas>" %}

### Get Started

* Check out how the HMI Designer [**user interface**](/hmi-designer/user-interface) is organized to learn how to navigate into it.&#x20;
* Follow [**Installation Instructions**](/hmi-designer/installation) to setup the HMI plugin on your robot.
* Check the[ **Design Steps**](/hmi-designer/design-steps) to learn how to develop a custom panel with HMI Designer or have a look at the [**Complete Tutorial** ](/hmi-designer/hmi-tutorials)videos.


# User Interface

When you open ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMrGmjBMvNWDKwMKe2Afq%2Fhmi_file.png?alt=media\&token=241bf936-463c-4cbf-ae33-0c067a7f611c) [HMI Designer](/hmi-designer/introduction) in Robpod Studio, the default user interface looks as follows:

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fx4aK6F61eTyE6z7QE1qR%2Fhmi-designer-navigation.png?alt=media&amp;token=e7370562-614e-4c92-976d-04301afd8696" alt=""><figcaption></figcaption></figure>

The **HMI Panel Editor** is the graphical editor that let you arrange, move and resize **HMI components** with drag and drop actions.

New HMI components can be [added ](/hmi-designer/design-steps/add-hmi-components)to the editor using the **Palette Toolbar**.&#x20;

Available components are:&#x20;

* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQOY48aD1C7hJ1fHP9sSg%2Fbutton.png?alt=media\&token=3dfe84c7-629b-4652-ba0a-2ae1972cc486) Button
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2a5vQNyFnSGUd0ydfiDO%2Flabel.png?alt=media\&token=0dc09c7a-a92f-4185-9d22-ae80a9d8c295) Text
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FYQqDRDvmctCuaZfzJoRJ%2Fmonitor.png?alt=media\&token=caa0425b-cf53-430d-a346-9bd1ac077b24) Monitor
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FI2JTMcc6FfDDaXLuyDeg%2Finput.png?alt=media\&token=a0cfe021-121b-4156-b1d1-f252e7e499c8) Input
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FNaTXX2O2tMH3JYQFStGv%2FlocalScopeAction.png?alt=media\&token=b9ff8d30-f940-40ed-ab04-2a893ebda8dd) Pose Input
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FzZAIFisB9lpLD10ZFVtk%2Fimage.png?alt=media\&token=4885a314-ff28-4cad-b297-4ae307cf4dcf) Image
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDxIvdwLUHEUCVJYPN6qh%2Fdropdown.png?alt=media\&token=447092b1-a6af-47a0-bc61-9cb78412c471) DropDown
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FrzG1MYUT6VOtdjlht1Q8%2Fslider.png?alt=media\&token=012bd56a-d0f1-4ff4-9143-96583d553e6a) Slider
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FbqioFXIAsA3Lko6pfN48%2Fcheckbox.png?alt=media\&token=234acae3-2417-4db7-bd4c-1acde255e080) CheckBox
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FlD7xBJvlk1DmWOEJAPNv%2Ftab.png?alt=media\&token=e98111bf-ee96-4217-98b4-4a655e1ee944) Tab
* ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FoJijfJxaFRT7vsdrV4oV%2FchartLine.png?alt=media\&token=fd263f0b-b557-48c5-ab55-9ac8f2ee55cf) Chart

When you select an existing HMI component you will be able to [edit ](/hmi-designer/design-steps/edit-hmi-components)it using the **Component Properties** side window.

Component Properties are divided in two section **UI Properties** and **Program Properties**.

**UI Properties** let you configure the appearance of HMI components. You can setup here graphical properties such as colors, fonts, styles, icons, alignement...

**Program Properties** are used instead to link the HMI component to robot program variables or functions. For example you can specify in this section the robot function that must be executed each time a user click on a button.

The **HMI Preview toolbar** can be used to display a [preview ](/hmi-designer/design-steps/preview-hmi-panel)of the designed HMI panel both on Desktop environment and on robot teach pendant.


# Installation

To display ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMrGmjBMvNWDKwMKe2Afq%2Fhmi_file.png?alt=media\&token=241bf936-463c-4cbf-ae33-0c067a7f611c) [HMI Designer](/hmi-designer/introduction) custom panels on robot teach pendant, **Robpod Robot Plugin** must be installed on target robot.

{% tabs %}
{% tab title="UR Polyscope 5 or 3" %}

### Download Robpod Plugin

Go to **Tools ->  Robot Plugin ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4pqTHM71pCjS3pjoTLfB%2Fdownload.png?alt=media\&token=2bae1647-d919-411d-addb-c4275dbd8fbc) **Download Plugin.**

This will generate a **Robpod Plugin file** with the format of your robot, i.e. **URCap** file for Universal Robots.

You can also download Robpod Plugin here:

<a href="http://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-plugin.urcap" class="button primary" data-icon="square-down">DOWNLOAD URCAP</a>

The HMI plugin file can now be installed using the usual installation procedure of your robot.

### Installing URCap on Universal Robots

You can manage your existing URCaps or install a new one in your robot.

1. In the Header, press the Hamburger menu and select Settings.
2. Under **System**, select URCaps.
3. Press the **+** button, select the .urcap file and press Open Note: Check more details about the new URCaps by selecting it in Active URCaps field. More information appears below in URCaps Information field below.
4. If you wish to proceed with the installation of that URCap, press Restart. After that step, the URCaps is installed and ready to be used.

On the robot teach pendant go to **Installation -> URCaps -> Robpod HMI** and check the status of HMI Broker, it should be RUNNING.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQ88xTCJa1BeKTuL59gw3%2Fimmagine.png?alt=media&amp;token=685ccebe-27de-433b-9841-7d21d71705ac" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If HMI broker is not in RUNNING status, check the [Security Settings](/appendix/security-settings) section and make sure that all settings are configured on the robot as described.&#x20;
{% endhint %}
{% endtab %}

{% tab title="UR Polyscope X" %}

### Download Robpod Plugin

Go to **Tools ->  Robot Plugin ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4pqTHM71pCjS3pjoTLfB%2Fdownload.png?alt=media\&token=2bae1647-d919-411d-addb-c4275dbd8fbc) **Download Plugin.**

This will generate a **Robpod Plugin file** with the format of your robot, i.e. **URCapX** file for Universal Robots.

You can also download Robpod Plugin here:

<a href="http://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-plugin.urcapx" class="button primary" data-icon="square-down">DOWNLOAD URCAPX</a>

The HMI plugin file can now be installed using the usual installation procedure of your robot.

### Installing URCap on Universal Robots

1. Click on **Menu → System Menager**.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxjdyxYzGqUXpvFFehllW%2Fimmagine.png?alt=media&amp;token=d23be628-9eba-4051-bd20-078c1501fceb" alt=""><figcaption></figcaption></figure>

2. Select **URCaps** section, then click on **Add URCap** and install Robpod Plugin.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FLbnkK6IsmbaINbaXxz61%2Fimmagine.png?alt=media&amp;token=1b1bc232-bccc-458f-aa1c-2af1a112a3af" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For the HMI panel to work correctly setup the [Security Settings](/appendix/security-settings).
{% endhint %}

### Setup Operator Screen

1. Got to **Application → Operator Screen**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FxtpzKbG3AaVueQV0ZnKR%2Fimmagine.png?alt=media&amp;token=26b24821-4f44-4e89-b425-f81991216d7a" alt=""><figcaption></figcaption></figure>

2. Select **HMI Operator** **Screen**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDyLSDAgNK1uYTyGIyitT%2Fimmagine.png?alt=media&amp;token=1bd79ecc-f025-431a-9da2-03386fce61c2" alt=""><figcaption></figcaption></figure>

3. Click on **Operator** to display Robpod HMI user interface.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FgOS4BxMRggqn2lKzEeg0%2Fimmagine.png?alt=media&amp;token=6f4586f6-241a-40cc-a5ce-7ce45633225d" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Doosan Robotics" %}
Inside Robpod Studio, go to **Tools ->  Robot Plugin ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4pqTHM71pCjS3pjoTLfB%2Fdownload.png?alt=media\&token=2bae1647-d919-411d-addb-c4275dbd8fbc) **Download Plugin.** This will generate a **Robpod Plugin file** with the format of your robot, **DM** file for Doosan Robotics.

You can also download Robpod Plugin here:

<a href="http://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-plugin.dm" class="button primary" data-icon="square-down">DOWNLOAD DART Module</a>

The robot plugin file can be installed using the usual installation procedure of your robot

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F48A3cKAnKg5ffSDj9l8E%2Fhint_doosan_app_step2.gif?alt=media&amp;token=cacab2ed-d4d9-467f-889f-23d204a3bbd8" alt="" width="563"><figcaption><p>Module installation procedure on Doosan DART Platform </p></figcaption></figure>

Open **Robpod App** inside Doosan teach pendant, and keep it open durning HMI development in order to see panel previews.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption><p>Open Robpod App whie developing HMI panels</p></figcaption></figure>
{% endtab %}
{% endtabs %}


# Design Steps

Follow the **Design Steps** below to learn how to use ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMrGmjBMvNWDKwMKe2Afq%2Fhmi_file.png?alt=media\&token=241bf936-463c-4cbf-ae33-0c067a7f611c) [**HMI Designer**](/hmi-designer/introduction) to develop custom panels for the robot teach pendant.

{% content-ref url="/pages/xoMrizh3Jq7TL3xBk7W6" %}
[Create new HMI Panel](/hmi-designer/design-steps/create-new-hmi-panel)
{% endcontent-ref %}

{% content-ref url="/pages/gAnnO43L7POdGXGaFHvl" %}
[Add HMI Components](/hmi-designer/design-steps/add-hmi-components)
{% endcontent-ref %}

{% content-ref url="/pages/zUVxVMlGYwzvm4pKgwUQ" %}
[Edit HMI Components](/hmi-designer/design-steps/edit-hmi-components)
{% endcontent-ref %}

{% content-ref url="/pages/4j1URa42yygjFOtolPT6" %}
[Synchronize HMI Panel](/hmi-designer/design-steps/synchronize-hmi-panel)
{% endcontent-ref %}

{% content-ref url="/pages/riu0Z6hCvmEcHu5kE3S0" %}
[Preview HMI Panel](/hmi-designer/design-steps/preview-hmi-panel)
{% endcontent-ref %}

{% content-ref url="/pages/Nbw0Dn2ddhnz1XLpWV7l" %}
[Run HMI Program](/hmi-designer/design-steps/run-hmi-program)
{% endcontent-ref %}


# Create new HMI Panel

Create a new **HMI Panel File** to start develop a custom panel with Robpod [HMI Designer](/hmi-designer/introduction).

1. Right-click on project folder and select **New ->** ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FMrGmjBMvNWDKwMKe2Afq%2Fhmi_file.png?alt=media\&token=241bf936-463c-4cbf-ae33-0c067a7f611c) **HMI Panel File.**

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2NYJB14TUbnUV3Mp8NlB%2Fimmagine.png?alt=media&amp;token=fb91f53d-69e2-43dd-921b-c8b387b781f6" alt=""><figcaption></figcaption></figure>
2. Choose a file name for the panel, and the HMI Designer Editor will apear.
3. Click on the HMI panel top bar to start editing the panel **UI properties.**

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCV2uI1PatE78TkvudyXs%2Fhmi-top-bar.png?alt=media&amp;token=4fce6ea4-1531-4029-aba4-86d222108638" alt=""><figcaption></figcaption></figure>
4. Using the side tool window you can add **Title** and **Logo** to the HMI panel.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FHgBEHFHlqhQR7G4qJ5kB%2Fhmi-title-logo.png?alt=media&amp;token=05420931-0b47-4b1e-8896-0c0fbdc20d9d" alt=""><figcaption></figcaption></figure>
5. You can use the side tool window also to change the HMI **panel size** in order to fit the **resolution** with the screen of the robot teach pendant you will be using.&#x20;
6. You can also change the **color** settings for top and footer bar.


# Add HMI Components

Once you have created a [new HMI panel](/hmi-designer/design-steps/create-new-hmi-panel), you can start adding **HMI Components** to it.

**HMI Components** are the basic User Interface elements that will compose your HMI panel.

Use the **Palette Toolbar** to add new HMI components to the panel.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FeMol1nPfDwvbgEMtnCEU%2Fhmi-palette-toolbar.png?alt=media&amp;token=22999f4a-8112-475e-ba6d-5fc93831b7ec" alt=""><figcaption></figcaption></figure>

Click on a HMI Components **to move it or change its size.**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F1gTwtnwqrAMMHuEMRosT%2Fhmi-resize.png?alt=media&amp;token=58dd9d47-01c2-44b3-8e03-22e34a3b43f4" alt=""><figcaption></figcaption></figure>

You can view and [edit the properties](/hmi-designer/design-steps/edit-hmi-components) of the selected HMI Component on the **side tool window.**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FcnH8JRIaDf46E1oWquH4%2Fhmi-sidebar.png?alt=media&amp;token=5aedd100-a215-44a4-a3ae-5332bb5642d8" alt=""><figcaption></figcaption></figure>

Each HMI components has is own characteristic properties that determines how it looks and how it will interact with the robot program. Have a look a the [HMI components list](/hmi-designer/hmi-components) to check properties of each element.


# Edit HMI Components

After [adding components](/hmi-designer/design-steps/add-hmi-components) to the panel you can edit them to change their appearance and determine how they will interact with the robot program.

Select the component that you want to edit and use the side toolwindow to change its properties.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FPrTLGWXkTZv5RSCm3MHA%2Fhmi-side-details.png?alt=media&amp;token=ff8a040d-6909-48ab-a7be-8712151a0742" alt=""><figcaption></figcaption></figure>

Inside the side toolwindow you will find two different gropus of properties: **UI properties** and **Program Properties**.

**UI Properties** are used to configure the components graphical look, i.e colors, size, formatting, alignment, icons.

**Program Properties** instead are used to configure how the graphical element will interact with the robot program. This is achieved linking the component with variables or functions defined inside the robot program. I.e. you can link a button with a function, in this way each time the button is cliked the choosen function will be executed.

{% tabs %}
{% tab title="Universal Robots" %}

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FeBsqfKi9tTO2Uav9arsS%2Fhmi-commnad.png?alt=media&amp;token=e3e30f4a-41c5-45c9-81c5-838a2653398f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can develop the robot functions both with **Polyscope** or with **Scripting** as you prefer, just remeber to use the same function name to link it with the HMI component.
{% endhint %}
{% endtab %}

{% tab title="Doosan Robotics" %}

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FrrVBDQ9kEpX3wY1L5Ld8%2Fdoosan-drl-sub.png?alt=media&amp;token=73ec2f43-8ec2-4798-952e-efd34cac21f0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can develop the robot functions both with **Task Editor** or with **Scripting** as you prefer, just remeber to use the same function name to link it with the HMI component.
{% endhint %}
{% endtab %}
{% endtabs %}

Each HMI components has is own characteristic properties that determines how it looks and how it will interact with the robot program. Have a look a the [HMI components list](/hmi-designer/hmi-components) to check properties of each element.


# Preview HMI Panel

You can use the **preview toolbar** to get an idea of how the designed HMI panel will look like. Using the preview function can be usefull because HMI panel will not look exactly the same on every device.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FgccESXK9EPMhsRnP9GM5%2Fhmi-preview.png?alt=media&amp;token=63077be7-da61-43df-b326-6a04e61e36e1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Robot plugin must be [installed ](/hmi-designer/installation)on robot to launch the preview on robot teach pendant.
{% endhint %}

{% hint style="info" %}
Keep in mind that the preview function will not launch a working instance of your HMI panel, but just a graphical preview.
{% endhint %}

### Local Preview

Select ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FyXv8bHgK23qsGs2hHlaa%2FcwmScreenOn.png?alt=media\&token=0a5d837e-abb1-4682-9f72-8f357f9e18a7)**Local** option and click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FRzPAPtMhuSaJYj00p9ML%2Fpreview.png?alt=media\&token=a7430e57-44d3-4465-a44f-74a4c148fb60)**Preview** to launch the preview on your PC.

### Remote Preview

{% tabs %}
{% tab title="Universal Robots" %}
Select ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4sbebWI42Ih3acKJHofo%2Frobot.png?alt=media\&token=ba8fa95c-2362-444e-b988-06a4c98b337a)**Robot** option and click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FRzPAPtMhuSaJYj00p9ML%2Fpreview.png?alt=media\&token=a7430e57-44d3-4465-a44f-74a4c148fb60)**Preview** to launch the preview directly on robot teach pendant.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FuHRpvKQT2xXTpkWeMOAU%2Fhmi-launch-preview.png?alt=media&amp;token=6fa2e364-66d8-4eba-8122-b641cd1ab905" alt=""><figcaption></figcaption></figure>

{% endtab %}

{% tab title="Doosan Robotics" %}
Open **Robpod App** inside Doosan teach pendant and keep it open durning the procedure.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption></figcaption></figure>

Select ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4sbebWI42Ih3acKJHofo%2Frobot.png?alt=media\&token=ba8fa95c-2362-444e-b988-06a4c98b337a)**Robot** option and click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FRzPAPtMhuSaJYj00p9ML%2Fpreview.png?alt=media\&token=a7430e57-44d3-4465-a44f-74a4c148fb60)**Preview** to launch the preview directly on robot teach pendant.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FuHRpvKQT2xXTpkWeMOAU%2Fhmi-launch-preview.png?alt=media&amp;token=6fa2e364-66d8-4eba-8122-b641cd1ab905" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}


# Synchronize HMI Panel

Once you have [designed ](/hmi-designer/design-steps/edit-hmi-components)an HMI panel, before [running ](/hmi-designer/design-steps/run-hmi-program)it on the robot, you need to transfer the **.hmi** file to the robot. In this way the panel will be permanently saved on the robot.

You can use Robpod Studio [**Synchronization** ](/synchronization/upload-on-robot)feature to automatically transfer the HMI panel file.

{% tabs %}
{% tab title="Universal Robots" %}
Click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21)**Synchronize** to transfer the HMI panel to the robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fip5FM5qTYHjcWZ8f7POD%2Fhmi-synchronize.png?alt=media&amp;token=32b652e1-e715-40f1-9b59-7839bceb6f74" alt=""><figcaption></figcaption></figure>

Now the HMI panel is stored on the robot, and everything is ready to [run the program](/hmi-designer/design-steps/run-hmi-program).
{% endtab %}

{% tab title="Doosan Robotics" %}
Open **Robpod App** inside Doosan teach pendant and keep it open durning the procedure.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F0lwbF3U1UjrCpIcDjOsk%2Fhint_doosan_app_step1.gif?alt=media&amp;token=060cb8a5-ce22-4bb5-8a0d-364d4e9c7278" alt="" width="563"><figcaption></figcaption></figure>

Click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21)**Synchronize** to transfer the HMI panel to the robot.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fip5FM5qTYHjcWZ8f7POD%2Fhmi-synchronize.png?alt=media&amp;token=32b652e1-e715-40f1-9b59-7839bceb6f74" alt=""><figcaption></figcaption></figure>

Now the HMI panel is stored on the robot, and everything is ready to [run the program](/hmi-designer/design-steps/run-hmi-program).
{% endtab %}
{% endtabs %}


# Run HMI Program

After having ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21)[synchronized ](/hmi-designer/design-steps/synchronize-hmi-panel)the HMI panel you are ready to run the robot program.

Build the robot program as you usually do, making sure that all all variables and functions linked inside the HMI panel are defined also inside the program.&#x20;

{% hint style="info" %}
Robot plugin must be [installed ](/hmi-designer/installation)on robot to run the HMI on robot teach pendant.
{% endhint %}

{% tabs %}
{% tab title="UR Polyscope 5" %}

1. Go to **URCaps** menu and select the **HMI** command.
2. Add the HMI command inside the program after variables and function definitions.
3. Select the HMI panel that you want to display for this program.
4. Choose **stop main loop** if you want to block the main program execution to the HMI command and delegate to it execution of robot functions.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F6Cy2D5sJIDNya4wBksv6%2Fhmi-polyscope.png?alt=media&amp;token=a42e9b79-3f45-4cf2-ab64-5268776976ab" alt=""><figcaption></figcaption></figure>

Then **play** the robot program to execute it and display the HMI panel.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FyszWhxqCPVPfVDzwvlzF%2Fimmagine.png?alt=media&amp;token=49c99ac7-dd25-4f2e-9ab2-857121547b34" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you can not find the HMI Command make sure to have previously [installed ](/hmi-designer/installation)the HMI plugin.
{% endhint %}

{% hint style="info" %}
More detail about how to structure a HMI program using Polyscope can be found in section: [HMI and Polyscope Program](/hmi-designer/hmi-and-ur-polyscope)
{% endhint %}
{% endtab %}

{% tab title="UR Polyscope X" %}

1. Click on **Add**, go to **URCaps** menu and select the **HMI** command.
2. Add the HMI command inside the program after variables and function definitions.
3. Select the HMI panel that you want to display for this program.
4. Choose **stop main loop** if you want to block the main program execution to the HMI command and delegate to it execution of robot functions.
5. Run the program, and click on **Operator** to display the HMI panel.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fcd44siS9uGdgwZCF8K2C%2Fezgif-75c758c7c3ed304e.gif?alt=media&amp;token=371ca651-6ad2-45ea-9d30-7b6a681e8347" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="UR Polyscope 3" %}

1. Go to **URCaps** menu and select the **HMI** command.
2. Add the HMI command inside the program after variables and function definitions.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fy3vLlWwgYgE6gc2Ma3yz%2Fimmagine.png?alt=media&amp;token=21b306b1-74ef-4766-b8a4-09aa1d6e36a9" alt=""><figcaption></figcaption></figure>
3. Select the HMI panel that you want to display for this program.
4. Choose **stop main loop** if you want to block the main program execution to the HMI command and delegate to it execution of robot functions.

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjVWnKPVN5qHmo6pO2yiC%2Fimmagine.png?alt=media&amp;token=a8c8e007-b05f-4b8d-921e-d04beac32ffa" alt=""><figcaption></figcaption></figure>

Then **play** the robot program to execute it with the running HMI panel.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F1pIT6T3fC6535QZ6DKqC%2Fimmagine.png?alt=media&amp;token=f765b231-969a-479b-b002-fc3ce37a712d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you can not find the HMI Command make sure to have previously [installed ](/hmi-designer/installation)the HMI plugin.
{% endhint %}
{% endtab %}

{% tab title="Doosan Robotics" %}

1. Open a new **Task Editor** file and go to the command list.
2. Add a **Robpod HMI** command at the end of the program.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FJkf9t3ZLLzIh6byYXNW1%2Fdr-hmi-1.png?alt=media&amp;token=dd73e44c-2e09-4cf4-ba7b-5afda847c2ae" alt="" width="563"><figcaption></figcaption></figure>

1. Inside the property tab, select the HMI file you want to execute.
2. Click on **Confirm**.
3. Run the program.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fh3EVtgGlaEQDCXXL9R7S%2Fdr-hmi-2.png?alt=media&amp;token=634f0856-a79d-44a6-bd85-34d655b41ace" alt="" width="563"><figcaption></figcaption></figure>

The HMI panel will be displayed inside Robpod App.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FVTI4B9pytkPllQ5W6CgL%2Fdr-hmi.PNG?alt=media&amp;token=0dd8d1a7-1849-43d8-a52e-815786793f9c" alt="" width="563"><figcaption></figcaption></figure>

{% endtab %}
{% endtabs %}


# HMI Components

You can find in this section details about **HMI components** and how they interact with robot functions and variables.&#x20;

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2a5vQNyFnSGUd0ydfiDO%2Flabel.png?alt=media&amp;token=0dc09c7a-a92f-4185-9d22-ae80a9d8c295" alt=""> Label</summary>

Label components are used to display fixed text information.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FQOY48aD1C7hJ1fHP9sSg%2Fbutton.png?alt=media&amp;token=3dfe84c7-629b-4652-ba0a-2ae1972cc486" alt=""> Button</summary>

Buttons are used to let users trigger robot **actions**.

Actions are expressed as robot **commands**. Any valid robot command can be linked to a button.&#x20;

Valid command examples for Universal Robots:

* ```python
  movej([1.56, -1.93, 1.69, -1.33, -1.57, -0.01]) # robot function
  ```
* ```python
  my_function() # user defined function
  ```
* ```python
  x = 100 # assignment
  ```
* ```python
  c = c + 1 # command
  ```

Actions **scope** can be configured as **MAIN** or **BACKGROUND**.&#x20;

The scope parameter is used to determine how the action will be executed by the robot. **MAIN** option is used to execute the command in the main thread, while **BACKGROUND** is used to execute the command inside a new thread.&#x20;

Multiple **BACKGROUND** actions can be executed simultaneously, while **MAIN** actions can be executed just one at time.&#x20;

You can also give the action a **display name** that will be shown on the HMI panel while the action is running.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FlD7xBJvlk1DmWOEJAPNv%2Ftab.png?alt=media&amp;token=e98111bf-ee96-4217-98b4-4a655e1ee944" alt=""> Tab</summary>

Tabs can be used to split the HMI panel in multiple sections.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FYQqDRDvmctCuaZfzJoRJ%2Fmonitor.png?alt=media&amp;token=caa0425b-cf53-430d-a346-9bd1ac077b24" alt=""> Monitor</summary>

Monitors can be used to display live runtime values on the HMI panel.

Monitors can be linked with **robot variables** of any type or with commands returning a value.

Valid linking examples for Universal Robots:

* ```python
  my_variable # user defined variable
  ```
* ```python
  get_actual_joint_positions() # robot function
  ```
* ```python
  my_function() # user defined function
  ```
* ```python
  x + y # command with return value
  ```

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FI2JTMcc6FfDDaXLuyDeg%2Finput.png?alt=media&amp;token=a0cfe021-121b-4156-b1d1-f252e7e499c8" alt=""> Input</summary>

Inputs compnents are used to let users set or change a value assigned to a **robot variable**.

Inputs can be linked with any robot variables with type Int, Float or String.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FNaTXX2O2tMH3JYQFStGv%2FlocalScopeAction.png?alt=media&amp;token=b9ff8d30-f940-40ed-ab04-2a893ebda8dd" alt=""> Pose Input</summary>

Pose Input compnents are used to let users set or change a **robot position** value assigned to a variable.

Pose Inputs can be linked with any robot variables of type **Tool Pose** (cartesian pose) or **Joint Pose**.&#x20;

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FzZAIFisB9lpLD10ZFVtk%2Fimage.png?alt=media&amp;token=4885a314-ff28-4cad-b297-4ae307cf4dcf" alt=""> Image</summary>

Image components are used to display a fixed picture on the HMI panel.

Like buttons images can be used by user trigger robot actions.&#x20;

Actions are expressed as robot **commands**. Any valid robot command can be linked to a button.&#x20;

Valid command examples for Universal Robots:

* ```python
  movej([1.56, -1.93, 1.69, -1.33, -1.57, -0.01]) # robot function
  ```
* ```python
  my_function() # user defined function
  ```
* ```python
  x = 100 # assignment
  ```
* ```python
  c = c + 1 # command
  ```

Actions **scope** can be configured as **MAIN** or **BACKGROUND**.&#x20;

The scope parameter is used to determine how the action will be executed by the robot. **MAIN** option is used to execute the command in the main thread, while **BACKGROUND** is used to execute the command inside a new thread.&#x20;

Multiple **BACKGROUND** actions can be executed simultaneously, while **MAIN** actions can be executed just one at time.&#x20;

You can also give the action a **display name** that will be shown on the HMI panel while the action is running.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FDxIvdwLUHEUCVJYPN6qh%2Fdropdown.png?alt=media&amp;token=447092b1-a6af-47a0-bc61-9cb78412c471" alt=""> DropDown</summary>

DropDown components are used to let users choose a value among a fixed list of elements.

DropDowns are linked to robot variables with type String.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fs28B2hpWOyLVlqLdxgoU%2Fcheckbox.png?alt=media&amp;token=9f0573ba-19db-4949-827a-077f77c6f190" alt=""> CheckBox</summary>

CheckBox components are used to let use choose a ON/OFF value.

CheckBoxs are linked to robot variables with type Boolean or Integer.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FrzG1MYUT6VOtdjlht1Q8%2Fslider.png?alt=media&amp;token=012bd56a-d0f1-4ff4-9143-96583d553e6a" alt=""> Slider</summary>

Slider components are used to let users choose a valued inside a fixed range.

Sliders are linked to robot variables with type Integer.

</details>

<details>

<summary><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FtMHVfrROM58j34J424yf%2Fchart.png?alt=media&amp;token=1b322c30-5593-48f4-a41a-0281f9cdca75" alt=""> Chart</summary>

See [HMI Charts](/hmi-designer/hmi-charts) section.

</details>


# HMI Charts

**HMI Charts** are [HMI components](/hmi-designer/hmi-components) that can be used to show data in a graphical way. Chart visualization is updated automatically at runtime based on values of linked robot variables.

Supported chart types are: Time series, Bar / Histogram, Pie / Circle, Indicator.

<table data-header-hidden data-full-width="false"><thead><tr><th align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FIYS4VQ2u6iDilILWPTzj%2Fscreenshot.png?alt=media&amp;token=d68a14de-e1d2-4c84-917c-89de48568795" alt=""></td><td align="center"><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FduHOyd1vITyfKoEWbgem%2Fhmi_chart_monitoring.png?alt=media&amp;token=d81e2821-8bb8-46e9-89f7-f67671e81b05" alt=""></td></tr></tbody></table>

### Adding a Chart

Charts can be added to a panel using the ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FtMHVfrROM58j34J424yf%2Fchart.png?alt=media\&token=1b322c30-5593-48f4-a41a-0281f9cdca75) button inside the [HMI Palette Toolbar](/hmi-designer/user-interface).

Then use the side HMI Component Properties panel to configure the chart and its appearance, like for example the chart type and its colors.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FfZOYLSu2WkYX10XxpDEq%2Fhmi-chart.png?alt=media&amp;token=d4de78b7-63c7-4302-ad37-fbaedf839478" alt=""><figcaption></figcaption></figure>

### Linking a Chart

HMI charts are linked to robot variables using **Chart Data Seires.**

Data series can be added and edited using the side Component Properties panel. Each chart can have any number of data series, and each data series is linked to a **robot variable**, for which name and type must be specified.

Valid linking examples for Universal Robots:

* ```python
  my_variable # user defined variable
  ```
* ```python
  get_standard_digital_in(0) # robot function
  ```
* ```python
  my_function() # user defined function
  ```
* ```python
  x + y # command with return value
  ```

{% tabs %}
{% tab title="Universal Robots" %}
{% embed url="<https://www.youtube.com/watch?v=CkXb3qBov2I>" %}
HMI Chart Tutorial
{% endembed %}
{% endtab %}

{% tab title="Doosan Robotics" %}
{% embed url="<https://youtu.be/fIqPECBnsfE>" %}
HMI Chart Tutorial
{% endembed %}
{% endtab %}
{% endtabs %}

### Exporting Data

When you are connected with the [Remote Desktop Viewer](/hmi-designer/desktop-hmi-viewer) to a running Robpod HMI application, you can export and save chart data.

Right click on the chart, then choose:

* **Save as**, to save the chart as a png or jpeg image
* **Export**, to export data in CSV format.

Images and data will be available on your desktop PC for later usage.

{% embed url="<https://www.youtube.com/watch?v=lxia1HC31-k>" %}


# Display Conditions

**Display Conditions** can be used to change the runtime status of [HMI Components ](/hmi-designer/hmi-components)while the robot program is running.&#x20;

Changing runtime status of HMI elements can be usefull to:

* **Show** or **Hide** HMI components
* **Enable** or **Disable** HMI components

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FNcd7PhlrLAJkAbN3sInS%2Fhmi-display-conditions-v2.gif?alt=media&amp;token=47848b80-26ba-4e00-a838-0689aeb51c50" alt=""><figcaption><p>Display Conditions can be used to change appearance of UI components.</p></figcaption></figure>

Display Conditions can be expressed as simple **boolean variables** or as more complex **conditional statements**. You can setup Display Conditions for each HMI component inside its properties panel.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Foc3pzX8UqTlgwAdk6EbF%2Fhmi-display-conditions.png?alt=media&amp;token=114c9d56-ee12-43b4-acd3-42cbb848f8e8" alt=""><figcaption><p>Display Conditions can be configured inside the HMI Properties panel of each UI components.</p></figcaption></figure>

{% hint style="info" %}
Display Conditions can be set as:

* boolan variables
* functions returning a boolean value
* conditional statements equivalent to a boolean value&#x20;
  {% endhint %}

{% embed url="<https://www.youtube.com/watch?v=3QRPgzhc-zA>" %}

Runtime status of HMI components can be changed also programmatically using [HMI Commands.](/hmi-designer/hmi-commands)

You can see Display Conditions in action inside the [Machine Tending Example](/hmi-designer/working-examples/universal-robots/machine-tending-example).


# HMI Commands

When coding robotics application with Robpod Studio, a set of special functions called **HMI Commands** is available to interact with HMI graphical components from the robot program.

HMI Commands are usefull to Show/Hide or Enable/Disable HMI components.

{% embed url="<https://youtu.be/WfcdKZJYw_w>" %}

#### List of HMI commands

| Command Name                     | Description                                                                                                                       | Parameters                                                                                                                                                                                                                                                                                                                  |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **hmi\_set\_enabled**(id, value) | Set enable status of UI component. This function can be used to enable or disable a HMI component while robot program is running. | **id** - String, Id of UI component. Identifier of UI component whose enable status you want to change. In the HMI editor, right-click on component and select Copy Id to get its string identifier. **value** - Bool, Enable status value to set for UI component. False will disable the component, True will enabled it. |
| **hmi\_set\_visible**(id, value) | Set visibility of UI component. This function can be used to hide or show a HMI component while robot program is running.         | **id** - String, Id of UI component. Identifier of UI component whose visibility you want to change. In the HMI editor, right-click on component and select Copy Id to get its string identifier. **value** - Bool, Visibility value to set for UI component. False will hide the component, True will display it.          |
| **hmi\_set\_tab**(index)         | Change the current displayed tab.                                                                                                 | **index** - Integer, index of tab (starting from 0) to be displayed.                                                                                                                                                                                                                                                        |


# HMI Icon Generator

The **Icon Generator tool** can be used to facilitate the creation of a uniform set of images and icons within HMI panels.

When adding images or icons inside [HMI Designer](/hmi-designer/introduction), click on ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FeCDKSBbxupl1UnA5Nh4E%2FmagicResolve.png?alt=media\&token=884e4625-134a-4c20-9c96-452202994d6d) **Generate...** to open the Icon Generator Tool.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FRMBUeawHpxgBODhag0MR%2Ficon-generator.png?alt=media&amp;token=ecad470c-533e-4ec8-9d84-143ed434f9e3" alt=""><figcaption></figcaption></figure>

Inside the Icon Generator Tool you can search and choose an icon, change its color and size. Then, after you click **OK**, the icon will be applied to the target HMI component.

{% hint style="info" %}
Icon Generator is available starting from **Robpod Studio 1.2.3 release**.
{% endhint %}

## Icon8 Packages

Other set of icons can be found on [**Icons8**](https://icons8.com/) platform.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FZKLQKIGE088WOKOaKWwd%2Fimage-grid.png?alt=media&amp;token=a9ea35a7-4edc-4f18-93d8-9d89d33b4115" alt=""><figcaption></figcaption></figure>


# Desktop HMI Viewer

When you have a [running ](/hmi-designer/design-steps/run-hmi-program)HMI panel on your robot, you can use the **Robpod HMI Viewer** to display and interact with the panel remotely from your PC.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FF4Mk8c9Bra1Ds1AqSodz%2Fviewer.png?alt=media&amp;token=614c69d5-dccc-42f5-9a40-52cb0a2309de" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="UR - Polyscope 5 or 3" %}
Latest version of **Robpod HMI Viewer** can be download here:

| Download                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------- |
| [Robpod HMI Viewer Latest Release](https://github.com/robpodcloud/robpod-studio/releases/latest/download/robpod-hmi-viewer.zip) |

Launch Robpod HMI Viewer application and specify the robot IP address to connect with, and click on **CONNECT**.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FI3kyFUuBBt2edHaHx94N%2Fimmagine.png?alt=media&amp;token=3b35cf3d-f2f6-4033-99e1-fa8999455e35" alt="" width="217"><figcaption></figcaption></figure>

{% hint style="info" %}
Robot network must be reachable from your PC in oreder to connect with it.
{% endhint %}

After successful connection, the running HMI Panel will apear also on your Desktop Environment.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FeySLdoaFBnL3eMkYdEpu%2Fimmagine.png?alt=media&amp;token=e33f7954-b87d-4888-aab1-676ece97194b" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Doosan Robotics" %}
To view the HMI remotely you can use the standard Doosan **DART Platform** software installed on your PC.
{% endtab %}
{% endtabs %}


# HMI and UR Polyscope

There are several ways to structure an [HMI program](/hmi-designer/introduction) within the UR polyscope program editor, and typically each developer has his own preferred way. Below you can find the two most used ways to structure a program with HMI (a mix of the two is also possible):

* Interaction based on variables
* Interaction based on functions

### **Interaction based on variables**

In this scenario, to triger a robot action, HMI Buttons are linked to program (or installation) variables . Robot task is defined inside the Main Program, which can loop continuously.&#x20;

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FXrwZTxS3Fpw5EpbG4lVw%2Fvariable_based.png?alt=media&amp;token=fdaadf7a-1b57-4411-8213-ed4d5ae4dc9a" alt=""><figcaption></figcaption></figure>

### **Interaction based on functions**

In this scenario, to triger a robot action, HMI Buttons are linked to program functions (called Sub Program inside Polyscope). Robot tasks are defined inside Sub Programs, which are automatically called by HMI components. As robot tasks are executed inside Sub Programs, Main Program can be stopped as it is not required to loop continuously.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F805irXgkxAUFhmdP0TTE%2Ffunction_based.png?alt=media&amp;token=c4917dad-b392-4afd-a1ae-db86b978e472" alt=""><figcaption></figcaption></figure>


# HMI and Doosan Robotics

There are several ways to structure an [HMI program](/hmi-designer/introduction) with Doosan Task Editor, and typically each developer has his own preferred way. Below you can find the two most used ways to structure a program with HMI (a mix of the two is also possible):

* Interaction based on functions
* Interaction based on variables

### **Interaction based on functions**

In this scenario motion actions are defined inside functions (Sub) linked to HMI buttons.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FEqInNwwth2SGUqFMa29R%2Fdr-hmi-functions.png?alt=media&amp;token=9a97f90e-440b-48ff-acf8-27263447c46a" alt=""><figcaption></figcaption></figure>

### **Interaction based on variables**

In this scenario motion actions are defined inside the Main program. HMI buttons are linked with variables, used to control the main program flow.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjxD5HzMjfvO84167Gh7u%2Fdr-hmi-variables.png?alt=media&amp;token=658567e2-0035-400d-96e9-8134a36a3ed6" alt=""><figcaption></figcaption></figure>


# HMI Tutorials

You can follow this step by step video tutorials to learn how to use Robpod [HMI Designer](/hmi-designer/introduction).

### Univaersal Robots

[Beginner Tutorial](/hmi-designer/hmi-tutorials/beginner-tutorial)

[UR Polyscope Tutorial](/hmi-designer/hmi-tutorials/ur-polyscope-tutorial)

### Doosan Robotics

[Doosan Robotics Task Editor Tutorial](/hmi-designer/hmi-tutorials/doosan-robotics-task-editor-tutorial)

[Doosan Robotics DRL Tutorial](/hmi-designer/hmi-tutorials/doosan-robotics-drl-tutorial)

Check complete tutorials source code on <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FO6ruM93NPTjLkk00jsl3%2Fgithub.png?alt=media&amp;token=dda4278d-5853-41cb-b138-9b5beba668c8" alt="" data-size="line"> [GitHub ](https://github.com/robpodcloud/robpod-studio)page.


# Beginner Tutorial

In this tutorial a **Pick and Place** application with HMI panel for Universal Robots is developed starting from scratch. URScript is used as preferred programming mode in this tutorial.

Covered topics:

* HMI Desinger introduction and navigation
* HMI Robot Plugin Installation
* HMI graphical components setup
* Linking with robot variables and functions
* Running the HMI application on robot teach pendant

{% embed url="<https://youtu.be/VsnTIF-bgZ0>" %}

**Resources**

{% file src="/files/WO2nnWFY6pyaqrkF8sSn" %}
Robot Script file
{% endfile %}

{% file src="/files/ynVGwCsLLsYkQaFivFR1" %}
Robpod HMI panel file
{% endfile %}


# UR Polyscope Tutorial

In this tutorial a simple HMI panel for a welding application is developed using HMI Designer. The general idea is to give users the freedom to adjust points in a an easy and flexible way. For this tutorial  Universal Robots **PolyScope** programming is used for programming to show how to develop HMI applications without scripting knowledge.

Covered topics:

* Intoduction to Robpod HMI Designer
* HMI Design and UI components
* UR Polyscope programming
* Linking UI components to robot functions and variables
* Running the HMI program on robot teach pendant

{% embed url="<https://www.youtube.com/watch?v=F0h9GxMUgvQ>" %}

**Resources**

{% file src="/files/YWKCWjj1KOlvFeLHt4SC" %}
Robpod HMI panel file
{% endfile %}

{% file src="/files/jyFn1RmUiBGQeViJrkMo" %}
Polyscope Program
{% endfile %}


# Doosan Robotics Task Editor Tutorial

In this tutorial a **Pick and Place** application with a custom HMI panel for Doosan Robotics is developed starting from scratch. Graphical Task Editor is used as preferred programming mode in this tutorial, so no coding knowledge is required.

Covered topics:

* HMI Desinger introduction and navigation
* HMI Robot Plugin Installation
* HMI graphical components setup
* Linking with robot variables and functions
* Running the HMI application on robot teach pendant

{% embed url="<https://www.youtube.com/watch?v=14zlAo42lEw>" %}

### Resources

{% file src="/files/0oEMTJJYCga62BzCm2UT" %}
Pick and Place HMI file
{% endfile %}

{% file src="/files/yZF5pkD1z3d1fyGm0aB9" %}
Pick and Place Task Edior File
{% endfile %}


# Doosan Robotics DRL Tutorial

In this tutorial a **Polishing** application with a custom HMI panel for Doosan Robotics is developed starting from scratch. DRL Scripting is used as preferred programming mode in this tutorial, so basic knowlege of Python programming language is suggested.

Covered topics:

* HMI Desinger introduction and project setup
* Custom HMI panel Design and UI components setup
* HMI Robot Plugin Installation
* Linking robot variables and functions
* Running the HMI application on robot teach pendant

{% embed url="<https://youtu.be/eKIPzn4Pcts>" %}

### Resources

{% file src="/files/tdREA6o7FHUkQjTS0i7c" %}
HMI file
{% endfile %}

{% file src="/files/HwZT713gh2y4JtGuoAj1" %}
DRL script file
{% endfile %}

{% file src="/files/gFYBFbK2oP9upxdKEcsu" %}
DART Platform Task&#x20;
{% endfile %}


# Working Examples


# Universal Robots

In this section you can find working examples of HMI robot programs.

[Pick and Place Example](/hmi-designer/working-examples/universal-robots/pick-and-place-example)

[Polishing Example](/hmi-designer/working-examples/universal-robots/polishing-example)

[Machine Tending Example](/hmi-designer/working-examples/universal-robots/machine-tending-example)

[Depalletizing Example](/hmi-designer/working-examples/universal-robots/depalletizing-example)

[Welding Example](/hmi-designer/working-examples/universal-robots/welding-example)

[Chart Monitoring Example](/hmi-designer/working-examples/universal-robots/chart-monitoring-example)

[Production Mix Example](/hmi-designer/working-examples/universal-robots/production-mix-example)

[Pallettizing Example](/hmi-designer/working-examples/universal-robots/pallettizing-example)

[Camera QA Example](/hmi-designer/working-examples/universal-robots/camera-qa-example)

[Assembly Example](/hmi-designer/working-examples/universal-robots/assembly-example)

[Path Recording Example](/hmi-designer/working-examples/universal-robots/path-recording-example)

[Nudge Example](/hmi-designer/working-examples/universal-robots/nudge-example)

Check complete examples source code on <img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FO6ruM93NPTjLkk00jsl3%2Fgithub.png?alt=media&amp;token=dda4278d-5853-41cb-b138-9b5beba668c8" alt="" data-size="line"> [GitHub ](https://github.com/robpodcloud/robpod-studio)page.


# Pick and Place Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FGIFlHZV1xjgApM3FL1Ts%2Fhmi-pick-place-example.png?alt=media&amp;token=fb762e7e-8f98-49e5-bb89-8c46ad6db406" alt=""><figcaption></figcaption></figure>

{% file src="/files/1WyAXgZXQSEE1AcEWkeK" %}

**Robot Program File**

```python
# variables
global velocity = 200
global loop_forever = False
global repetitions = 2
global gripper_status = "ACTIVATED"
global counter = 0
global aborted = False
global completed = False
global status = "READY"

# positions (can be defined also as installation variables to store their value)
global pick_pose = p[0, 0, 0, 0, 0, 0]
global place_pose = p[0, 0, 0, 0, 0, 0]

# functions
def open_gripper():
    if gripper_status == "ACTIVATED":
        textmsg("open")
        #rq_open()
    end
end

def close_gripper():
    if gripper_status == "ACTIVATED":
        textmsg("close")
        #rq_close()
    end
end

def pick(pose):
    if not aborted:
        status = "PICKING"
        approach = pose_trans(pose, p[0, 0, -0.1, 0, 0, 0])
        movel(approach, a=0.1, v=velocity/1000)
        movel(pick_pose, a=0.1, v=velocity/1000)
        close_gripper()
        movel(approach, a=0.1, v=velocity/1000)
    end
end

def place(pose):
    if not aborted:
        status = "PLACING"
        approach = pose_trans(pose, p[0, 0, -0.1, 0, 0, 0])
        movel(approach, a=0.1, v=velocity/1000)
        movel(pick_pose, a=0.1, v=velocity/1000)
        open_gripper()
        movel(approach, a=0.1, v=velocity/1000)
    end
end

def start_task():
    global counter = 0
    global aborted = False
    global completed = False
    while (not aborted) and (loop_forever or counter < repetitions):
        pick(pick_pose)
        place(place_pose)
        pick(place_pose)
        place(pick_pose)
        counter = counter + 1
    end
    completed = True
    status = "READY"
end

def stop_task():
    global aborted = True
    status = "STOPPING..."
    while not completed:
        sleep(0.1)
    end
end
```

{% file src="/files/fgMjMPGTlyVEKzp37eeS" %}


# Polishing Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FNr2nXmvEVLQsUDFyJnQo%2Fhmi-polishing-example.png?alt=media&amp;token=7e41faf2-7545-4ad3-aa45-ab27417d0061" alt=""><figcaption></figcaption></figure>

{% file src="/files/mtRCZeskONXPkp9UBTpD" %}

**Robot Program File**

```python
# variables
global step = 100
global radius = 30

# positions (can be defined also as installation variables to store their value)
global pa = p[0, 0, 0, 0, 0, 0]
global pb = p[0, 0, 0, 0, 0, 0]
global pc = p[0, 0, 0, 0, 0, 0]
global pd = p[0, 0, 0, 0, 0, 0]

# functions
def polish():
    d_ab = point_dist(pa, pb)

    repetitions = floor(d_ab / (step/1000))
    percentage_ab = (step/1000) / d_ab
    percentage_cd = 1 / repetitions

    i = 0
    while i < repetitions:
        p1 = interpolate_pose(pa, pb, i * percentage_ab)
        movel(p1, a=0.1, v=0.2, r=radius/1000)

        p2 = interpolate_pose(pc, pd, i * percentage_cd)
        movel(p2, a=0.1, v=0.2, r=radius/1000)

        p3 = interpolate_pose(pc, pd, (i + 1) * percentage_cd)
        movel(p3, a=0.1, v=0.2, r=radius/1000)

        p4 = interpolate_pose(pa, pb, (i + 1) * percentage_ab)
        movel(p4, a=0.1, v=0.2, r=radius/1000)

        i = i + 2

    end
end
```

{% file src="/files/88S0raYdfvxM72sj3h6C" %}


# Palletizing PSX Example

This palletizing example shows how to develop a palletizing program with a custom HMI. Using the custom HMI panel users can define the pallet layout (layers, rows, and columns), set the box dimensions, select the pallet side, and monitor the task status in real time.

### **HMI Panel File**

<div><figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F2IVirTyK5P1ybC4fhjmo%2Fimmagine.png?alt=media&amp;token=a91850d9-bf2b-4a09-be01-e43863bf0349" alt=""><figcaption></figcaption></figure> <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FZnR8u3tcOk0qJ1kiWZNg%2Fimmagine.png?alt=media&amp;token=d4300160-9f4a-4f0d-b4b7-098e27b38dc5" alt=""><figcaption></figcaption></figure></div>

{% file src="/files/KGBnY6bU6OvN0ST1kGqC" %}

### **Robot Program File**

{% code lineNumbers="true" expandable="true" %}

```python
# PALLETIZING APP
# definitions of variables and features marked with APPLICATION tag should be removed from this script and defined as
# application variables in order to store their last assigned value after program restart

# --- Variables ---

# box setup
box_length = 300 #APPLICATION
box_width = 400 #APPLICATION
box_height = 200 #APPLICATION

# pallet setup
rows = 2 #APPLICATION
columns = 4 #APPLICATION
layers = 8 #APPLICATION

# pallet sides
A = "A"
B = "B"
selected_pallet = A #APPLICATION

completed_A = False #APPLICATION
completed_B = False #APPLICATION
enabled_A = True #APPLICATION
enabled_B = True #APPLICATION

COMPLETED = "COMPLETED"
DISABLED = "DISABLED"
MISSING = "MISSING"
AVAILABLE = "AVAILABLE"

# features
A_FEATURE = p[-0.580, 0.528, -0.860, 0, 0, 0] #APPLICATION
B_FEATURE = p[0.580, -0.528, -0.860, 0, 0, 3.1415] #APPLICATION
pallet_feature = A_FEATURE

BOX_FEATURE = p[-0.860, -0.211, -0.350, 0, 0, 1.571] #APPLICATION

# start condition
start_row = 1 #APPLICATION
start_column = 1 #APPLICATION
start_layer = 1 #APPLICATION

# stats
tot_boxes = 0
current_boxes = 0
remaining_boxes = 0
box_counter = "" + "/" + ""
cycle_time = 10
remaining_time = 0

# state variables
repeat = False
running = False
stopping = False

# --- Functions ---
def get_pick_pose():
    x = box_length * 0.0005
    y = box_width * 0.0005
    z = box_height * 0.001
    return pose_trans(BOX_FEATURE, p[x, y, z, 0, 3.1415, 0])
end

def get_place_pose(column, row, layer):
    x = box_length * 0.0005 + column * box_length * 0.001
    y = box_width * 0.0005 + row * box_width * 0.001
    z = box_height * 0.001 + layer * box_height * 0.001
    return pose_trans(pallet_feature, p[x, y, z, 0, 3.1415, 0])
end

def get_approach_pose(pose, offset=[0, 0, 0]):
    return pose_add(pose, p[offset[0], offset[1], offset[2], 0, 0, 0])
end

def get_pallet_a_status():
    if completed_A:
    	return COMPLETED
    elif get_standard_digital_in(1):
        return MISSING
    elif not enabled_A:
        return DISABLED
    else:
        return AVAILABLE
    end
end

def get_pallet_b_status():
    if completed_B:
    	return COMPLETED
    elif get_standard_digital_in(2):
        return MISSING
    elif not enabled_B:
        return DISABLED
    else:
        return AVAILABLE
    end
end

def can_start_task():
    return (selected_pallet == A and get_pallet_a_status() == AVAILABLE) or (selected_pallet == B and get_pallet_b_status() == AVAILABLE)
end


# --- Tool Functions ---
# implement these function with logic to operate your gripper
def grasp():
    sleep(2)
end

def release():
    sleep(2)
end


# --- Main Functions ---
def start_task():
    running = True

    # start condition
    row = start_row - 1
    column = start_column - 1
    layer = start_layer - 1

    # iteration over layers, columns and rows
    while layer < layers:
        while column < columns:
            while row < rows:

                # check stop request
                if stopping:
                	stopping = False
                	running = False
                	return 0
                end

                # update starting condition
                start_row = row + 1
                start_column = column + 1
                start_layer = layer + 1

                # stats
                tot_boxes = rows * columns * layers
                current_boxes = row + column * rows + layer * rows * columns
                box_counter = to_str(current_boxes) + " / "+ to_str(tot_boxes)
                remaining_boxes = tot_boxes - current_boxes
                start_time = time()
                remaining_time = remaining_boxes * cycle_time

                # pick action
                pick_pose = get_pick_pose()
                approach_pose = get_approach_pose(pick_pose, offset=[0, 0, 0.1])
                current_pose = get_actual_tcp_pose()

                if approach_pose[2] < current_pose[2] + 0.05:
                    approach_pose[2] = current_pose[2] + 0.05
                end

                #movej(approach_pose)
                #movel(pick_pose)

                grasp()

                place_pose = get_place_pose(column, row, layer)
                place_approach_pose = get_approach_pose(place_pose, offset=[0.1, 0.1, box_height * 0.001 + 0.05])

                if place_approach_pose[2] > BOX_FEATURE[2] +  box_height * 0.001 + 0.05:
                    approach_pose[2] = place_approach_pose[2]
                end

                #movel(approach_pose)

                # place action
                approach_pose = get_approach_pose(place_pose, offset=[0.1, 0.1, box_height * 0.001 + 0.05])
                #movej(approach_pose)
                #movel(place_pose)

                release()

                approach_pose = get_approach_pose(place_pose, offset=[0, 0, 0.1])
                if approach_pose[2] < BOX_FEATURE[2] +  box_height * 0.001 + 0.05:
                    approach_pose[2] = BOX_FEATURE[2] +  box_height * 0.001 + 0.05
                end

                #movel(approach_pose)
                row = row + 1

                # stats
                cycle_time = time().sec - start_time.sec
                remaining_time = remaining_boxes * cycle_time
            end

            row = 0
            column = column + 1
        end

        row = 0
        column = 0
        layer = layer + 1
    end

    if selected_pallet == A:
        completed_A = True
    else:
        completed_B = True
    end

    # start condition
    start_row = 1
    start_column = 1
    start_layer = 1

    # stats
    tot_boxes = rows * columns * layers
    current_boxes = row + column * rows + layer * rows * columns
    box_counter = to_str(current_boxes) + " / "+ to_str(tot_boxes)
    remaining_boxes = tot_boxes - current_boxes

    # check repeat condition
    if repeat:
        if selected_pallet == A and get_pallet_b_status() == AVAILABLE:
        	selected_pallet = B
        	start_task()
        elif selected_pallet == B and get_pallet_a_status() == AVAILABLE:
        	selected_pallet = A
        	start_task()
        end
    end

    running = False
end


def stop_task():
    stopping = True
    while stopping:
    	sleep(1)
    end
end

```

{% endcode %}

{% file src="/files/TPVW53GpHPFl0l9DroOA" %}

### **Polyscope Setup**

To install this HMI application in a production environment follow these steps:

**1) Features**

Inside Application tab define the following **Frames**.

| Feature Name     |
| ---------------- |
| **A\_FEATURE**   |
| **B\_FEATURE**   |
| **BOX\_FEATURE** |

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FjjbgvjdGmAsPRMKuCSXx%2Fimmagine.png?alt=media&amp;token=51acbcd2-0ee3-475f-bfda-18263f150622" alt=""><figcaption></figcaption></figure>

**2) Application Variables**

Inside Application tab define those variables.

| Variable Name        | Default Value |
| -------------------- | ------------- |
| **rows**             | 2             |
| **columns**          | 4             |
| **layers**           | 8             |
| **selected\_pallet** | "A"           |
| **box\_length**      | 300           |
| **box\_width**       | 400           |
| **box\_height**      | 200           |
| **start\_row**       | 0             |
| **start\_column**    | 0             |
| **start\_layer**     | 0             |
| **completed\_A**     | False         |
| **completed\_B**     | False         |
| **enabled\_A**       | True          |
| **enabled\_B**       | True          |


# Pallettizing Example

With this palletizing example users can:

* Choose pallet layout (number of layers, rows and columns)
* Define box size
* Choose Left or Right pallet
* Setup starting condition (empty pallet, start from last box, start from specific box)

### **HMI Panel File**

<div><figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FB6glNBqxsjDTuJ569LQT%2Fpallet_app2.png?alt=media&amp;token=921e7fb3-1fea-422b-aae9-30b493808da2" alt=""><figcaption></figcaption></figure> <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FKtMO6BTnzrs3Fqc8s0dU%2Fpallet_app1.png?alt=media&amp;token=1a65fdf4-f705-4094-8c2f-055b648ede70" alt=""><figcaption></figcaption></figure></div>

{% file src="/files/GBoHvOJ4bvYjb6xPsyS3" %}

### **Robot Program File**

```python
# PALLET APP - variables

LEFT_PALLET = "LEFT PALLET"
RIGHT_PALLET = "RIGHT PALLET"
pallet_feature = LEFT_PALLET_FEATURE

# start from setup
FIRST_BOX = "FIRST BOX"
CURRENT_BOX = "CURRENT BOX"
BOX_AT = "BOX AT"
start_from = FIRST_BOX

start_row = 0
start_column = 0
start_layer = 0

# PALLET APP - functions
def get_pick_pose():
    x = box_length * 0.0005
    y = box_width * 0.0005
    z = box_height * 0.001
    return pose_trans(PICK_FEATURE, p[x, y, z, 0, 3.1415, 0])
end

def get_place_pose():
    x = box_length * 0.0005 + current_column * box_length * 0.001
    y = box_width * 0.0005 + current_row * box_width * 0.001
    z = box_height * 0.001 + current_layer * box_height * 0.001
    return pose_trans(pallet_feature, p[x, y, z, 0, 3.1415, 0])
end

def get_approach_pose(pose, offset=[0, 0, 0]):
    return pose_add(pose, p[offset[0], offset[1], offset[2], 0, 0, 0])
end

# PALLET APP - tool functions
# implement these functions with logic to operate your gripper
def grasp():

end

def release():

end


# PALLET APP - main function
def start_task():
    # start from condition
    if start_from == FIRST_BOX:
        current_row = 0
        current_column = 0
        current_layer = 0
    elif start_from == BOX_AT:
        current_row = start_row - 1
        current_column = start_column - 1
        current_layer = start_layer - 1
    else:
        current_row = current_row
        current_column = current_column
        current_layer = current_layer
    end

    # selected pallet condition
    if selected_pallet == LEFT_PALLET:
        pallet_feature = LEFT_PALLET_FEATURE
    else:
        pallet_feature = RIGHT_PALLET_FEATURE
    end

    # iteration over layers, columns and rows
    while current_layer < layers:
        while current_column < columns:
            while current_row < rows:
                # pick action
                pick_pose = get_pick_pose()
                approach_pose = get_approach_pose(pick_pose, offset=[0, 0, 0.1])
                current_pose = get_actual_tcp_pose()

                if approach_pose[2] < current_pose[2] + 0.05:
                    approach_pose[2] = current_pose[2] + 0.05
                end

                movej(approach_pose)
                movel(pick_pose)

                grasp()

                place_pose = get_place_pose()
                place_approach_pose = get_approach_pose(place_pose, offset=[0.1, 0.1, box_height * 0.001 + 0.05])

                if place_approach_pose[2] > PICK_FEATURE[2] +  box_height * 0.001 + 0.05:
                    approach_pose[2] = place_approach_pose[2]
                end

                movel(approach_pose)

                # place action
                place_pose = get_place_pose()
                approach_pose = get_approach_pose(place_pose, offset=[0.1, 0.1, box_height * 0.001 + 0.05])
                movej(approach_pose)
                movel(place_pose)

                release()

                approach_pose = get_approach_pose(place_pose, offset=[0, 0, 0.1])
                if approach_pose[2] < PICK_FEATURE[2] +  box_height * 0.001 + 0.05:
                    approach_pose[2] = PICK_FEATURE[2] +  box_height * 0.001 + 0.05
                end

                movel(approach_pose)
                current_row = current_row + 1
            end

            current_row = 0
            current_column = current_column + 1
        end

        current_row = 0
        current_column = 0
        current_layer = current_layer + 1
    end
end

```

{% file src="/files/EHeI9ZUaE5LjeGlrJZHI" %}

{% file src="/files/Xw5E023IIj8YA7dara45" %}

### **Polyscope Setup**

To install this HMI application in a production environment follow these steps:

**1) Features**

Inside installation tab define those reference frames as Plane Features.

| Feature Name               |
| -------------------------- |
| **LEFT\_PALLET\_FEATURE**  |
| **RIGHT\_PALLET\_FEATURE** |
| **PICK\_FEATURE**          |

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FI5eRWQBn0uF3hdgwafbd%2Fpallet_feature.PNG?alt=media&amp;token=e1722809-c8a6-4b16-a881-6af5a00c6dfc" alt=""><figcaption></figcaption></figure>

**2) Installation Variables**

Inside installation tab define those variables.

| Variable Name        | Default Value |
| -------------------- | ------------- |
| **rows**             | 2             |
| **columns**          | 4             |
| **layers**           | 8             |
| **selected\_pallet** | "LEFT PALLET" |
| **box\_length**      | 300           |
| **box\_width**       | 400           |
| **box\_height**      | 200           |
| **current\_row**     | 0             |
| **current\_column**  | 0             |
| **current\_layer**   | 0             |


# Production Mix Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FIYS4VQ2u6iDilILWPTzj%2Fscreenshot.png?alt=media&amp;token=d68a14de-e1d2-4c84-917c-89de48568795" alt=""><figcaption></figcaption></figure>

{% file src="/files/wFWgxnvxLwXTAkmErJUt" %}
HMI panel file
{% endfile %}

**Robot Program File**

```python
# variables can also be defined as installation variables to keep in memory their last value
square_count = 0
triangle_count = 0
circle_count = 0
square_target = 0
triangle_target = 0
circle_target = 0

# production task for every different format
def square_task():
    square_count = square_count + 1
    sleep(1)
end

def triangle_task():
    triangle_count = triangle_count + 1
    sleep(1)
end

def circle_task():
    circle_count = circle_count + 1
    sleep(1)
end

# main production task
def start_task():
    while square_count < square_target or triangle_count < triangle_target or circle_count < circle_target:
    	if square_count < square_target:
            square_task()
	    end

	    if triangle_count < triangle_target:
            triangle_task()
	    end

	    if circle_count < circle_target:
            circle_task()
	    end
    end
end

# restore variables to initial values
def reset_task():
    square_count = 0
    triangle_count = 0
    circle_count = 0
    square_target = 0
    triangle_target = 0
    circle_target = 0
end
  
```

{% file src="/files/4Y1SF3sO1ppUmnjnpBnY" %}
Script to perform production mix tasks
{% endfile %}

{% file src="/files/JGfQnZHzoVHVsDmRLHRB" %}
Robot program
{% endfile %}


# Machine Tending PSX Example

**HMI Panel File**

<div><figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FqlKWdzLnT8YkSCuJdogD%2Fimmagine.png?alt=media&amp;token=c3c17c78-c3ad-4925-8c78-0ce2ef2731dc" alt=""><figcaption></figcaption></figure> <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FTalX4r48urD5jFYcaNDA%2Fimmagine.png?alt=media&amp;token=9ab9451a-eb11-4b6b-b28b-845656d13c0c" alt=""><figcaption></figcaption></figure></div>

{% file src="/files/VCEu8eGy26Jz3V39GDJj" %}

**Robot Program File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fo4xZ9n6PUWdGqh88V6Fz%2Fimmagine.png?alt=media&amp;token=11573ad2-f69a-4098-b410-fff17a83847a" alt=""><figcaption></figcaption></figure>

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```python
status = "READY"
good = 230
discarded = 13
cycle_time = 0
target = 560
parts = ["P-CL-5055", "P230", "P-FS-6060", "P-GG-5043"]
machine_programs = ["PROG-CL-5055", "PROG-230", "CC-FS-6060", "MACH-5034"]
payloads = [2.0, 2.5, 3.0, 1.5]
selected_part = parts[0]

diameter_raw = 50
diameter_machined = 30

door_open = True

rows = 3
columns = 4
grids = ["3 x 4 Round", "3 x 5 Round", "4 x 5 Square"]
selected_grid = grids[0]

def get_payload():
    i = 0
    while i < length(parts):
    	if selected_part == parts[i]:
            return payloads[i]
    	end
    	i = i + 1
    end
	return 0.0
end

def get_machine_program():
    i = 0
    while i < length(parts):
    	if selected_part == parts[i]:
            return machine_programs[i]
    	end
    	i = i + 1
    end
	return ""
end

def get_grid():
    i = 0
    while i < length(grids):
    	if selected_grid == grids[i]:
            return grids[i]
    	end
    	i = i + 1
    end
	return ""
end

def load_grid():
    rows = to_num(str_sub(selected_grid,0,1))
    columns = to_num(str_sub(selected_grid,4,1))
end

# compete those function with robot motions
def pick():
	status = "PICKING"
	sleep(2)
end

def load():
	status = "LOADING"
	sleep(2)
end

def place():
	status = "PLACING"
	sleep(2)
end

def start():
    while good < target:
        start_time = time().sec
        pick()
        load()
        place()
        good = good + 1
        cycle_time = time().sec - start_time
    end
end


```

{% endcode %}

{% file src="/files/0z6qNkMRbtohCgPJwqt3" %}


# Machine Tending Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fs7xghLmzY4BvNqFijipa%2Fhmi-machine-tending-example.png?alt=media&amp;token=52ca6569-e237-45f3-949e-6755850068cd" alt=""><figcaption></figcaption></figure>

{% file src="/files/AqGxnSbnxPQvoFSzXH91" %}

{% file src="/files/zDdeqczpt8KPWyWNYMYG" %}

**Robot Program File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fg6GV9O7JFclq7cJ6lipl%2Fmachine-tending-UR.png?alt=media&amp;token=9a16ee56-59cd-4a8c-8b47-721efd994b96" alt=""><figcaption></figcaption></figure>

{% file src="/files/Hj49o7EQrDPEw3cyW7Tx" %}

{% file src="/files/JKEyk0v1GlpaVCiolXqi" %}


# Depalletizing Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FLK9uuTwIecLojQkwm2GD%2Fpallet.png?alt=media&amp;token=2f41f164-3d44-485f-8ca2-cb6c7a5fbd99" alt=""><figcaption></figcaption></figure>

**Robot Program File**

```python
# pick and place simulation on two pallets
picking = False
placing = False
buffering = False

pick_status = [True, True, True, True, True, True, True, True, True]
place_status = [False, False, False, False, False, False, False, False, False]

# positions on the pallets
pick_positions = [p[0.393, -0.755, 0.391, -2.22, 2.22, 0.00],
                  p[-0.177, -0.553, 0.391, -0.00, 3.14, 0.00],
                  p[-0.177, -0.956, 0.391, -0.00, 3.14, 0.00],
                  p[0.195, -0.553, -0.010, -0.00, 3.14, 0.00],
                  p[0.195, -0.956, -0.010, -0.00, 3.14, 0.00],
                  p[-0.375, -0.754, -0.010, -2.22, 2.22, 0.00],
                  p[-0.164, -0.956, -0.412, -0.00, 3.14, -0.00],
                  p[-0.164, -0.568, -0.412, -0.00, 3.14, 0.00],
                  p[0.394, -0.766, -0.412, -2.22, 2.22, 0.00]]


place_positions = [p[0.393, 0.755, -0.409, -2.22, 2.22, -0.00],
                  p[-0.177, 0.553, -0.409, -0.00, 3.14, 0.00],
                  p[-0.177, 0.956, -0.409, -0.00, 3.14, 0.00],
                  p[0.195, 0.553, -0.010, -0.00, 3.14, 0.00],
                  p[0.195, 0.956, -0.010, -0.00, 3.14, 0.00],
                  p[-0.375, 0.754, -0.010, -2.22, 2.22, 0.00],
                  p[-0.164, 0.956, 0.388, -0.00, 3.14, -0.00],
                  p[-0.164, 0.568, 0.388, -0.00, 3.14, 0.00],
                  p[0.394, 0.766, 0.388, -2.22, 2.22, 0.00]]

# motion functions
def pick():
    picking = True
    placing = False
    buffering = False
    pick_status[i] = False

    movej(pose_trans(pick_positions[i], p[0, 0, -0.6, 0, 0, 0]))
    movel(pick_positions[i])
    movel(pose_trans(pick_positions[i], p[0, 0, -0.6, 0, 0, 0]))
end

def place():
    picking = False
    placing = True
    buffering = False
    place_status[i] = True

    movej(pose_trans(place_positions[i], p[0, 0, -0.5, 0, 0, 0]))
    movel(place_positions[i])
    movel(pose_trans(place_positions[i], p[0, 0, -0.5, 0, 0, 0]))
end

def buffer():
    picking = False
    placing = False
    buffering = True
    movej([0.08, -1.86, -1.40, -1.45, 1.57, 0.08])
end

def home():
    movej([0.08, -1.86, -1.40, -1.45, 1.57, 0.08])
end

```

```python
# main loop program
i = 0
while i < 9:
    home()
    pick()
    buffer()
    place()
    i = i + 1
end

```


# Welding Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FVxyljF6Ts5ywXpPpsFP8%2Fwelding.png?alt=media&amp;token=716f6547-b643-488b-88e3-9598f0e48636" alt=""><figcaption></figcaption></figure>

{% file src="/files/9A1NSCvibgQ6HdjjO9x2" %}

**Robot Program File**

{% file src="/files/Wg04CqSAlZFFO4Zh7S9L" %}


# Skrewdriving Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCHzo8OHJk70QZLwa10oc%2Fskrewdriving_hmi.png?alt=media&amp;token=997975f0-5136-405f-8698-6473e122d90b" alt=""><figcaption></figcaption></figure>

{% file src="/files/zpx7xBFRiEuB3DnuXaWd" %}

**Robot Program File**

{% file src="/files/p9ewb4ld1L7ztxMI3gPS" %}

{% file src="/files/MVTX3WMWcGSgkKCyHevM" %}


# Chart Monitoring Example

**HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FduHOyd1vITyfKoEWbgem%2Fhmi_chart_monitoring.png?alt=media&amp;token=d81e2821-8bb8-46e9-89f7-f67671e81b05" alt=""><figcaption></figcaption></figure>

{% file src="/files/UzfQBAofw7xdD1LPJ7l2" %}
HMI panel file
{% endfile %}

**Robot Program File**

```python
# joints values
j1 = 0
j2 = 0
j3 = 0
j4 = 0
j5 = 0
j6 = 0

# TCP position
x = 0
y = 0
z = 0

# joints torque
t1 = 0
t2 = 0
t3 = 0
t4 = 0
t5 = 0
t6 = 0

# joints motor temperature
temp1 = 0.0
temp2 = 0.0
temp3 = 0.0
temp4 = 0.0
temp5 = 0.0
temp6 = 0.0

# controller outputs
o1 = 0
o2 = 0
o3 = 0
o4 = 0

# controller temperature
controller_tmp = 0

def bool_to_int(val):
    if val:
        return 1
    else:
        return 0
    end
end

# update thread
thread update():
    while True:
        joints = get_actual_joint_positions()
        j1 = joints[0]
        j2 = joints[1]
        j3 = joints[2]
        j4 = joints[3]
        j5 = joints[4]
        j6 = joints[5]

    	tcp = get_actual_tcp_pose()
    	x = tcp[0]
    	y = tcp[1]
    	z = tcp[2]

    	torques = get_joint_torques()
    	t1 = norm(torques[0])
        t2 = norm(torques[1])
        t3 = norm(torques[2])
        t4 = norm(torques[3])
        t5 = norm(torques[4])
        t6 = norm(torques[5])

        temp1 = get_joint_temp(0)
        temp2 = get_joint_temp(1)
        temp3 = get_joint_temp(2)
        temp4 = get_joint_temp(3)
        temp5 = get_joint_temp(4)
        temp6 = get_joint_temp(5)

        o1 = bool_to_int(get_standard_digital_out(0))+6
        o2 = bool_to_int(get_standard_digital_out(1))+4
        o3 = bool_to_int(get_standard_digital_out(2))+2
        o4 = bool_to_int(get_standard_digital_out(3))+0

        controller_tmp = get_controller_temp()
        sync()
    end
end

run update()
```

{% file src="/files/NfYxFYhCHaMrOBPQDj3W" %}
Script to get robot data
{% endfile %}

{% file src="/files/Q3vGaPjOCv0GVaV0nI1T" %}
Robot program
{% endfile %}


# Camera QA Example

With this QA example users can choose what part of vehicle inspect with camera.

### **HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4oPdaqm6TETo7jPUveYI%2Fhmi_camera_qa.png?alt=media&amp;token=05be0554-50d5-49cb-b49c-dde912d8c154" alt=""><figcaption></figcaption></figure>

{% file src="/files/vJYE0LHjiTK5wcIxdXWQ" %}

### **Robot Program File**

```python
# Robot script file
# QA result for each part
label_ok = False
break_ok = False
mirror_ok = False
handle_ok = False
door_ok = False
hinge_ok = False

# user choice - selected part will be inspected
check_label = False
check_break = False
check_mirror = False
check_handle = False
check_door = False
check_hinge = False

home = [1.54, -1.21, -1.91, -3.17, -0.03, -3.14]

# inspection function for each part
def qa_label():
    movej([0.50, -0.95, -2.46, -2.87, -1.07, -3.14])
    movel(p[0.401, -0.560, 0.513, -1.21, 1.21, -1.21])
    movel(p[0.401, -0.060, 0.513, -1.20, 1.21, -1.21])
    movel(home)
end

def qa_break():
    movel(p[0.398, -0.921, 0.203, -1.20, 1.21, -1.22])
    p1 = p[0.391, -1.060, 0.083, -1.20, 1.21, -1.21]
    p2 = p[0.381, -0.890, -0.037, -1.20, 1.21, -1.21]
    movec(p1, p2)

    p3 = p[0.381, -0.710, 0.133, -1.20, 1.21, -1.21]
    p4 = p[0.381, -0.920, 0.283, -1.20, 1.21, -1.21]
    movec(p3, p4)
    movel(home)
end

def qa_mirror():
    movej([0.99, -1.96, -0.72, -3.57, 1.18, 0.01])
    movel(p[0.646, 0.369, 0.775, 1.59, -0.17, -0.12])
    movel(p[0.531, 0.388, 0.773, 1.59, -0.17, -0.13])
    movej(home)
end

def qa_handle():
    movej([1.55, -2.10, -1.22, -2.97, -0.02, -3.14])
    movel(p[0.342, 1.079, 0.592, -1.21, 1.21, -1.21])
    movel(p[0.339, 0.867, 0.593, -1.21, 1.21, -1.21])
    movej(home)
end

def qa_door():
    movej([1.53, -2.36, -0.50, -3.42, -0.45, -3.14])
    movel(p[0.353, 1.035, 0.241, -1.38, 0.90, -0.91])
    movel(p[0.343, 0.675, 0.241, -1.54, 1.53, -0.91])
    movel(p[0.343, 0.205, 0.241, -1.44, 1.76, -1.22])
    movej(home)
end

def qa_hinge():
    movej([1.53, -2.36, -0.50, -3.42, -0.45, -3.14])
    movel(p[0.343, 0.675, 0.241, -1.54, 1.53, -0.91])
    movel(p[0.343, 0.205, 0.241, -1.44, 1.76, -1.22])
    movej(home)
end

# main function
def start_task():
    label_ok = False
    break_ok = False
    mirror_ok = False
    handle_ok = False
    door_ok = False
    hinge_ok = False

    movej(home)

    if check_label:
    	qa_label()
    	label_ok = True
    end

    if check_break:
        qa_break()
        break_ok = True
    end

    if check_mirror:
        qa_mirror()
        mirror_ok = True
    end

    if check_handle:
        qa_handle()
        handle_ok = True
    end

    if check_door:
        qa_door()
        door_ok = True
    end

    if check_hinge:
        qa_hinge()
        hinge_ok = True
    end
end


```

{% file src="/files/sQXP4yw55XO5y5DOxwbB" %}

{% file src="/files/fU0gfkBG3jH2ZT7CSNEt" %}


# Assembly Example

### **HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FgYHioMqXCGTs7l6xK9hj%2Fassembly-screenshot.png?alt=media&amp;token=39978ec3-e888-4dab-b339-8e5e601aa69e" alt=""><figcaption></figcaption></figure>

{% file src="/files/7ZYqiPVP9HCKgeJQolPN" %}

### **Robot Program File**

```python
# Robot script file

# HMI input variables
approach = 100
contact_pose = p[-0.190, -0.610, 0.061, -0.00, 3.12, 0.04]
contact_force = 20
insertion_pose = p[-0.190, -0.610, 0.061, -0.00, 3.12, 0.04]
push_force = 30
step = 10

pick_pose = p[-0.189, -0.611, 0.240, -0.00, 3.11, 0.04]
threshold = 0.004
thread_running = False

# status variables
READY = 0
PICK = 1
APPROACH = 2
CONTACT = 3
SPIRAL = 4
INSERT = 5
ASSEMBLED = 6
status = READY

# thread functions for async movements
thread move_to_insert():
    movel(insertion_pose, v=0.02)
    thread_running = False
end

thread move_spiral():
    start_radius = 0.01
    center_pose = get_actual_tcp_pose()
    rotations = 10

    movel(center_pose)
    i = 0
    while i < rotations:
        r = start_radius + i*step/1000
        p1 = pose_trans(center_pose, p[r, 0, 0, 0, 0, 0])
        p2 = pose_trans(center_pose, p[0, r, 0, 0, 0, 0])
        movec(p1, p2, r=0.01)

        p3 = pose_trans(center_pose, p[-r, 0, 0, 0, 0, 0])
        p4 = pose_trans(center_pose, p[0, -r, 0, 0, 0, 0])
        movec(p3, p4, r=0.01)

        i = i + 1
    end
end

# gripper functions
def grasp():

end

def release():

end

def pick():
    status = PICK
    approach_pose = pose_trans(pick_pose, p[0, 0, -approach/1000, 0, 0, 0])
    movel(approach_pose)
    movel(pick_pose)
    grasp()
    movel(approach_pose)
end

def assembly():
    # approach
    status = APPROACH
    approach_pose = pose_trans(insertion_pose, p[0, 0, -approach/1000, 0, 0, 0])
    movel(approach_pose)

    # detect contact
    status = CONTACT
    thread_completed = False
    thread_id = run move_to_insert()
    while force() < contact_force and thread_running:
        sleep(0.1)
    end
    if thread_running:
        kill thread_id
    end
    stopl(0.5)

    # move spiral
    status = SPIRAL
    force_mode(p[0, 0, 0, 0, 0,0], [0, 0, 1, 0, 0, 0], [0, 0, -push_force, 0 , 0, 0], 2, [40, 40, 40, 5, 5, 5])
    thread_completed = False
    thread_id = run move_spiral()
    while get_actual_tcp_pose()[2] > contact_pose[2] - threshold and thread_running:
        sleep(0.1)
    end
    if thread_running:
        kill thread_id
    end
    stopl(0.5)
    end_force_mode()

    # insert
    status = INSERT
    current_pose = get_actual_tcp_pose()
    current_pose[2] = insertion_pose[2]
    movel(insertion_pose)
    release()

    # retract
    status = ASSEMBLED
    retract_pose = pose_trans(get_actual_tcp_pose(), p[0, 0, -approach/1000, 0, 0, 0])
    movel(retract_pose)
end

# main function
def start_task():
    status = READY
    pick()
    assembly()
end

```

{% file src="/files/f3yH5pTBlge7tzrwCS4j" %}

{% file src="/files/0PcCX8tl70j8Bg5v7j0d" %}


# Path Recording Example

### **HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FA5C4yyEdcZsSCZ2jud3U%2Fimmagine.png?alt=media&amp;token=319b7630-a883-41bd-8274-5f726861caa6" alt=""><figcaption></figcaption></figure>

{% file src="/files/BC3yZSMAfZfEVzCQJxNV" %}

### **Robot Program File**

```python
# Robot script file

recorded_points = 0
executed_points = 0

recording = False
executing = False

# list to store recorded waypoints
path = make_list(500, p[-0.190, -0.610, 0.261, -0.00, 3.12, 0.04])

# record function
def record():
    freedrive_mode()
    recording = True

    recorded_points = 0

    while recording and recorded_points < 500:
        path[recorded_points] = get_actual_tcp_pose()
        sleep(0.2)
        recorded_points = recorded_points + 1
    end
    recording = False

    end_freedrive_mode()
end

# play function
def execute():
    executing = True

    executed_points = 0
    while executing and executed_points < recorded_points:
        pose = path[recorded_points]
        q = get_inverse_kin(pose)
        
        # just an example using plain servo j command
        # t parameter must be changed acordingly to real application scenario
        servoj(q, t=0.2)
        executed_points = executed_points + 1
    end

    executing = False

end

```

{% file src="/files/1dbS2Sm87edAzMidBKNi" %}


# Nudge Example

### **HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FrnWEj7JJkQLtyuERpQzm%2Fimmagine.png?alt=media&amp;token=b15363d2-1472-4332-9835-3ec135fbb8ee" alt=""><figcaption></figcaption></figure>

{% file src="/files/WWNtVLfX7VnHP9ayvneI" %}

### **Robot Program File**

```python
# Robot functions file
force_threshold = 50
force_z = 0
status = "WAITING NUDGE"

# nudge function
def wait_nudge():
    sleep(1)
    f = get_tcp_force()
    while norm(f[2]) < force_threshold:
        sleep(0.2)
        f = get_tcp_force()
    end
end

thread update_force():
    while True:
        force_z = get_tcp_force()[2]
        sync()
    end
end

run update_force()
```

<pre class="language-python"><code class="lang-python"># Robot task file
status = "WAITING NUDGE"
<strong>wait_nudge()
</strong>status = "NUDGE DETECTED!"

# counter
global i = 0
while i &#x3C; 3:
    # pick
    movej([1.56, -1.86, 2.29, -2.00, -1.57, -0.01], r=0.03)
    movel(p[0.107, -0.331, 0.100, 0.00, 3.14, -0.00])
    movel(p[0.107, -0.331, 0.25, 0.00, 3.14, -0.00], r=0.03)

    # place
    movej([1.56, -1.40, 1.87, -2.04, -1.57, -0.01], r=0.03)
    movel(p[0.107, -0.517, 0.100, -0.00, 3.14, 0.00])
    movel(p[0.107, -0.517, 0.2500, -0.00, 3.14, 0.00], r=0.03)

    i = i + 1
end
</code></pre>

{% file src="/files/ETlP4HObpH3OBGIiDjic" %}


# Doosan Robotics

In this section you can find working examples of HMI robot programs.

[Pick and Place Example DR](/hmi-designer/working-examples/doosan-robotics/pick-and-place-example-dr)

[Touch Example DR](/hmi-designer/working-examples/doosan-robotics/touch-example-dr)

[Impedance Control Example DR](/hmi-designer/working-examples/doosan-robotics/impedance-control-example-dr)

[Dashboard Example](/hmi-designer/working-examples/doosan-robotics/dashboard-example)

[LED Control Example DR](/hmi-designer/working-examples/doosan-robotics/led-control-example-dr)


# Pick and Place Example DR

### HMI Panel File

{% embed url="<https://www.youtube.com/watch?v=8Dap1xIxxEg>" %}

{% file src="/files/Cc78TPdKQHKysXpK0aD6" %}
HMI Panel File
{% endfile %}

### Task Editor File

{% file src="/files/qIOSEzaeunQLwUhfqRus" %}
Task Editor File
{% endfile %}


# Touch Example DR

### HMI Panel File

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FF3vIwyOJDHlRx6NEeTJj%2Fimmagine.png?alt=media&amp;token=e6b6ee6c-bddf-4866-9eec-de8864f87ac0" alt=""><figcaption></figcaption></figure>

{% file src="/files/fHM91J6un6dcCQzav5zV" %}

### Script File

```python
from DRCF import *

# HMI variables
task_running = False
display_status = ""

# HMI functions
def start_task():
    global task_running, display_status
    task_running = True

    while task_running:
        movel(posx(40.1, -294.5, 400, 0, 178.1, 0), v=200, a=200)
        display_status = ""
        amovel(posx(40.1, -294.5, 100, 0, 178.1, 0), v=200, a=200)
        while check_motion() != DR_STATE_IDLE:
            if abs(get_tool_force()[DR_AXIS_Z]) > 8:
                stop(DR_QSTOP)
                display_status = "TOUCH DETECTED!"
                break
            wait(0.1)

    display_status = ""
    movel(posx(40.1, -294.5, 400, 0, 178.1, 0), v=200, a=200)

```


# Impedance Control Example DR

### HMI Panel File

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FiFSbFyjntV5gvDtDoA7d%2Fimmagine.png?alt=media&amp;token=d923fb76-8dcc-42fb-ae5a-af33c83dd046" alt=""><figcaption></figcaption></figure>

{% file src="/files/b1AiBptroIrQgPdyV0WG" %}

### Script File

```python
from DRCF import *

# impedance control gains
Kp = 50
Kd = 40

running = False

# impedance control function
def start_task():
    global running

    # setup compliance parameters
    stiffness = [Kp*200, Kp*200, Kp*200, Kp*4, Kp*4, 400]
    damping = [max(0.1, Kd*0.02), max(0.1, Kd*0.02), max(0.1, Kd*0.02), max(0.1, Kd*0.02), max(0.1, Kd*0.02), 1]

    # home position
    movej(posj(90, 0, -90, 0, -90, -85.0), v=30, a=100)
    set_external_force_reset()

    # start impedance control
    task_compliance_ctrl(stx=stiffness)
    set_damping_factor(damping)

    # wait for user to stop impedance control
    running = True
    while running:
        wait(1)

    # resume position control
    release_compliance_ctrl()

```

### Task File

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FRnuOD7T1y8cDizuXu7RG%2Fimmagine.png?alt=media&amp;token=a446f130-8e19-485a-8718-b2411c7dfcbe" alt=""><figcaption></figcaption></figure>

{% file src="/files/mzXjxmDXrZyzI8lZb8vp" %}


# Dashboard Example

### **HMI Panel File**

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FzQ1Kec0zX73ANleT3Gs5%2Fimmagine.png?alt=media&amp;token=7ae70eab-a8ac-413f-a6bb-3b98827da323" alt=""><figcaption></figcaption></figure>

{% file src="/files/BC3yZSMAfZfEVzCQJxNV" %}

### **Robot Program File**

```python
# Robot script file
from DRCF import *
import random

test_running = False
out_status = [OFF]*6


if "get_digital_output" not in globals():
    def get_digital_output(i):
        return out_status[i-1]


def test_controller():
    global test_running
    test_running = True

    while test_running:

        for i in range(1,7):
            set_digital_output(i, ON)
            out_status[i-1] = ON
            wait(0.5)

        for i in range(1,7):
            set_digital_output(i, OFF)
            out_status[i-1] = OFF
            wait(0.5)


def test_robot():
    global test_running
    test_running = True

    movej(posj(-89.7, -10.0, 105.7, 1.9, 84.3, -89.9), v=30, a=100)
    while test_running:
        movec(posx(41.2, -256.2, 249.7, 5.7, 178.3, 6.0), posx(51.9, -304.3, 70.1, 33.9, 178.5, 34.0), v=300, a=300, r=30)
        movec(posx(44.0, -451.5, 261.3, 22.2, 178.1, 22.4), posx(39.9, -294.4, 399.9, 0.2, 178.1, 0.2), v=300, a=300, r=30)


def test_joints():
    global test_running
    test_running = True

    movej(posj(-89.7, -10.0, 105.7, 1.9, 84.3, -89.9), v=30, a=100)
    amove_periodic([10, 45, 60, 10, 15, 10], [5, 3.5, 1.2, 6.5, 2.2, 2.1], repeat=100)
    while test_running:
        wait(1)
    stop(DR_QSTOP)


def test_task():
    global test_running
    test_running = True

    movej(posj(-89.7, -10.0, 105.7, 1.9, 84.3, -89.9), v=30, a=100)
    while test_running:
        movel(posx(52.4, -491.6, 40.4, 12.5, 180, 12.6), v=200, a=200)
        movel(posx(-60.8, -507.9, 504.8, 177.1, 90, 175.1), v=200, a=200)
        movej(posj(-89.7, -10.0, 105.7, 1.9, 84.3, -89.9), v=50, a=100)

```

{% file src="/files/43CbzBig5JrApUS4JBAz" %}


# LED Control Example DR

### HMI Panel File

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FIcPoKKuL0pM4ohr65qGc%2Fimmagine.png?alt=media&amp;token=b5a87325-64b0-40c5-b45a-1c5780deb377" alt=""><figcaption></figcaption></figure>

{% file src="/files/EITCBCzLsR01pJd2H8KD" %}

### Script File

```python
from DRCF import *

color = "green"

def rainbow():
    global color

    for i in range(5):

        # red
        set_state_led_color(1, 0, 0)
        color = "red"
        wait(0.4)

        # yellow
        set_state_led_color(1,1,0)
        color = "yellow"
        wait(0.4)

        # green
        set_state_led_color(0,1,0)
        color = "green"
        wait(0.4)

        # cyan
        set_state_led_color(0,1,1)
        color = "cyan"
        wait(0.4)

        # blue
        set_state_led_color(0,0,1)
        color = "blue"
        wait(0.4)

        # magenta
        set_state_led_color(1,0,1)
        color = "magenta"
        wait(0.4)
```


# Singularity Example DR

### HMI Panel File

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FN906uAUySB76TmF4RwPN%2Fimmagine.png?alt=media&amp;token=03def573-a87e-49ef-ac42-a938747888bd" alt=""><figcaption></figcaption></figure>

{% file src="/files/edduDvdSGuT0YdT9Ukog" %}

### Script File

```python
from DRCF import *

label_status = "OUTSIDE SINGULAR REGION"
checkbox_status = [True, False, False]
checkbox_auto_avoid = True
checkbox_var_vel = False
checkbox_path_first = False


def update_hmi():
    global checkbox_status, checkbox_var_vel, checkbox_path_first, checkbox_auto_avoid, label_status

    # update checkbox
    if checkbox_auto_avoid and not checkbox_status[0]:
        checkbox_var_vel = False
        checkbox_path_first = False
        set_singularity_handling(DR_AVOID)
        checkbox_status = [checkbox_auto_avoid, checkbox_var_vel, checkbox_path_first]

    elif checkbox_var_vel and not checkbox_status[1]:
        checkbox_auto_avoid = False
        checkbox_path_first = False
        set_singularity_handling(DR_VAR_VEL)
        checkbox_status = [checkbox_auto_avoid, checkbox_var_vel, checkbox_path_first]

    elif checkbox_path_first and not checkbox_status[2]:
        checkbox_auto_avoid = False
        checkbox_var_vel = False
        set_singularity_handling(DR_TASK_STOP)
        checkbox_status = [checkbox_auto_avoid, checkbox_var_vel, checkbox_path_first]

    elif not checkbox_auto_avoid and not checkbox_var_vel and not checkbox_path_first:
        checkbox_auto_avoid = True
        checkbox_var_vel = False
        checkbox_path_first = False
        set_singularity_handling(DR_AVOID)
        checkbox_status = [checkbox_auto_avoid, checkbox_var_vel, checkbox_path_first]

    # update label
    j5 = abs(get_current_posj()[4])
    if j5 > 15:
        label_status = "OUTSIDE SINGULAR REGION"
    elif j5 > 10:
        label_status = "NEAR SINGULAR REGION"
    else:
        label_status = "INSIDE SINGULAR REGION"


thread_run(update_hmi, loop=True)
movej(posj(0.0, 36.8, 123.6, -0.0, -70.4, 0.0))


def test():
    movej(posj(0.0, 36.8, 123.6, -0.0, -70.4, 0.0))
    movel(posx(680.0, 34.5, 1142.5, -0.0, 90.0, -0.0))
    movel(posx(679.9, 34.5, 122.3, -0.0, 90.0, -0.0))

```

{% file src="/files/te2JYSYZ8WOFCMNb4k8O" %}


# Box Weight Example DR

### HMI Panel File

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FCshfYeP9EI27L51VgX7C%2Fimmagine.png?alt=media&amp;token=23a347b9-5a03-450d-a0c8-183c8d32f623" alt=""><figcaption></figcaption></figure>

{% file src="/files/TMHQwPIrHtA4zkAHtjLD" %}

### Script File

```python
from DRCF import *

box_weight = 0
box_height = 0

set_external_force_reset()


def pick():
    global box_weight, box_height

    pose, _ = get_current_posx()
    pose[2] = 0
    
    task_compliance_ctrl()
    amovel(pose, v=50)
    while get_tool_force()[2] < 10 and get_current_posx()[0][2] > 10:
        wait(0.1)
    stop(DR_QSTOP)
    release_compliance_ctrl()

    box_height = get_current_posx()[0][2]
    set_digital_outputs([1, -2])
    wait(0.5)

    movel(posx(0, 0, -50, 0, 0, 0), ref=DR_TOOL)
    wait(1)
    box_weight = get_workpiece_weight()


def release():
    pose, _ = get_current_posx()
    pose[2] = box_height
    movel(pose, v=50)

    set_digital_outputs([-1, 2])
    wait(0.5)
    movel(posx(0, 0, -150, 0, 0, 0), v=100, ref=DR_TOOL)

```




---

[Next Page](/llms-full.txt/1)

