UnderAutomation
Any question?

[email protected]

Contact us
UnderAutomation
⌘Q
Fanuc

Fanuc SDKControl Fanuc robots from your own software

Quickly create applications in .NET, Python or LabVIEW that communicate with your Fanuc industrial robot. A ready-to-use software library: your PC talks to the robot over the network cable.

Try it freeSee pricing

From 1100 € / $1300, paid once

Nothing to install on the robot
30-day free trial
Perpetual license, no subscription
.NET / C#
Python
LabVIEW
Matlab
Fanuc robot
Fanuc SDK
1// dotnet add package UnderAutomation.Fanuc
2using UnderAutomation.Fanuc;
3
4var robot = new FanucRobot();
5robot.Connect("192.168.0.1");
6
7var position = robot.Cgtp.ReadCartesianPosition();
8robot.Cgtp.WriteVariable("$RMT_MASTER", 1);
9robot.Cgtp.RunProgram("MyProgram");
In short

What you get

Plug & Play

Connect your robot in just a few minutes. No license manager to install, no USB key. Only reference the library.

No plugins to install on the robot

Use of network protocols provided as standard by the robot controller.

KarelPCDKROS

30-day trial

Try it free for 30 days, no commitment, no registration required

Pay once, use forever

Perpetual license, no subscription required, regardless of the number of robots, developers, or redistributed software

Customers

Customer Success Stories

Discover how our customers integrate UnderAutomation solutions into their industrial projects.

GE
Aerospace / Healthcare

GE: Aerospace & Healthcare Automation

GE Accelerates Industrial Automation with UnderAutomation SDKs for Universal Robots and FANUC.

Lockheed Martin
Aerospace / Defense

Lockheed Martin: Flexible Aerospace Automation

Refining precision manufacturing and handling with collaborative robots.

Nissan
Automotive

Nissan: Driving Efficiency at Scale

How Nissan Smyrna Leverages Fanuc Connectivity for intelligent vehicle assembly.

realvirtual.io
Virtual Commissioning / Digital Twins

realvirtual.io: Fanuc Integration for Virtual Commissioning

How realvirtual.io embedded the UnderAutomation Fanuc SDK to deliver first-class robot integration inside their Unity-based digital twin platform.

Features

Fanuc SDK Features: CGTP, Telnet, SNPX, FTP & Kinematics

Each feature comes with a code sample. Click on it to see the full code.

Remote commands

Run, pause and abort programs, reset alarms, set variables and I/O from your PC. Use CGTP, the web server of recent controllers (HTTP / HTTPS), or Telnet KCL on older ones. No option is needed on the controller.

robot.Connect(parameters);
// Read a variable
CgtpVariableValue var = robot.Cgtp.ReadVariable("$RMT_MASTER");
int rmtMaster = var.IntegerValue;
// Write a variable
robot.Cgtp.WriteVariable("$RMT_MASTER", 1);
// Read a numeric register with comment
NumericRegisterWithComment reg = robot.Cgtp.ReadNumericRegisterWithComment(1);
// Read I/O
int di1 = robot.Cgtp.ReadIo(CgtpIoPortType.DI, 1);
// Write I/O
robot.Cgtp.WriteIo(CgtpIoPortType.DO, 1, 1);
// Read current Cartesian position
CartesianPosition pos = robot.Cgtp.ReadCartesianPosition();
// Run a program
robot.Cgtp.RunProgram("MY_PROGRAM");
}
}
Click to see the full code

High-speed data reading and writing

SNPX (also known as SRTP/Robotif) allows rapid and structured data communication with the robot. It is used to read/write the registers, monitor alarms and check the condition of the robot.

