# 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, exception: 8.20.1 is not supported; 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.8/architecture).

### Step 2: 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.8/nova-api/overview#add-a-robot-to-the-cell).

OR add a robot to your cell in Setup:

1. Open the cell's `Robots` page.
   → The robot overview is displayed.
2. Click `Add robot` to add a robot to your cell.\
   If the `Add robot` button is greyed out, your license might not support adding more robots. Please contact your administrator.
   → A side panel opens guiding you through adding a robot.
   → `Virtual` is selected by default.&#x20;
   You can also reuse a previous configuration from `Recent connections`.
3. Name the robot.
4. Select `Stäubli` as manufacturer.
5. Select the desired robot model.
6. Click `Add robot`.
   → A progress indicator is displayed while the robot is being added to the cell.
   → The robot is displayed in the cell overview.

### Step 3: 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.
   → The robot's details page is displayed.
2. Click `Manage TCPs`.
   → A side panel displays all existing TCPs of the robot.
   → Clicking a physical robot instead shows a `See all TCPs` button: TCPs for physical robot controllers can only be viewed here, not added, since they need to be configured on the robot controller itself.
3. Use `Add 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 side panel and can be selected in Robot Pad.

You've successfully added a virtual robot to plan programs with. Open Robot Pad or download Visual Studio Code 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.8/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. Using the Stäubli controller on Wandelbots NOVA: Wandelbots NOVA detects the IPC's network address automatically.
4. Troubleshooting common issues that may arise during the setup process, including configuring the IPC's network settings manually if your installation doesn't support automatic assignment yet.

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.8/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`.

By default, Wandelbots NOVA detects which physical port the controller is wired to and assigns it a free address automatically when you [add the robot](#install-and-configure-option-packages). If Setup doesn't do this for you, see [Troubleshooting](#i-dont-see-a-guide-me-or-scan-network-button).

### Step 2: Install and configure option packages

1. Type in your physical instance's IP address to access the NOVA OS instance.
   → The home screen is displayed.
2. Open Setup and, in the sidebar, go to your robot cell's `Robots` page.
   → The robot overview is displayed.
3. Click `Add robot` to add a robot to your cell.\
   → A side panel opens guiding you through adding a robot.
   If the `Add robot` button is greyed out, your license might not support adding more robots. Please contact your administrator.
4. Toggle to `Physical`.
   → The side panel updates to display options for adding a physical robot.
5. Use `Guide me` for a step-by-step walkthrough, or use `Advanced options` → `Scan network` if you don't know the controller's IP address.
   > **Info:** On the previous version of Setup, there's no `Guide me` walkthrough, autofill, or `Scan network`: you need to [configure the IPC's network settings manually](#i-dont-see-a-guide-me-or-scan-network-button) and then enter the controller's IP address, network interface, and controller port manually.
   > See the [FAQ](/nova/26.8/faq#setup-still-shows-a-previous-version-after-updating) to check which version of Setup your NOVA OS home screen displays.
6. Name the robot.
7. Select `Stäubli` as the manufacturer.
8. Under `Robot controller`, enter the robot controller's IP address and confirm it.\
   → Under `NOVA instance`, the NOVA instance's port and corresponding interface IP address to which the robot controller is connected to is autofilled.
   If you want to use a specific network setup, you can overwrite the autofilled entries.
9. Click `Add robot`.\
   → Wandelbots NOVA verifies that the selected port has a link, that the assigned address isn't already taken, and that the controller answers at its IP. If a check fails, you can fix the input or choose `Add anyway` to continue.
   → A progress indicator is displayed while the robot is added to the cell.
   → The robot is displayed in the cell overview.
10. 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`.
11. Restart the Stäubli controller.\
    → The Setup app now displays the added robot as successfully connected.
12. On the robot control panel, open the log screen with `i`.\
    → A list of logs is displayed.
13. Verify that the logs contain a version of `WandelbotsApp` and `WandelbotsLibrary`.
14. Use the VAL-3 app management button and verify that `WandelbotsApp` is running.
15. To start the Wandelbots application, press `Reload`, then `Play`.
16. Verify the correct socket configuration by using the home button → `IOs` → `Sockets`.
17. Verify that the `TCP Server` has one entry named `siSocketPhys`.
18. On the robot control panel, use the home button again.
19. Open `Robot` (blue) → Information.\
    → The list of installed packages is displayed.
20. 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 3: 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.

> **Info:** Click `Guide me` for a step-by-step walkthrough, or use `Scan network` if you don't know the controller's IP address.
>
> On the previous version of Setup, there's no `Guide me` walkthrough, autofill, or `Scan network`: enter the controller's IP address, network interface, and controller port manually.
> See the [FAQ](/nova/26.8/faq#setup-still-shows-a-previous-version-after-updating) to check which version of Setup your installation shows, and [Troubleshooting](#i-dont-see-a-guide-me-or-scan-network-button) to configure the IPC's network settings manually.

1. Open Setup and add the physical Stäubli robot again, the same way as [during option package installation](#install-and-configure-option-packages): toggle to `Physical`, select `Stäubli` as the manufacturer, and enter and confirm the controller's IP address.\
   → 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

### Find the Stäubli's IP address

1. Set the robot control mode to Manual mode.
2. Open the main menu.
3. Open `Settings` → `Network` → `Interfaces`.
   →  The Stäubli's IP address is displayed.

### I don't see a Guide me or Scan network button.

This means your NOVA OS installation hasn't been updated to a backend version that supports automatic network configuration yet, so Setup still shows its previous version.
See the [FAQ](/nova/26.8/faq#setup-still-shows-a-previous-version-after-updating) for more information.

Until then, configure the IPC's network settings for the LAN-1 port manually:

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 [Connect the IPC to controller](#connect-the-ipc-to-controller).
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. Enter this address when adding the robot.

### 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`.
