UnderAutomation.Fanuc
5.4.0
dotnet add package UnderAutomation.Fanuc --version 5.4.0
NuGet\Install-Package UnderAutomation.Fanuc -Version 5.4.0
<PackageReference Include="UnderAutomation.Fanuc" Version="5.4.0" />
<PackageVersion Include="UnderAutomation.Fanuc" Version="5.4.0" />
<PackageReference Include="UnderAutomation.Fanuc" />
paket add UnderAutomation.Fanuc --version 5.4.0
#r "nuget: UnderAutomation.Fanuc, 5.4.0"
#:package UnderAutomation.Fanuc@5.4.0
#addin nuget:?package=UnderAutomation.Fanuc&version=5.4.0
#tool nuget:?package=UnderAutomation.Fanuc&version=5.4.0
Fanuc Communication SDK
π€ Effortlessly Communicate with Fanuc robots
The Fanuc SDK enables seamless integration with Fanuc robots for automation, data exchange, and remote control. Ideal for industrial automation, research, and advanced robotics applications.
It allows you to connect to a real robot, but also to ROBOGUIDE.
π More Information: https://underautomation.com/fanuc
π Also available for π¨ LabVIEW & π Python
ποΈ Watch to be notified of latest updates !
π TL;DR (Too Long; Didnβt Read)
- βοΈ PCDK Alternative: No need for Fanucβs PCDK or Robot Interface
- π Read/Write Variables: Access and modify system variables.
- π Register Control: Read/write registers for positions, numbers, and strings.
- π¬ Program Control: Run, abort, and reset programs.
- π Alarm Management: Reset alarms and view alarm history.
- β‘ I/O Control: Manage ports and I/O values (UI, UO, GI, GO, etc.).
- π State Monitoring: Get safety status, position, diagnostics, and more.
- π File Management: Easily manipulate files.
- π CGTP Web Server: Access registers, I/O, programs, and variables via HTTP.
- ποΈ Remote motion: Remote move the robot.
- π Stream Motion: Real-time joint streaming at up to 250 Hz.
- π Kinematics Calculations: Perform forward and inverse kinematics offline.
No additional installations or Fanuc options are required to use this SDK.
π₯ Download Example Applications
Explore the Fanuc SDK with fully functional example applications and precompiled binaries for various platforms. See Github releases
πΉ Windows Forms Application (Full Feature Showcase)
A Windows Forms application demonstrating all the features of the library.
π Download: π₯ UnderAutomation.Fanuc.Showcase.Forms.exe
**Read variables π*

**Move the robot π*

**High speed Read & Write registers π*

Live remote control with Jostick or 3D Mouse:

TP Editor with breakpoints:

Forward and Inverse Kinematics:

