Fanuc SDKFanuc ロボットを 自社のソフトウェアから制御
Fanuc 産業用ロボットと通信する .NET、Python、LabVIEW のアプリケーションをすばやく作成できます。 すぐに使えるソフトウェアライブラリです。PC がネットワークケーブル経由でロボットと通信します。
Matlab
1// dotnet add package UnderAutomation.Fanuc2using UnderAutomation.Fanuc;34var robot = new FanucRobot();5robot.Connect("192.168.0.1");67var position = robot.Cgtp.ReadCartesianPosition();8robot.Cgtp.WriteVariable("$RMT_MASTER", 1);9robot.Cgtp.RunProgram("MyProgram");
得られるもの
Plug & Play
わずか数分でロボットを接続できます。ライセンス マネージャーをインストールしたり、USB キーをインストールしたりする必要はありません。ライブラリのみを参照してください。
ロボットにインストールするプラグインはありません
ロボットコントローラーによって標準として提供されるネットワークプロトコルの使用。
30日間のトライアル
30日間無料で試してみてください、コミットメントなし、登録は必要ありません
一度支払い、永遠に使用してください
ロボット、開発者、または再配布されたソフトウェアの数に関係なく、永続的なライセンス、サブスクリプションは必要ありません
お客様の成功事例
当社のお客様が UnderAutomation ソリューションを産業プロジェクトにどのように統合しているかをご覧ください。


GE: Aerospace & Healthcare Automation
GE Accelerates Industrial Automation with UnderAutomation SDKs for Universal Robots and FANUC.


Lockheed Martin: Flexible Aerospace Automation
Refining precision manufacturing and handling with collaborative robots.