// Connect to the robot
robot.Connect(parameters);
// Read a register
Position posReg1 = robot.Snpx.PositionRegisters.Read(1);
float numReg5 = robot.Snpx.NumericRegisters.Read(5);
string strReg10 = robot.Snpx.StringRegisters.Read(10);
// Write a register
posReg1.CartesianPosition.X = 100;
robot.Snpx.PositionRegisters.Write(1, posReg1);
robot.Snpx.NumericRegisters.Write(2, 123.45f);
robot.Snpx.StringRegisters.Write(3, "Hello, world!");
// Read a variable
int rmtMaster = robot.Snpx.IntegerSystemVariables.Read("$RMT_MASTER");
string lastAlm = robot.Snpx.StringSystemVariables.Read("$ALM_IF.$LAST_ALM");
Position cellFloor = robot.Snpx.PositionSystemVariables.Read("$CELL_FLOOR");
// Write a system variable
robot.Snpx.IntegerSystemVariables.Write("$RMT_MASTER", 1);
robot.Snpx.StringSystemVariables.Write("$ALM_IF.$LAST_ALM", "No alarms");
robot.Snpx.PositionSystemVariables.Write("$CELL_FLOOR", cellFloor);
// Write a Karel program variable
robot.Snpx.IntegerSystemVariables.Write("$[KarelProgram]KarelVariable", 1);
// Read and Write I/O (SDI,SDO,RDI,RDO,UI,UO,SI,SO,WI,WO,WSI,PMC_K,PMC_R)
robot.Snpx.RDO.Write(1, true);
ushort ai5 = robot.Snpx.AI.Read(5);
// Read and Write analogs (AI,AO,GI,GO,PMC_D)
robot.Snpx.AO.Write(2, 5);
ushort ao3 = robot.Snpx.AO.Read(3);
// Clear alarms
robot.Snpx.ClearAlarms();
}
Click to see the full code

File and decoding

Direct access FTP to the memory of the robot for file transfer, reading variables and the management of the robot state, all in decoded and ready to be used in structured objects.

// Connect to the robot
robot.Connect(parameters);
IOState ioState = robot.Ftp.GetIOState();
// Read a variable
var variableFiles = robot.Ftp.GetAllVariables();
foreach (var variableFile in variableFiles)
foreach (var variable in variableFile.Variables)
Console.WriteLine($"{variable.Name} = {variable.Value}");
// Read system variable $RMT_MASTER
int remoteMode = robot.Ftp.KnownVariableFiles.GetSystemFile().RmtMaster;
// Read safety status
SafetyStatus safetyStatus = robot.Ftp.GetSafetyStatus();
Console.WriteLine($"Emergency Stop: {safetyStatus.ExternalEStop}");
Console.WriteLine($"Teach Pendant Enabled: {safetyStatus.TPEnable}");
// Get current position for each arm (Joints, World position of each tool, user frame positions)
CurrentPosition currentPosition = robot.Ftp.GetCurrentPosition();
// Upload a TP program to the controller
robot.Ftp.DirectFileHandling.UploadFileToController(@"C:\Programs\MyPrg.tp", "md:/MyPrg.tp");
// Download a file from the robot
robot.Ftp.DirectFileHandling.DownloadFileFromController("md:/Backup.va", @"C:\Backup\Backup.va");
// Delete a file on the robot
robot.Ftp.DirectFileHandling.DeleteFile("md:/OldProgram.tp");
}
Click to see the full code

Inverse kinematics

Algebraic calculation of the direct and inverse kinematics of any Fanuc robot or cobot from its DH parameters.

FanucRobot robot = new FanucRobot();
robot.Connect("192.168.0.1");
// Get DH parameters
// Example: CRX-10iA/L
DhParameters dh = new DhParameters(-540, 150, -160, 0, 710, 0);
// From a known arm model
dh = DhParameters.FromArmKinematicModel(ArmKinematicModels.CRX10iA);
// From OPW parameters: M10iA/7L
dh = DhParameters.FromOpwParameters(0.15, -0.20, 0.60, 0.86, 0.10);
// From an online robot (SYSMOTN file)
dh = DhParameters.FromSymotnFile(robot.Ftp.KnownVariableFiles.GetSymotnFile())[0];
// Forward kinematics
CartesianPosition pose = KinematicsUtils.ForwardKinematics(position, dh);
// Inverse kinematics with multiple solutions
JointsPosition[] positions = KinematicsUtils.InverseKinematics(pose, dh);
}
}
Click to see the full code

Motion Interfaces

Implementation of the Fanuc RMI (R912) and Stream Motion (J519) protocols which allows you to simply send movement commands to the robot, as well as read and write its inputs, outputs and registers.

