# Fanuc (Pro)

{% hint style="warning" %}
Please note that this interface is only included in realvirtual.io Professional
{% endhint %}

The **Fanuc Interface** component allows direct communication between Unity and FANUC industrial robots using the **SNPX (Robot Interface / SRTP)** protocol. It enables real-time control of robot drives, digital and analog I/O, and access to internal robot variables — supporting use cases like digital twins, simulation, and live operation.

<figure><img src="/files/gM1RY0WXBzLAxOz5IRZX" alt=""><figcaption></figcaption></figure>

### Overview

This interface connects Unity to a FANUC controller over TCP/IP (default port `60008`), allowing you to:

* Read/write digital and analog signals
* Track drive and axis positions

### Requirements

To use the SNPX-based communication, your FANUC controller must support the Robot Interface protocol. This can be configured during workcell creation in ROBOGUIDE.

#### Enabling SNPX

You must enable one of the following options when setting up your virtual or physical controller:

* **R650 FRA Params**:
  * Select **"FANUC America Corp."** in the *Advanced* tab of ROBOGUIDE's Workcell Wizard (Step 7)
  * Add option **R553 – HMI Device SNPX**
* **R651 FRL Params**:
  * Select **"FANUC Ltd."** in the same Advanced tab
  * No additional options required

Also ensure that:

* TCP port `60008` (Robot IF Server) is open and accessible
* The controller and Unity application are on the same network or subnet

### Inspector Fields

<figure><img src="/files/G3JMgZJHYjkOE24iMnZk" alt=""><figcaption></figcaption></figure>

| Field                    | Description                                                    |
| ------------------------ | -------------------------------------------------------------- |
| **Active**               | Enables or disables the interface                              |
| **Is Connected**         | Shows live connection status with the controller               |
| **Address**              | IP address of the FANUC robot (e.g., `192.168.0.179`)          |
| **Drives**               | Assign Unity `Drive` components to robot axes (supports J1–J9) |
| **Num Inputs / Outputs** | Displays how many input/output signals are currently active    |
| **Thread Status**        | Indicates the state of the background communication thread     |
| **Connect Button**       | Triggers the connection process to the controller              |

### Signal Mapping

The **Fanuc Interface** uses string-based signal names to map FANUC robot I/O into Unity. These names follow a `PREFIX + NUMBER` format and are parsed automatically on startup.

<figure><img src="/files/020GMvAvotEvgNPhnqIy" alt=""><figcaption><p>Example of a configured digital output DO3</p></figcaption></figure>

#### Supported Signal Prefixes

| Prefix | Direction | Description                                     |
| ------ | --------- | ----------------------------------------------- |
| `DI`   | Input     | Device-level digital inputs                     |
| `DO`   | Output    | Device-level digital outputs                    |
| `UI`   | Input     | User-defined digital inputs                     |
| `UO`   | Output    | User-defined digital outputs                    |
| `RI`   | Input     | Remote robot digital inputs                     |
| `RO`   | Output    | Remote robot digital outputs                    |
| `SDI`  | Input     | Safety digital inputs                           |
| `SDO`  | Output    | Safety digital outputs                          |
| `WI`   | Input     | Welding-specific digital inputs                 |
| `WO`   | Output    | Welding-specific digital outputs                |
| `AI`   | Input     | Analog integer inputs (e.g., sensor values)     |
| `AO`   | Output    | Analog integer outputs (e.g., analog actuators) |

**Examples:**

* `DO0` – Digital Output 0
* `UI5` – User Input 5
* `AO3` – Analog Output 3
* `WI2` – Welding Input 2

Signals are case-insensitive in Unity but are documented here in uppercase for clarity.


---

# Agent Instructions: 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:

```
GET https://doc.realvirtual.io/components-and-scripts/interfaces/fanuc-pro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