Nissan: Driving Efficiency at Scale
How Nissan Smyrna Leverages Fanuc Connectivity for intelligent vehicle assembly.


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 variableCgtpVariableValue var = robot.Cgtp.ReadVariable("$RMT_MASTER");int rmtMaster = var.IntegerValue;// Write a variablerobot.Cgtp.WriteVariable("$RMT_MASTER", 1);// Read a numeric register with commentNumericRegisterWithComment reg = robot.Cgtp.ReadNumericRegisterWithComment(1);// Read I/Oint di1 = robot.Cgtp.ReadIo(CgtpIoPortType.DI, 1);// Write I/Orobot.Cgtp.WriteIo(CgtpIoPortType.DO, 1, 1);// Read current Cartesian positionCartesianPosition pos = robot.Cgtp.ReadCartesianPosition();// Run a programrobot.Cgtp.RunProgram("MY_PROGRAM");}}
高速データの読み取りと書き込み
SNPX (SRTP/Robotifとも呼ばれます) により、ロボットとの迅速かつ構造化されたデータ通信が可能になります。 レジスタの読み取り/書き込み、アラームを監視し、ロボットの状態を確認するために使用されます。
// Connect to the robotrobot.Connect(parameters);// Read a registerPosition posReg1 = robot.Snpx.PositionRegisters.Read(1);float numReg5 = robot.Snpx.NumericRegisters.Read(5);string strReg10 = robot.Snpx.StringRegisters.Read(10);// Write a registerposReg1.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 variableint 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 variablerobot.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 variablerobot.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 alarmsrobot.Snpx.ClearAlarms();}
ファイルとデコード
ファイル転送、読み取り変数、ロボット状態の管理のためにロボットのメモリにFTPを直接アクセスします。すべてデコードされ、構造化されたオブジェクトで使用できます。
// Connect to the robotrobot.Connect(parameters);IOState ioState = robot.Ftp.GetIOState();// Read a variablevar 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_MASTERint remoteMode = robot.Ftp.KnownVariableFiles.GetSystemFile().RmtMaster;// Read safety statusSafetyStatus 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 controllerrobot.Ftp.DirectFileHandling.UploadFileToController(@"C:\Programs\MyPrg.tp", "md:/MyPrg.tp");// Download a file from the robotrobot.Ftp.DirectFileHandling.DownloadFileFromController("md:/Backup.va", @"C:\Backup\Backup.va");// Delete a file on the robotrobot.Ftp.DirectFileHandling.DeleteFile("md:/OldProgram.tp");}
逆運動学
ファナックのロボットまたは協働ロボットの DH パラメータからの直接運動学および逆運動学の代数計算。
FanucRobot robot = new FanucRobot();robot.Connect("192.168.0.1");// Get DH parameters// Example: CRX-10iA/LDhParameters dh = new DhParameters(-540, 150, -160, 0, 710, 0);// From a known arm modeldh = DhParameters.FromArmKinematicModel(ArmKinematicModels.CRX10iA);// From OPW parameters: M10iA/7Ldh = 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 kinematicsCartesianPosition pose = KinematicsUtils.ForwardKinematics(position, dh);// Inverse kinematics with multiple solutionsJointsPosition[] positions = KinematicsUtils.InverseKinematics(pose, dh);}}
Motion Interfaces
ファナック 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 completedr.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();}}
オフラインツール
ロボットを必要としない機能により、標準のファイル形式 (変数ファイル、エラーリスト、ロボットステータスなど) を処理できます。
static void Main(){// Parse a variable file and extract a hierarchical list of variablesGenericVariableFile 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 filevaFile.GenerateVa("C:/path/to/variable_modified.va\"");// Parse several types of filesFanucFileReaders.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);}
実際の動作を見る
SDK に付属するデモアプリケーションの動画とスクリーンショットです。
Windowsアプリケーションの例
コードは不要です。デモアプリケーションで、お使いのロボットで SDK を試せます。

Githubの例
このSDKの使用例のソースは、githubで入手できます
Pythonの例
ロボットのデカルト位置を回復するためのPythonを使用したこのSDKの操作の例。
LabViewの例
このSDKの機能のほとんどをテストできるVIの例。
ブラウザーで試す
Fanuc SDK で作った 2 つの Web アプリです。試すのにインストールは不要です。
コマンド 1 つでインストール
言語を選んでください。30 日間のトライアルは最初の使用時に始まります。登録は不要です。
.NET
C# と VB.NET 用の NuGet パッケージ。.NET Framework から最新の .NET まで対応。
dotnet add package UnderAutomation.FanucPython
PyPI の Python パッケージ。Windows、Linux、macOS に対応。
pip install UnderAutomation.FanucLabVIEW
LabVIEW ライブラリ (.lvlib) とサンプルプロジェクト。GitHub で公開。
git clone https://github.com/underautomation/Fanuc.vi.gitAI エージェント
AI コーディングエージェント(Claude Code、Cursor、Copilot など)用の Skill。アシスタントが SDK の API を理解します。
npx skills add underautomation/skills --skill underautomation-fanuc-csharpドキュメントを閲覧します
このドキュメントを使用すると、ライブラリですぐに開発を開始できます。 同じ機能は、すべてのサポートされている言語で利用できます。
ドキュメントを閲覧します
このドキュメントを使用すると、ライブラリですぐに開発を開始できます。 同じ機能は、すべてのサポートされている言語で利用できます。
.NETを始めよう
100%マネージドライブラリで、依存関係がなく、NuGet.orgでご希望のバージョンとアーキテクチャ (x86, x64, ARM, Linux, Windows, MacOS, .NET Framework, .NET Core, UWP, ...) で利用可能なC#またはVBでアプリケーションをコーディングできます。
Pythonを始めよう
このライブラリを使って、ロボットと通信するプログラムをPythonで素早く開発することができます。PyPIで公開されています。
LabVIEWを使いこなす
LabVIEW VIにロボットとの通信機能を持たせてください。

Matlabを始めよう
Matlab スクリプトがロボットを動かすようにします。
ガイドとハウツー記事
SDKは、複数のネイティブEthernetプロトコルを通じて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日間テストできます。 この期間の後、トライアル期間を延長するように頼むか、自分に最適なライセンスを購入することができます: サイト (不明瞭なバイナリのみ) またはソース (ソースコード) 。 購入後、1年のメンテナンス期間があり、サポートへの優先アクセスと更新の可能性が得られます。 使用するライセンスを購入する場合、ロボットブランドにリンクされているため、顧客に再配布するロボット、開発者、またはソフトウェアの数に関係なく、繰り返し料金を払うことなく永久に使用できます。 あなたがディストリビューターであり、お客様に当社の製品のいずれかを提供したい場合は、特別な条件と価格について話し合うためにお問い合わせください。
標準サイトライセンス
•
プロライセンス
•
ソースコードライセンス
•
よくある質問
GitHub のライブラリ
各パッケージは変更履歴とともに GitHub で公開されています。

