# Connect Stäubli to Wandelbots NOVA

> Learn how to connect Stäubli robots to Wandelbots NOVA.

# Stäubli

Using a Stäubli with Wandelbots NOVA offers a wide range of possibilities for automating your production processes.
There are 3 things you need to know before you start:

Which Stäubli controller types and models are supported by Wandelbots NOVA?

[Supported models](#supported-models)

Wandelbots NOVA provides you with virtual controllers for path planning, app development and simulation purposes.

[Use virtual controller](#use-virtual-controller)

You can connect your Stäubli controller to Wandelbots NOVA for real-world automation.

[Set up and connect Stäubli controller](#connect-to-the-physical-robot-for-the-first-time)

> **Info:** Wandelbots NOVA includes a real-time kernel and `robot-realtime` tuned profile by default to ensure stable robot control and meet timing requirements.

## Supported models

### Controllers

| Controller | Supports | Requirements |
| - | - | - |
| CS9 | industrial | Firmware: Industrial OS Version >=8.17; Option package: \`alter\`; Option package: \`advancedControlFunctions\` |

### Motion groups

#### Robotic arms

**Industrial robots**

| Robot arm |
| - |
| tx2-140 |
| tx2-40 |
| tx2-60 |
| tx2-90 |

## Use virtual controller

### Step 1: Open the home screen

Open your cloud instance via the Developer Portal or type in your physical instance's/virtual instance's IP address to access the home screen.
Get an overview on the home screen and its functionalities [here](/nova/26.7/architecture).

### Step 2: Create a cell in Setup

Open Setup and go to the `Cell` tab.

### Step 3: Add robot to your cell

If you want to start using the Wandelbots API, do so now and [add a robot via the Wandelbots NOVA API](/nova/26.7/nova-api/overview#add-a-robot-to-the-cell).

OR add a robot to your cell in Setup:

1. Open the `Robots` tab.
   → The robot overview is displayed.
2. Use [Add] to add a robot to your cell.\
   → A drawer opens guiding you through adding a robot.
   If the [Add] button is greyed out, your license might not support adding more robots. Please contact your administrator.
3. Select the robot type `Virtual`.
   → The drawer updates to display options for adding a virtual robot.

> **Info:** Adding a physical robot will only work after [successful setup](#connect-to-the-physical-robot-for-the-first-time).

4. Name the robot.
5. Select `Stäubli` as manufacturer.
6. Select the desired robot model.
7. `Add` the robot to the cell.
   → A progress indicator is displayed while the robot is being added to the cell.
   → The robot is displayed in the cell overview.

### Step 4: Add a TCP

To replicate a physical robot's behavior accurately, you can define TCPs for virtual robots in the Setup app.

1. Click on the robot.
   → A drawer opens displaying the robot details.
2. Open the `TCP` tab.
   → The TCP tab displays all existing TCPs of the robot.
   → For physical robots, the TCP tab presents an overview on all existing TCPs on the physical robot controller.
   You cannot add TCPs for physical robot controllers in Setup as these need to be configured on the robot controller.
3. Use [Add] to add a new TCP.
   → Options to add a new TCP are displayed.
4. Define the TCP's translation and rotation relative to the robot's flange.
5. Save the new TCP.
   → The new TCP is displayed in the TCP tab and can be selected in Robot Pad.

Congrats! You can now start to plan paths and simulate! Open Robot Pad from the home screen of your instance and get started ✨.

## Set up and connect CS9 controller

Cloud instances are not suited to control a physical robot and you need to use a VM or an IPC instead.
More information on available NOVA instance types [here](/nova/26.7/installation/installation#instance-types).

### About setup instructions

The provided setup instructions do not replace a thorough understanding
of the robot manufacturer's original operating instructions and only apply to the supported models mentioned above.

The setup instructions include the following steps:

1. Preparing the robot for the connection with Wandelbots NOVA.
2. Physically connecting the IPC to the robot controller.
3. Configuring the IPC to establish communication with the robot controller.
4. Using the Stäubli controller on Wandelbots NOVA.
5. Troubleshooting common issues that may arise during the setup process.

In order to connect the Stäubli controller to Wandelbots NOVA,
Wandelbots NOVA needs to be integrated into the robotic cell according to these [cell designs](/nova/26.7/setup/cell-design).

Note that setting a correct mounting pose in the robot controller is crucial, especially for cobots, as they are sensitive to gravity direction.

### Step 1: Connect the IPC to controller

1. Plug your network cable into port `J04` or `J05` on the physical controller.
2. On the robot control panel, press the home button, open `Settings` (purple) → `Network`.
3. Open the IP address of the port the controller is connected to, choose a free IP address in the same subnet as the IPC, and press `Confirm`.

### Step 2: Configure the IPC's network settings

1. Open `https://<ipc-ip-address>:9090`, e.g. `https://172.345.538.2:9090`, in a browser on your personal computer.\
   If the IPC is not connected to the same network as your personal computer, you can connect a keyboard, a mouse and a display to the IPC. Then open `localhost:9090` in a web browser.
2. Log in with the user credentials created during the Wandelbots NOVA installation.\
   → The IPC's settings are displayed.
   → A popup prompts you to enable administrative access.
3. Enable administrative access and enter the admin password.
4. Select the Network tab in the sidebar.\
   → The IPC's network settings are displayed.
5. Toggle the button next to the `enp3s0` port (corresponding to the IPC's LAN-1 port) to enable network activity.
6. Use `Edit` next to the IPv4.\
   → The IPv4 menu opens.
7. Set the address dropdown to `Manual`.
8. Create an IP address that is in the same subnet as the CS9 controller's IP address set in [Set up the CS9](#set-up-the-cs9).
9. Set the prefix to 255.255.255.0 (will automatically change to 24).
10. Delete the prefilled gateway value.
11. Save the settings.\
    → Wandelbots NOVA can now install the package on the CS9.

### Step 3: Install and configure option packages

1. Open the Setup app and add the physical Stäubli robot.\
   → A loading indicator is displayed while the IPC sends configuration data via FTP to the controller.
   → The loading indicator is displayed until step 3 is completed.
2. On the robot control panel, press the home button, then go to `VAL3` (green) → `Storage` → `Disk`.\
   → The disk's contents are displayed. They should now contain `WandelbotsApp` and `WandelbotsLibrary`.
3. Restart the Stäubli controller.\
   → The Setup app now displays the added robot as successfully connected.
4. On the robot control panel, open the log screen with `i`.\
   → A list of logs is displayed.
5. Verify that the logs contain a version of `WandelbotsApp` and `WandelbotsLibrary`.
6. Use the VAL-3 app management button and verify that `WandelbotsApp` is running.
7. To start the Wandelbots application, press `Reload`, then `Play`.
8. Verify the correct socket configuration by using the home button → `IOs` → `Sockets`.
9. Verify that the `TCP Server` has one entry named `siSocketPhys`.
10. On the robot control panel, use the home button again.
11. Open `Robot` (blue) → Information.\
    → The list of installed packages is displayed.
12. Verify that the packages `alter` and `advancedControlFunctions` are part of the list and enabled.\
    If not, please contact your Stäubli distributor to install the missing packages.\
    → Wandelbots NOVA can now connect to the robot.

### Step 4: Use CS9 controller on Wandelbots NOVA

> **Info:** To avoid timeouts and connection issues, it is recommended to delete the physical Stäubli used during the configuration of
> the option packages from the cell in Setup, and add it again to proceed with programming.

1. Open the Setup app and add the physical Stäubli robot.\
   → The successfully added controller is now displayed in the Setup app.
2. On the robot control panel, enable arm power using the large white button.\
   → A white light next to the Pause button turns on.
3. Press the blue blinking `Move Hold` button below the power button.\
   → The blue light stays on, indicating that the robot is ready to move.
   → The Stäubli robot is now connected to Wandelbots NOVA.

## Troubleshooting

### Automatic socket configuration fails

If the socket connection configuration doesn't update automatically after installing the Wandelbots
option package, set it up manually on the robot control panel:

1. Press the home button, open `IOs` (orange) → `Sockets` → `TCP Server`.
2. Add a new entry named `siSocketPhys`.
3. Open `IOs` (orange) → `Sockets` → `UDP Sockets`.
4. Add an entry named `siJointStates` pointing to the IP address of the IPC.
5. Add an entry named `siJointCmds` and leave it empty.

### Auto-starting a program fails

If `WandelbotsApp` doesn't start automatically, start it manually on the robot control panel:

1. Press the home button, open `VAL3` (green) → `Storage`.
2. Select `WandelbotsApp` → `Load` → `Memory`.
3. Press `Play`.