parameters.Rmi.Enable = true;
robot.Connect(parameters);
// Initialize the RMI_MOVE program on the controller.
// TP must be disabled and the controller must be in AUTO mode.
robot.Rmi.Initialize();
// Linear motion at 100 mm/s to a Cartesian target (tool 1, frame 0)
var instr = new LinearMotionTpInstruction
{
SpeedType = RmiLinearSpeedType.MmSec,
Speed = 100,
TermType = RmiTerminationType.Fine,
Target = new CartesianPositionWithUserFrame(500, 200, 300, 0, 90, 0, tool: 1, frame: 0)
};
RmiInstructionResponse r = robot.Rmi.SendTpInstruction(instr);
// Wait for the controller to confirm the motion completed
r.WaitForCompletion();
if (r.Status == RmiInstructionStatus.Error)
System.Console.WriteLine("Error: " + r.ErrorText);
// Abort when done - always end the session with Abort() or Disconnect()
robot.Rmi.Abort();
robot.Disconnect();
}
}
Click to see the full code

Offline tools

The features without the need for robot allow you to handle standard file formats (variable file, error list, robot status, etc.).

static void Main()
{
// Parse a variable file and extract a hierarchical list of variables
GenericVariableFile vaFile = FanucFileReaders.VariableReader.ReadFile("C:/path/to/variable.va", Languages.English);
foreach (var variable in vaFile.Variables)
Console.WriteLine($"{variable.Name} = {variable.Value} [{variable.Type}]");
// Edit and regenerate the variable file
vaFile.GenerateVa("C:/path/to/variable_modified.va\"");
// Parse several types of files
FanucFileReaders.ErrorListReader.ReadFile("C:/path/to/errall.ls", Languages.English);
FanucFileReaders.IOStateReader.ReadFile("C:/path/to/iostate.dg", Languages.English);
FanucFileReaders.SafetyStatusReader.ReadFile("C:/path/to/safety.dg", Languages.English);
FanucFileReaders.CurrentPositionReader.ReadFile("C:/path/to/curpos.dg", Languages.English);
}
Click to see the full code
Demo

See it in action

Video and screenshots of the demo application delivered with the SDK.

Windows application example

No code to write: test the SDK on your robot with the demo application.

Download (139 MB)By downloading, you accept the general conditions of use: See terms and conditions

Examples on GitHub

The sources of examples of use of this SDK are available on Github

Python example

Example of operation of this SDK with Python to recover the Cartesian position of a robot.

Labview example

Example of VI which allows most of the functions of this SDK to be tested.

Try it in your browser

Two web applications built with the Fanuc SDK. Nothing to install to test them.

fanuc-kinematics.underautomation.com
Kinematics playground
LIVE
Try it online

Kinematics playground

Move the joints or the tool of a Fanuc CRX in 3D. The forward and inverse kinematics run in your browser, with the same engine as the SDK.

WebAssembly3DIK / FK
Try it onlineSource code
fanuc-rmi-demo.underautomation.com
RMI sequence builder
LIVE
Try it online

RMI sequence builder

Build a robot sequence with blocks, run it on a simulated robot or on a real one, and get the C# or Python code of your sequence.

RMIC#Python
Installation

Install it in one command

Choose your language. The 30-day trial starts at the first use, with no registration.

.NET

NuGet package for C# and VB.NET, from .NET Framework to the latest .NET.

dotnet add package UnderAutomation.Fanuc
See on NuGetSee on GitHubOpen the guide

Python

Python package on PyPI, for Windows, Linux and macOS.

pip install UnderAutomation.Fanuc

LabVIEW

LabVIEW library (.lvlib) and its example project, on GitHub.

git clone https://github.com/underautomation/Fanuc.vi.git

AI agents

Skill for AI coding agents (Claude Code, Cursor, Copilot...): your assistant knows the API of the SDK.

npx skills add underautomation/skills --skill underautomation-fanuc-csharp
Documentation

Browse the documentation

The documentation allows you to quickly start developing with the library. The same functionality is available in all supported languages.

Browse the documentation

The documentation allows you to quickly start developing with the library. The same functionality is available in all supported languages.

Getting started with .NET

Code your application in C# or VB with this 100% managed library, without dependencies and available on NuGet.org in the version and architecture of your choice (x86, x64, ARM, Linux, Windows, MacOS, .NET Framework, .NET Core, UWP, ...)

