UnderAutomation
有问题吗?

[email protected]

联系我们
UnderAutomation
⌘Q
Fanuc

Fanuc SDK控制 Fanuc 机器人 直接从您自己的软件

快速创建使用 .NET、Python 或 LabVIEW 与 Fanuc 工业机器人通信的应用程序。 开箱即用的软件库:您的电脑通过网线与机器人通信。

免费试用查看价格

1100 € / $1300 起,一次性付款

无需在机器人上安装
30 天免费试用
永久许可,无需订阅
.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");
概览

您将获得什么

Plug & Play

只需几分钟即可连接您的机器人。无需安装许可证管理器, 无需 USB 密钥。仅参考图书馆。

没有在机器人上安装的插件

使用机器人控制器作为标准提供的网络协议。

KarelPCDKROS

30 天试用

免费试用 30 天, 无承诺, 无需注册

付一次, 永远使用

永久许可, 无需订阅, 无论机器人, 开发人员的数量是多少

顾客

客户成功案例

了解我们的客户如何将 UnderAutomation 解决方案集成到他们的工业项目中。

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.

功能

Fanuc SDK 功能: CGTP、Telnet、SNPX、FTP 和运动学

每项功能都有代码示例。点击示例可查看完整代码。

远程命令

在 PC 上运行、暂停和中止程序,复位报警,写入变量和 I/O。可使用 CGTP (较新控制器的 Web 服务器,HTTP / HTTPS),旧控制器则使用 Telnet KCL。控制器上不需要任何选项。

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

高速数据阅读和写作

SNPX (也称为SRTP/Robotif) 允许与机器人快速而结构化的数据通信。 它用于读取/编写寄存器, 监视警报并检查机器人的状况。

// 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

文件和解码

将FTP直接访问机器人的内存, 以进行文件传输, 读取变量和机器人状态的管理, 所有这些都以解码为单位并准备在结构化对象中使用。

// 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

逆运动学

根据任何 Fanuc 机器人或协作机器人的 DH 参数对其正运动学和逆运动学进行代数计算。

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

实施 Fanuc RMI (R912) 和 Stream Motion (J519) 协议, 使您可以简单地向机器人发送运动命令, 以及读取和写入其输入、输出和寄存器。

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

离线工具

无需机器人的功能允许您处理标准文件格式 (可变文件, 错误列表, 机器人状态等) 。

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
演示

看看实际效果

随 SDK 提供的演示程序的视频和截图。

Windows应用程序示例

无需编写代码:用演示程序在您的机器人上测试 SDK。

下载 (139 MB)通过下载, 您接受使用的一般条件: 见条款和条件

Github上的示例

使用此SDK的示例的来源可在GitHub上获得

python示例

该SDK与Python运行的示例, 以恢复机器人的笛卡尔位置。

LabView示例

VI的示例允许测试该SDK的大多数功能。

在浏览器中试用

两个使用 Fanuc SDK 构建的 Web 应用。无需安装即可测试。

fanuc-kinematics.underautomation.com
运动学模拟器
LIVE
在线试用

运动学模拟器

在 3D 中移动 Fanuc CRX 的关节或工具。正运动学和逆运动学在浏览器中运行,使用与 SDK 相同的引擎。

WebAssembly3DIK / FK
在线试用源代码
fanuc-rmi-demo.underautomation.com
RMI 序列编辑器
LIVE
在线试用

RMI 序列编辑器

用积木块构建机器人序列,在模拟或真实机器人上运行,并获取序列的 C# 或 Python 代码。

RMIC#Python
安装

一条命令即可安装

选择您的语言。30 天试用从首次使用开始,无需注册。

.NET

适用于 C# 和 VB.NET 的 NuGet 包,从 .NET Framework 到最新的 .NET。

dotnet add package UnderAutomation.Fanuc
请参阅xxx上请参阅xxx上打开指南

Python

PyPI 上的 Python 包,支持 Windows、Linux 和 macOS。

pip install UnderAutomation.Fanuc

LabVIEW

LabVIEW 库 (.lvlib) 及其示例项目,位于 GitHub。

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

AI 助手

面向 AI 编程助手(Claude Code、Cursor、Copilot 等)的 Skill:您的助手了解 SDK 的 API。

npx skills add underautomation/skills --skill underautomation-fanuc-csharp
文档

浏览文档

该文档使您可以快速开始使用库开发。 所有受支持的语言都可以使用相同的功能。

浏览文档

该文档使您可以快速开始使用库开发。 所有受支持的语言都可以使用相同的功能。

开始使用.NET

用这个100%托管的库在C#或VB中编码你的应用程序, 没有依赖性, 在NuGet.org上有你选择的版本和架构 (x86, x64, ARM, Linux, Windows, MacOS, .NET Framework, .NET Core, UWP, ...) 。

开始使用Python

用Python快速开发一个程序, 用这个库与你的机器人进行通信。它可以在PyPI上使用。

开始使用LabVIEW

为您的LabVIEW VIs配备与机器人的通信功能。

开始使用Matlab

让你的Matlab脚本来驱动你的机器人。

指南和实用文章

SDK通过多种原生以太网协议涵盖了Fanuc机器人的主要功能。根据控制器上安装的选项及其代次, 某些协议可能可用或不可用。以下每篇文章介绍如何完成特定任务, 并比较不同的实现方式。

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.