π Features
π₯οΈ 1. Remote Control via Telnet KCL
Telnet KCL (Keyboard Command Line) allows sending commands to control the robot remotely:no additional options needed on the controller.
πΉ Reset alarms
robot.Telnet.Reset();
πΉ Start, pause, hold, abort programs
robot.Telnet.Run("MyProgram");
robot.Telnet.Pause("MyProgram");
robot.Telnet.Hold("MyProgram");
robot.Telnet.Continue("MyProgram");
robot.Telnet.Abort("MyProgram", force: true);
πΉ Set variables dynamically
robot.Telnet.SetVariable("my_variable", 42);
robot.Telnet.SetVariable("$RMT_MASTER", 1);
πΉ Control robot I/O ports
// Set an output port (example: DOUT port 2 = 0)
robot.Telnet.SetPort(KCLPorts.DOUT, 2, 0);
// Simulate an input port (example: DIN port 3 = 1)
robot.Telnet.Simulate(KCLPorts.DIN, 3, 1);
robot.Telnet.Unsimulate(KCLPorts.DIN, 3);
π 2. High-Speed Data Exchange via SNPX (RobotIF)
SNPX (also known as SRTP/RobotIF) enables fast, structured data communication with the robot.
It is used to read/write registers, monitor alarms, and check robot status.
πΉ Read & write position registers
// Read position register 1
Position register1 = robot.Snpx.PositionRegisters.Read(1);
// Write a Cartesian position to register 2
robot.Snpx.PositionRegisters.Write(2, new CartesianPosition { X = 100, Y = 50, Z = 25, W = 180, P = 0, R = 0 });
πΉ Read & write numeric registers
// Read register R[1]
float value = robot.Snpx.NumericRegisters.Read(1);
// Write a value to R[2]
robot.Snpx.NumericRegisters.Write(2, 123.45f);
πΉ Read and control robot signals (UI, UO, GI, GO)
// Read a User Input (UI) state
bool UI1 = robot.Snpx.UI.Read(1);
// Set a User Output (UO) signal
robot.Snpx.UO.Write(3, true);
πΉ Read & write variables
// 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);
Clear alarms
// Clear alarms
robot.Snpx.ClearAlarms();
Get current position
// Read current joint and cartesian position
Position position = robot.Snpx.CurrentPosition.ReadWorldPosition();
// Read User frame cartesian position
robot.Snpx.CurrentPosition.ReadUserFramePosition(1);
π 3. File & Variable Management via FTP Memory Access
The SDK provides direct FTP access to the robot's memory for file transfer, variable reading, and configuration management.
πΉ Upload, download, and delete files
// 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(@"C:\Backup\Backup.va", "md:/Backup.va");
// Delete a file on the robot
robot.Ftp.DirectFileHandling.DeleteFile("md:/OldProgram.tp");
πΉ Read all declared variables
var allVariables = robot.Ftp.GetAllVariables();
foreach (var variable in allVariables)
{
Console.WriteLine($"{variable.Name} = {variable.Value}");
}
πΉ Read known system variables
// Read system variable $RMT_MASTER
int remoteMode = robot.Ftp.KnownVariableFiles.GetSystemFile().RmtMaster;
πΉ Check robot safety status
SafetyStatus safetyStatus = robot.Ftp.GetSafetyStatus();
Console.WriteLine($"Emergency Stop: {safetyStatus.ExternalEStop}");
Console.WriteLine($"Teach Pendant Enabled: {safetyStatus.TPEnable}");
πΉ Retrieve the robot's current position
CurrentPosition currentPosition = robot.Ftp.GetCurrentPosition();
GroupPosition group = currentPosition.GroupsPosition[0];
Console.WriteLine($"Cartesian Position: X={group.WorldPositions[0].X}, Y={group.WorldPositions[0].Y}, Z={group.WorldPositions[0].Z}");
Console.WriteLine($"Joint Position: J1={group.JointsPosition.J1}, J2={group.JointsPosition.J2}");
π§ Configuration
β Enable Telnet KCL
- Go to
SETUP > Host Comm - Select
TELNETand press[DETAIL] - Set a password and restart the robot
β Enable FTP Memory Access
- Go to
SETUP > Host Comm > FTP - Set a username & password
- Perform a cold start
β Enable SNPX
If Your Robot Uses "FANUC America Corp." Parameters (R650 FRA): You need to enable option R553 ("HMI Device SNPX") in the robot's software configuration.
If Your Robot Uses "FANUC Ltd." Parameters (R651 FRL): No additional option is required:SNPX is included by default.
π 4. CGTP Web Server Protocol
CGTP (Controller Gateway Transfer Protocol) communicates with the robot controller's built-in HTTP web server. It provides a comprehensive API for program management, variable access, register operations, I/O control, and kinematics.
πΉ Read & write variables
string value = robot.Cgtp.ReadVariableAsString("$MCR.$GENOVERRIDE");
robot.Cgtp.WriteVariable("$MCR.$GENOVERRIDE", 50);
πΉ Register access
// Numeric registers
robot.Cgtp.WriteNumericRegisterAsInteger(1, 42);
var reg = robot.Cgtp.ReadNumericRegisterWithComment(1);
// String registers
robot.Cgtp.WriteStringRegister(1, "Hello CGTP");
πΉ Program control
robot.Cgtp.SelectProgram("MAIN", 1);
robot.Cgtp.RunProgram("MAIN");
robot.Cgtp.PauseAllPrograms();
robot.Cgtp.AbortTask("MAIN");
πΉ List programs
// List all TP programs on the controller
string[] allTp = robot.Cgtp.ListTpPrograms();
// List Karel macros only
string[] macros = robot.Cgtp.ListPrograms(CgtpProgramType.Karel, CgtpProgramSubType.Macro);
πΉ Source code editing (firmware V9.10+)
// Insert a line before line 3
robot.Cgtp.InsertSourceLine("MY_PROGRAM", "L P[5] 100mm/sec FINE", 3);
// Replace line 5
robot.Cgtp.ReplaceSourceLine("MY_PROGRAM", "J P[1] 50% FINE", 5);
// Delete 2 lines starting at line 4
robot.Cgtp.DeleteSourceLines("MY_PROGRAM", 4, 2);
πΉ I/O control
int ioValue = robot.Cgtp.ReadIo(CgtpIoPortType.DO, 1);
robot.Cgtp.WriteIo(CgtpIoPortType.DO, 1, 1);
robot.Cgtp.SimulateIo(CgtpIoPortType.DI, 3);
robot.Cgtp.UnsimulateIo(CgtpIoPortType.DI, 3);
π 5. Stream Motion : Real-Time Joint Streaming
Stream Motion enables real-time joint streaming at up to 250 Hz, providing precise motion control for advanced applications.
πΉ Connect and start streaming
var parameters = new ConnectionParameters("192.168.0.1");
parameters.StreamMotion.Enable = true;
robot.Connect(parameters);
robot.StreamMotion.Start();
πΉ Send motion commands
robot.StreamMotion.SendJointCommand(
new MotionData { J1 = 10, J2 = 20, J3 = 30, J4 = 0, J5 = -45, J6 = 90 },
isLastData: false
);
πΉ Monitor state at high frequency
robot.StreamMotion.StateReceived += (sender, e) =>
{
var state = e.State;
Console.WriteLine($"J1={state.JointPosition.J1:F3}Β° Ready={state.Status.ReadyForCommands}");
};
ποΈ 6. Remote Motion via RMI
RMI (Remote Motion Interface) allows sending motion commands to the robot, including linear, joint, and circular motions.
πΉ Initialize and move
robot.Rmi.Initialize();
Frame target = new Frame { X = 500, Y = 200, Z = 300, W = 0, P = 90, R = 0 };
MotionConfiguration config = new MotionConfiguration { UToolNumber = 1, UFrameNumber = 0 };
robot.Rmi.LinearMotion(
sequenceId: 1, config: config, position: target,
speedType: SpeedType.MmSec, speed: 100,
termType: TerminationType.Fine, termValue: 0,
acc: null, offsetPr: null, visionPr: null, wristJoint: false, mrot: false,
lcbType: null, lcbValue: null, portType: null, portNumber: null, portValue: null
);
π Kinematics Calculations:
The SDK includes tools for performing forward and inverse kinematics calculations offline, allowing you to compute the robot's end-effector position based on joint angles and vice versa, from DH parameters.
using UnderAutomation.Fanuc.Kinematics;
JointsPosition position = new JointsPosition(10, 20, 120, 0, 0, 25);
// ---- 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);
π Installation
1οΈβ£ Get the SDK
Choose the installation method that works best for you:
| Method | NuGet (Recommended) | Direct Download |
|---|---|---|
| How to Install | Install via NuGet. See on Nuget | Download and reference the DLL manually |
dotnet add package UnderAutomation.Fanuc |
π₯ Download ZIP |
2οΈβ£ Reference the SDK in Your Code
using UnderAutomation.Fanuc;
3οΈβ£ Connect to Your Robot
var robot = new FanucRobot();
var parameters = new ConnectionParameters("192.168.0.1");
parameters.Language = Languages.English; // Japanese and Chinese controllers are also supported
parameters.Telnet.Enable = true;
parameters.Telnet.TelnetKclPassword = "your_telnet_password";
parameters.Ftp.Enable = true;
parameters.Ftp.FtpUser = "";
parameters.Ftp.FtpPassword = "";
parameters.Snpx.Enable = true;
parameters.Rmi.Enable = true;
robot.Connect(parameters);
π Compatibility
β
Supported Robots: R-J3iB, R-30iA, R-30iB
β
Operating Systems: Windows, Linux, macOS
β
.NET Versions: .NET Framework (β₯3.5), .NET Standard, .NET Core, .NET 5/6/8/9
π’ Contributing
We welcome contributions! Feel free to:
- Report issues via GitHub Issues
- Submit pull requests with improvements
- Share feedback & feature requests
π License
β οΈ This SDK requires a commercial license.
π Learn more: UnderAutomation Licensing
π¬ Need Help?
If you have any questions or need support:
- π Check the Docs: Documentation
- π© Contact Us: Support
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net35 is compatible. net40 is compatible. net403 was computed. net45 is compatible. net451 is compatible. net452 is compatible. net46 is compatible. net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.5.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- System.Text.Encoding.CodePages (>= 4.5.1)
-
.NETStandard 2.1
- System.Text.Encoding.CodePages (>= 4.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.4.0 | 0 | 4/9/2026 |
| 5.3.0 | 32 | 4/7/2026 |
| 5.2.0 | 97 | 4/3/2026 |
| 5.1.0 | 117 | 3/23/2026 |
| 5.0.0 | 83 | 3/23/2026 |
| 4.9.0 | 81 | 3/23/2026 |
| 4.8.0 | 85 | 3/19/2026 |
| 4.7.0 | 114 | 2/27/2026 |
| 4.6.0 | 136 | 2/27/2026 |
| 4.5.0 | 102 | 2/25/2026 |
| 4.4.0 | 101 | 2/19/2026 |
| 4.3.0 | 117 | 2/11/2026 |
| 4.2.0 | 128 | 2/5/2026 |
| 4.1.0 | 97 | 2/3/2026 |
| 4.0.0 | 114 | 1/29/2026 |
| 3.5.0 | 103 | 1/28/2026 |
| 3.4.0 | 107 | 1/23/2026 |
| 3.3.0 | 319 | 12/17/2025 |
| 3.1.1 | 297 | 12/16/2025 |
| 3.0.0 | 735 | 12/3/2025 |
