> For the complete documentation index, see [llms.txt](https://doc.realvirtual.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.realvirtual.io/components-and-scripts/interfaces/kuka-iiqka-vrc.md).

# KUKA iiQKA.OS2 VRC (Pro)

The **KUKA iiQKA.OS2 VRC Interface** couples realvirtual live to a KUKA **iiQKA.OS2 Virtual Robot Controller (VRC)** over the **Robot Sensor Interface (RSI)**. The VRC runs the real robot code (real axis interpolation, real cycle times); realvirtual visualizes the robot axes, checks collisions and exchanges digital/analog I/O with the controller. This enables robot-in-the-loop virtual commissioning without physical hardware.

> **Beta Notice**: This interface is in **beta**. It is validated against a software loopback and built strictly to the documented RSI specification, but has not yet been field-validated against every iiQKA.OS2 configuration. Test on the real controller first with a reduced speed override, and please get in direct contact with us for support or feedback.

> **Not the same as the** [**KUKA (Y200)**](/components-and-scripts/interfaces/kuka.md) **interface.** That one targets KUKA OfficeLite via the Y200/OC\_Assistant protocol. This interface targets the newer **iiQKA.OS2** generation via **RSI**.

## Overview

iiQKA.OS2 ships with a full Virtual Robot Controller that runs standalone on a PC. This interface connects to that VRC over RSI Ethernet (XML over UDP) and:

* Receives robot axis positions (A1–A6 and beyond) each RSI cycle and drives the linked robot joints
* Exchanges digital and analog I/O in both directions, so realvirtual can **set inputs on the controller** (simulated sensor states as robot inputs)

The interface is built on the realvirtual **FastInterface** standard and drives the robot exactly like every other robot interface in realvirtual: it writes each axis value to the linked **Drive**'s current position.

![KUKA iiQKA.OS2 VRC Interface Inspector](/files/7RGiQwGiWoNTvkG8Ragx)

### Scope: what this interface does and does not do

Virtual commissioning with a robot involves three layers. This interface covers two of them; the third stays with your PLC.

| Layer             | Content                                                  | Handled by                                   |
| ----------------- | -------------------------------------------------------- | -------------------------------------------- |
| **1. Axes**       | Joint positions for visualization                        | **This interface** (RSI)                     |
| **2. Robot I/O**  | Digital/analog signals both ways (e.g. set robot inputs) | **This interface** (RSI)                     |
| **3. Sequencing** | Program select/start, drives on, mode, program number    | **Your PLC** (Automatic External / fieldbus) |

> **Important limitation (RSI):** RSI I/O is bound to an active RSI context, so it only works **while an RSI motion is running**. For reliable I/O the KRL carrier program must keep a **continuous RSI context** (the robot effectively always runs with RSI active). If the robot must wait at standstill for a realvirtual signal *before* it starts moving, RSI cannot set that signal — that case is covered by a future EthernetKRL (EKI) channel and is not part of this beta.

## Properties

### Axis Configuration

**Axis** (list of Drive) holds the robot joint drives in order (Axis 1 first). Each RSI axis value received from the controller is written to the corresponding Drive's current position. Drag your robot's joint drives here in the correct order. The number of axes is taken from the list, so 6-axis robots, 7-axis robots and external axes are all supported.

### I/O Configuration

**Digital Channels** (integer) sets how many digital I/O bits are exchanged with the controller (`ST_DIGIN` / `ST_DIGOUT`). Click **Create IO Signals** after changing this to (re)generate the signal objects.

**Analog Channels** (integer) sets how many analog values are exchanged in each direction.

### Connection

**Listen IP** (string) is the local IP address the RSI UDP socket binds to. Use `0.0.0.0` to listen on all network interfaces, or a specific adapter IP to bind to one network.

**Rsi Port** (integer) is the UDP port the controller sends its RSI packets to. Default is `49152`. This must match the port configured in the controller's RSI Ethernet configuration.

### RSI Configuration

**Cycle Ms** (integer) is the expected RSI cycle time in milliseconds (default `4`, i.e. 250 Hz). It must be smaller than the controller's RSI send cycle so the reply is always ready in time.

**Axis Pos Tag** (string) is the XML tag name carrying the actual axis positions in your RSI configuration (default `AIPos`). It must match the tag defined in your `.rsix` / RSI Ethernet config.

**Receive Timeout Ms** (integer) is the per-cycle receive timeout. A missed packet counts as a timeout toward the reconnect logic.

### Reconnect

**Max Consecutive Timeouts** (integer) is how many consecutive missed RSI cycles are tolerated before the connection is considered lost and reconnection is triggered.

### Configuration (FastInterface)

**Update Cycle Ms** (integer) is the communication loop interval. **Only Transmit Changed Inputs** (boolean) reduces traffic by sending only changed values. **Auto Reconnect** (boolean) re-establishes the connection automatically after a drop. **Reconnect Interval Seconds** (integer) is the wait between attempts. **Max Reconnect Attempts** (integer, `-1` = unlimited) caps the attempts. **Debug Mode** (boolean) logs detailed communication activity for troubleshooting.

### Status (Read-Only)

**State** shows the connection status (Disconnected, Connecting, Connected, Error). **Current Axis Deg** lists the live axis values in degrees. **VRC Cycle Count** and **Last Cycle Ms** report throughput and the duration of the last cycle. **Reconnect Attempt Count**, **Input/Output Signals**, **Comm Cycle Ms** and **Cycle Count** provide further diagnostics.

## Signal Structure

Click **Create IO Signals** to generate the I/O signal objects as children of the interface. With 8 digital and 2 analog channels the hierarchy looks like this:

![Generated I/O signal hierarchy](/files/07BAxNYe8yvgV9eyiHYl)

| Signal                | Type           | Direction                | RSI mapping                        |
| --------------------- | -------------- | ------------------------ | ---------------------------------- |
| `DigOut0` … `DigOutN` | PLCOutputBool  | controller → realvirtual | `ST_DIGOUT` bits                   |
| `DigIn0` … `DigInN`   | PLCInputBool   | realvirtual → controller | `ST_DIGIN` bits (set robot inputs) |
| `AnaOut0` … `AnaOutN` | PLCOutputFloat | controller → realvirtual | analog out                         |
| `AnaIn0` … `AnaInN`   | PLCInputFloat  | realvirtual → controller | analog in                          |

The robot axes are **not** signals here — they are written directly to the Drives referenced in the **Axis** list.

## Quick Start

1. **Add the component** to an empty GameObject (`realvirtual/Interfaces/KUKA iiQKA.OS2 (VRC, RSI)`).
2. **Link the axes**: drag your robot's joint Drives into the **Axis** list in order (Axis 1 first).
3. **Set the channels** (Digital/Analog) and click **Create IO Signals**.
4. **Configure the connection**: set **Listen IP** and **Rsi Port** to match your controller's RSI Ethernet config; set **Cycle Ms** and **Axis Pos Tag** to match the `.rsix`.
5. **On the controller**: install the RSI option package, deploy the RSI configuration (`.rsix` + Ethernet config), and run a KRL carrier program that keeps a continuous RSI context.
6. **Enable the interface** (Active) and check that **State** turns to *Connected* and **Current Axis Deg** updates.
7. **Wire the I/O** to your plant simulation (link `DigIn*`/`AnaIn*` to simulated sensors so realvirtual sets the robot inputs; read `DigOut*`/`AnaOut*` to react to robot outputs).

## Requirements

* A **KUKA iiQKA.OS2** Virtual Robot Controller (runs standalone on a PC).
* The **iiQKA.RobotSensorInterface (RSI)** option package on the controller (separate KUKA option, not part of the free base).
* **iiQWorks.Sim Basic** (free) for configuring and deploying the RSI configuration.
* Sequencing (program start, drives on, program number) is driven by your PLC via Automatic External — not by this interface.

## See Also

* [KUKA (Y200)](/components-and-scripts/interfaces/kuka.md) – KUKA OfficeLite interface via Y200 (different generation)
* [Drive](/components-and-scripts/motion/drive.md) – the joint drives linked in the Axis list
* [Signal Manager](/components-and-scripts/interfaces/interface-tools/signal-manager.md) – managing interface signals
* [Custom Interfaces](/components-and-scripts/interfaces/custom-interfaces.md) – building interfaces on the FastInterface standard


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.realvirtual.io/components-and-scripts/interfaces/kuka-iiqka-vrc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