价格

可以免费下载库, 可以进行30天的测试。 在此期间之后, 您可以要求我们延长试用期, 或购买最适合您的许可证: 站点 (仅二进制二进制) 或源代码 (源代码) 。 购买后, 您有一个一年的维护期, 使您优先访问支持和更新的可能性。 当您购买使用许可证时, 它会链接到机器人品牌, 无论您将其重新分配给客户的机器人, 开发人员或软件的数量如何, 都可以永远使用, 而无需重复费用。 如果您是分销商, 并希望为您的客户提供我们的产品之一, 请与我们联系以讨论特殊条件和价格。

标准站点许可证

•

$1300为了一生
$780大学 (40% 折扣)
专为工业环境而设计, 提供终身全功能访问。
包括 1 年维护 (获取更新)
与 Pro 许可证的条件相同, 但支持不优先且维护期为 1 年。
没有内部来源; 仅提供混淆的 DLL。
无法通过视频会议提供帮助 (仅通过电子邮件) 。
为您的项目选择正确的许可证
立即购买
最受欢迎

专业许可

•

$2000
$2960
为了一生
$1200大学 (40% 折扣)
适用于需要优先支持和长期维护的关键生产环境。
包括 3 年维护 (获取更新) , 在此期限内没有续订订单 (零文书工作)
完整和永久的SDK: 无需重复订阅, 许可证是您的永远您的, 并且可以使用机器人品牌的所有编程语言。
仅在指定的邮政地址上持有许可证的组织才能使用。 不管开发机器的数量多少, 所有团队开发人员都将共享相同的许可证。
使用SDK开发的任何应用程序都可以将无限数量的客户提供, 而不管要连接的机器人数量如何。
该许可证是一种密码, 可以在解锁功能的代码中调用。 没有其他软件要安装。 没有USB密钥。
优先支持 (平均<24小时)
远程协助 (电子邮件和长达 2 小时的视频会议)
没有内部来源; 仅提供混淆的 DLL。
随时升级到源 (支付差价)
立即购买

源代码许可

•

$4000为了一生
$2400大学 (40% 折扣)
实现完全的技术主权、深度定制和完全独立。
与专业许可证的条件相同
C# 语言库的完整内部代码
Visual Studio 解决方案包含数年开发的数千行代码
您可以在一般使用条款中定义的限制内修改此源代码并在您的应用程序中使用它
与AI编程助手(Claude、Copilot、Cursor、Codex等)完美协作,得益于完整源代码访问权限和随附的上下文文件(AGENTS.md),为LLM提供SDK内部结构的精确知识
立即购买
FAQ

常见问题

不需要。SDK 使用控制器的以太网协议,不需要 PC Developer's Kit (PCDK)。Telnet、FTP 和 CGTP 不需要任何选项。在 FANUC America 控制器上,SNPX 需要 R553 选项;RMI 需要 R912 选项,Stream Motion 需要 J519 选项。

R-J3iB、R-30iA、R-30iB、R-30iB Plus 和 R-50iA 控制器,以及用于无机器人测试的 ROBOGUIDE。可用的协议取决于控制器的代次和选项。

许可证永久有效,无需订阅。Standard:1100 EUR / 1300 USD。Pro:1700 EUR / 2000 USD。Source:3400 EUR / 4000 USD。一个许可证覆盖一个组织的一个地址,开发人员、机器人和交付的应用程序数量不限。Standard 包含 1 年更新,Pro 和 Source 包含 3 年更新。大学可享受 40% 折扣。

可以。从首次使用起 30 天内所有功能均可使用,无需注册。试用期可应要求延长。借助 Windows 演示程序,您无需编写代码即可在自己的机器人上试用 SDK。

可以。该库针对 .NET Standard 2.0 和 2.1 编译,可在 Windows、Linux 和 macOS 上运行,支持 x64 和 ARM。在 Linux 或 macOS 上使用 Python 时,请安装 .NET 运行时,并在启动 Python 前执行 export PYTHONNET_RUNTIME=coreclr。

可以。pip install UnderAutomation.Fanuc 会安装该包和 pythonnet,pythonnet 将 .NET 库加载到 Python 进程中。支持 Python 3.7 至 3.13。API 与 .NET 相同,采用 Python 命名。

有。LabVIEW 库 (.lvlib) 及其示例项目位于 GitHub 的 Fanuc.vi 仓库中。它们使用与其他语言相同的 .NET 程序集。

可以,购买 Source 许可证即可获得该库的全部 C# 代码及其 Visual Studio 解决方案。您可以在许可协议 (EULA) 的范围内修改代码并在您的应用程序中使用。Standard 和 Pro 许可证仅提供混淆后的 DLL。
GitHub

GitHub 上的库

每个包都发布在 GitHub 上,并附有更新日志。

最新版本

Fanuc.NET

最新版本

underautomation / Fanuc.NET

Public

Fanuc SDK 的 .NET 库。

C#在 GitHub 上查看

underautomation / Fanuc.py

Public

Fanuc SDK 的 Python 包。

Python在 GitHub 上查看

underautomation / Fanuc.vi

Public

Fanuc SDK 的 LabVIEW 库,含示例 VI。

LabVIEW在 GitHub 上查看

现在就开始吧!

今天就开始 30 天试用,或索取报价。

免费试用下单要求报价联系我们