UnderAutomation.Fanuc 1.5.0

dotnet add package UnderAutomation.Fanuc --version 1.5.0                
NuGet\Install-Package UnderAutomation.Fanuc -Version 1.5.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UnderAutomation.Fanuc" Version="1.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UnderAutomation.Fanuc --version 1.5.0                
#r "nuget: UnderAutomation.Fanuc, 1.5.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UnderAutomation.Fanuc as a Cake Addin
#addin nuget:?package=UnderAutomation.Fanuc&version=1.5.0

// Install UnderAutomation.Fanuc as a Cake Tool
#tool nuget:?package=UnderAutomation.Fanuc&version=1.5.0                

Fanuc Communication SDK

UnderAutomation Fanuc communication SDK

NuGet .NET Framework .NET Standard .NET Core .NET Versions

πŸ€– 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.

πŸ”— More Information: https://underautomation.com/fanuc
πŸ”— Also available for 🟨 LabVIEW & 🐍 Python


⭐ Star if you like it !

πŸ‘οΈ 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.

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

<p align="center"> <img src="https://raw.githubusercontent.com/underautomation/Fanuc.NET/refs/heads/main/.github/assets/read-variables.gif" > <img src="https://raw.githubusercontent.com/underautomation/Fanuc.NET/refs/heads/main/.github/assets/move-robot.gif" > <img src="https://raw.githubusercontent.com/underautomation/Fanuc.NET/refs/heads/main/.github/assets/snpx.gif" > </p>


πŸ“Œ 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);

// Set a new value for register 2
robot.Snpx.PositionRegisters.Write(2, new Position { X = 100, Y = 50, Z = 25 });
πŸ”Ή Read & write numeric registers
// Read register R[1]
double value = robot.Snpx.Registers.Read(1);

// Write a value to R[2]
robot.Snpx.Registers.Write(2, 123.45);
πŸ”Ή Get alarm history
var alarms = robot.Snpx.Alarms.GetActiveAlarms();
foreach (var alarm in alarms)
{
    Console.WriteLine($"Alarm {alarm.Code}: {alarm.Message}");
}
πŸ”Ή 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);

πŸ“‚ 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("md:/Backup.va", @"C:\Backup\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();
Console.WriteLine($"Cartesian Position: X={currentPosition.Cartesian.X}, Y={currentPosition.Cartesian.Y}, Z={currentPosition.Cartesian.Z}");

πŸ”§ Configuration

βœ… Enable Telnet KCL

  1. Go to SETUP > Host Comm
  2. Select TELNET and press [DETAIL]
  3. Set a password and restart the robot

βœ… Enable FTP Memory Access

  1. Go to SETUP > Host Comm > FTP
  2. Set a username & password
  3. 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.


πŸ›  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();
robot.Connect(new ConnectParameters("192.168.0.1"));

πŸ” 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:

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 is compatible.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.5.0 59 2/4/2025
1.4.2 52 2/4/2025
1.4.1 85 1/23/2025
1.3.0 88 1/22/2025