Get started with Python

Quickly develop a program in Python that communicates with your robot using this library. It is available on PyPI.

Getting started with LabVIEW

Equip your LabVIEW VIs with a communication with your robot.

Getting started with Matlab

Allow your Matlab scripts to drive your robot.

Guides and how-to articles

The SDK covers the main features of Fanuc robots through several native Ethernet protocols. Depending on the options installed on your controller and its generation, some protocols may or may not be available. Each article below explains how to perform a specific task and compares the different approaches.

CGTP overview

CGTP is an HTTP-based protocol providing the richest feature set: program management, variables, registers, I/O, kinematics, batch operations, and file access.

SNPX overview

SNPX (also known as RobotIF or SRTP) is a high-speed protocol for reading and writing registers, variables, I/O signals, alarms, and positions in less than 2 ms.

Telnet overview

Telnet KCL (Keyboard Command Line) sends commands to a Fanuc robot: run programs, reset alarms, read and write variables, control I/O ports.

FTP overview

FTP provides access to internal controller files including variables, programs, diagnostics, safety status, and current position.

RMI overview

RMI (Remote Motion Interface) is a TCP-based protocol for sending motion commands, managing frames, and controlling the robot remotely.

Stream Motion overview

Stream Motion (J519 option) gives the position of the robot at every communication cycle (2 to 8 ms). Requirements, TP program, protocol versions and quick start.

Motion planner overview

Create smooth robot trajectories offline, with velocity, acceleration and jerk limits, using FANUC motion instructions (J, L, C, FINE, CNT, CR).

Forward & Inverse Kinematics

Perform forward and inverse kinematics calculations offline for FANUC industrial robots and CRX cobots using DH parameters.

Offline file parsing

Parse and decode Fanuc variable files (.va), error lists (.ls), I/O state, safety status, and current position files without a robot connection.

Read & write registers

Compare all methods to read and write numeric, position, and string registers on a Fanuc robot: SNPX, FTP, CGTP, and Telnet.

Get current position

Retrieve the current robot position (joint and Cartesian) using SNPX, FTP, CGTP, or Telnet. Compare approaches and choose the best for your use case.

Control inputs & outputs

Set, read, simulate, and unsimulate I/O ports on a Fanuc robot using SNPX, CGTP, or Telnet. Compare port types and methods.

Run a program remotely

Start, pause, abort, and monitor Fanuc programs remotely using Telnet, CGTP, SNPX system variables, or RMI.

Reset alarms remotely

Clear and reset alarms on a Fanuc robot using SNPX, Telnet, or CGTP. Read active alarms and alarm history.

Read & write system variables

Access and modify Fanuc system variables ($RMT_MASTER, $MCR.$GENOVERRIDE, etc.) using Telnet, SNPX, CGTP, or FTP.

Monitor task execution

Supervise running programs, check task states, line numbers, and calling programs using SNPX, FTP, or Telnet.

Move robot remotely

Move a Fanuc robot from an external application using RMI motion commands, Stream Motion real-time streaming, or DPM with SNPX.

Upload, download & backup files

Transfer TP programs, variable files, and backups between your PC and a Fanuc controller using FTP or CGTP.

Read & write I/O comments

Read and write comments (descriptions) for registers and I/O ports using SNPX or CGTP.

Access Karel program variables

Read and write Karel program variables using SNPX ($[Program]Variable syntax), CGTP, or FTP variable files.

Optimize with batch operations

Maximize read/write performance using SNPX batch assignments and CGTP batch variables for high-frequency data exchange.

Move robot with mouse

Control a FANUC robot in real time using Dynamic Path Modification (DPM) and SNPX. Ideal for joystick or 6D mouse teleoperation setups.

TP editor with breakpoints

Prototype your own TP Editor with syntax highlighting and breakpoint debugging using Telnet and FTP features.

Pricing

Libraries can be downloaded for free and can be tested for 30 days. After this period, you can ask us to extend the trial period, or buy the license that suits you best: standard, pro or source. After purchasing, you have a maintenance period, giving you access to the support and the possibility of updating. When you buy a license to use, it is linked to a robot brand, you can use it forever, without recurring fee, regardless of the number of robot, developer or software that you redistribute to your customers. If you are a distributor and wish to offer your customers one of our products, please contact us to discuss special conditions and prices.

Standard Site License

•

$1300lifetime
$780for universities (40% discount)
Designed for industrial environments, providing lifetime full-feature access.
1 year maintenance included (access to updates)
Same conditions as the Pro License, except that support is not prioritized and maintenance is 1 year.
There are no internal sources; only the obfuscated DLL is provided.
No assistance by videoconference (only via email).
Choose the right license for your project
Buy now
Most popular

Pro License

•

$2000
$2960
lifetime
$1200for universities (40% discount)
For critical production environments requiring priority support and longer-term maintenance.
3 years maintenance included (access to updates) with no renewal orders during this term (zero paperwork)
Complete and permanent SDK: no recurring subscription is required, the license is yours forever and works in all programming languages ​​for a robot brand.
Can be used only by the organization holding the license, at the postal address indicated. All team developers will share the same license, regardless of the number of development machine.
Any application developed using the SDK can be delivered to an unlimited number of your customers at no additional cost, regardless of the number of robots to connect.
The license is a kind of password to call in the code that unlocks the features. No additional software to install. No USB key.
Priority Support (<24h on average)
Remote assistance (email and up to 2h videoconference)
There are no internal sources; only the obfuscated DLL is provided.
Upgrade to Source anytime (pay the difference)
Buy now

Source license

•

$4000lifetime
$2400for universities (40% discount)
For complete technical sovereignty, deep customization, and total independence.
Same conditions as the pro license
Complete internal code of the library in C#
Visual Studio solution that includes thousands of lines of code developed over several years
You can modify this source code and use it in your application, within the limits defined in the general terms of use
Works seamlessly with AI coding agents (Claude, Copilot, Cursor, Codex...) thanks to full source code access and included context files (AGENTS.md) that give the LLM the exact knowledge of the SDK internals
Buy now
FAQ

Frequently asked questions

No. The SDK uses the Ethernet protocols of the controller and does not need the PC Developer's Kit (PCDK). Telnet, FTP and CGTP need no option. SNPX needs option R553 on FANUC America controllers, RMI needs option R912 and Stream Motion needs option J519.

R-J3iB, R-30iA, R-30iB, R-30iB Plus and R-50iA controllers, and ROBOGUIDE for tests without a robot. The protocols you can use depend on the generation and the options of the controller.

A license is permanent, with no subscription. Standard: 1100 EUR / 1300 USD. Pro: 1700 EUR / 2000 USD. Source: 3400 EUR / 4000 USD. It covers one organization at one address, with any number of developers, robots and delivered applications. Updates are included for 1 year with Standard and 3 years with Pro and Source. Universities get a 40% discount.

Yes. Every feature works for 30 days from the first use, with no registration. The trial can be extended on request. The Windows demo application lets you try the SDK on your robot without writing code.

Yes. The library is compiled for .NET Standard 2.0 and 2.1, which run on Windows, Linux and macOS, on x64 and ARM. For Python on Linux or macOS, install the .NET runtime and run export PYTHONNET_RUNTIME=coreclr before starting Python.

Yes. pip install UnderAutomation.Fanuc installs the package and pythonnet, which loads the .NET library in the Python process. Python 3.7 to 3.13 is supported. The API is the same as in .NET, with Python names.

Yes. The LabVIEW library (.lvlib) and its example project are on GitHub, in the Fanuc.vi repository. They use the same .NET assembly as the other languages.

Yes, with the Source license: the full C# code of the library and its Visual Studio solution. You can modify it and use it in your applications, within the limits of the EULA. The Standard and Pro licenses provide the obfuscated DLL only.
GitHub

Libraries on GitHub

Each package is published on GitHub with its changelog.

Latest releases

Fanuc.NET

Latest release

underautomation / Fanuc.NET

Public

.NET library of the Fanuc SDK.

C#View on GitHub

underautomation / Fanuc.py

Public

Python package of the Fanuc SDK.

PythonView on GitHub

underautomation / Fanuc.vi

Public

LabVIEW library of the Fanuc SDK, with example VIs.

LabVIEWView on GitHub

Get started now !

Start the 30-day trial today, or ask for a quote.

Try it freeOrderRequest a quoteContact us