---
title: Fanuc SDK documentation
---

# Fanuc SDK documentation

## Get started

- [Get started with .NET](/fanuc/documentation/get-started-net) : Add the Fanuc SDK to a C# or VB.NET project from NuGet or as a DLL, and write a first program for a Fanuc controller or ROBOGUIDE. One managed DLL, .NET Framework 3.5 to .NET Standard 2.1.
- [Get started with Python](/fanuc/documentation/get-started-python) : Install the Fanuc SDK from PyPI and control a Fanuc controller or ROBOGUIDE from Python 3.7 to 3.13, on Windows, Linux and macOS. Same features as the .NET library, with Python names.
- [Get started with LabVIEW](/fanuc/documentation/get-started-labview) : Control a Fanuc robot from LabVIEW 2010 to 2024 with the VIs of UnderAutomation.Fanuc.lvlib: Telnet KCL, FTP and SNPX. Nothing to install on the controller.
- [Get started with Matlab](/fanuc/documentation/get-started-matlab) : Load the .NET DLL of the Fanuc SDK in Matlab with NET.addAssembly, then read registers, positions and I/O of a Fanuc controller from a Matlab script.
- [Try the SDK with the demo application](/fanuc/documentation/demo-app) : A Windows application, one executable and open source, that calls the features of the SDK. Test what your Fanuc controller answers before you write any code.
- [Connect to your robot](/fanuc/documentation/connect) : The protocols of the SDK, their options and setup on the controller, the connection parameters, and the connection to a real Fanuc robot or to ROBOGUIDE.
- [Test with ROBOGUIDE](/fanuc/documentation/simulator) : Develop without a real robot. Connect the SDK to a virtual robot of FANUC ROBOGUIDE with the folder of the robot, like to a real controller.
- [Licensing](/fanuc/documentation/license) : The 30 day trial, the license key and RegisterLicense, the license states, the maintenance and the source license of the Fanuc SDK.
- [AI agent skills](/fanuc/documentation/ai-skills) : Install the skill of the Fanuc SDK in Claude Code, Codex, GitHub Copilot or Cursor, for C# or Python. The agent then answers with the documentation and the API of your SDK version.

## CGTP

- [CGTP overview](/fanuc/documentation/cgtp) : CGTP is an HTTP-based protocol providing the richest feature set: program management, variables, registers, I/O, kinematics, batch operations, and file access.
- [Program management](/fanuc/documentation/cgtp-programs) : Create, delete, rename, run, pause, abort programs and manage their attributes (comment, owner, subtype) via CGTP.
- [Registers & variables](/fanuc/documentation/cgtp-registers-variables) : Read and write numeric, position, and string registers, system variables, and perform batch operations via CGTP.
- [Inputs & Outputs](/fanuc/documentation/cgtp-io) : Read, write, simulate, and unsimulate digital, analog, group, and robot I/O ports via CGTP.
- [Position & kinematics](/fanuc/documentation/cgtp-position-kinematics) : Read current Cartesian and joint positions, and compute forward and inverse kinematics directly on the controller via CGTP.
- [Alarms, comments & files](/fanuc/documentation/cgtp-alarms-files) : Manage user alarms, read/write register and I/O comments, list and download files from the controller via CGTP.
- [KCL commands](/fanuc/documentation/cgtp-kcl) : Send KCL commands through the web server instead of Telnet. Unsafe commands without result, and when to use RunProgram.

## SNPX

- [SNPX overview](/fanuc/documentation/snpx) : 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.
- [Registers](/fanuc/documentation/snpx-registers) : Read and write numeric registers (R[]), position registers (PR[]), string registers (SR[]), and flags (F[]) via SNPX.
- [Inputs & Outputs](/fanuc/documentation/snpx-io) : Read and write digital signals (SDI, SDO, RDI, RDO, UI, UO, SI, SO, WI, WO) and numeric I/O (GI, GO, AI, AO) via SNPX.
- [System variables](/fanuc/documentation/snpx-variables) : Read and write integer, real, position, and string system variables on the Fanuc controller via SNPX.
- [Current position](/fanuc/documentation/snpx-position) : Read the current robot position in world coordinates or user frame coordinates, for single or multi-group controllers.
- [Alarms & task status](/fanuc/documentation/snpx-alarms-tasks) : Read active alarms, alarm history, clear alarms, monitor running tasks, and read/write comments via SNPX.
- [Batch reading](/fanuc/documentation/snpx-batch) : Read groups of registers, variables, or signals in a single command for maximum performance using SNPX batch assignments.

## Telnet

- [Telnet overview](/fanuc/documentation/telnet) : Telnet KCL (Keyboard Command Line) sends commands to a Fanuc robot: run programs, reset alarms, read and write variables, control I/O ports.
- [Enable Telnet on your robot](/fanuc/documentation/telnet-enable-on-robot) : TELNET is natively available on ROBOGUIDE and all Fanuc robots without any option. Learn how to enable it step by step.
- [Program control via Telnet](/fanuc/documentation/telnet-program-control) : Run, pause, hold, continue, and abort TP and Karel programs remotely using Telnet KCL commands.
- [Variables & I/O via Telnet](/fanuc/documentation/telnet-variables-io) : Read and write system variables, set output ports, simulate and unsimulate input ports using Telnet KCL.
- [Debugging & breakpoints](/fanuc/documentation/telnet-debugging) : Add, remove, and manage breakpoints on TP and Karel programs. Step through code line by line using Telnet KCL.

## FTP

- [FTP overview](/fanuc/documentation/ftp) : FTP provides access to internal controller files including variables, programs, diagnostics, safety status, and current position.
- [File management](/fanuc/documentation/ftp-file-management) : Upload, download, delete, rename files and directories on the Fanuc robot controller via FTP.
- [Diagnostics & variables](/fanuc/documentation/ftp-diagnostics) : Read safety status, current position, I/O state, installed features, error history, registers, and system variables via FTP.

## RMI

- [RMI overview](/fanuc/documentation/rmi) : RMI (Remote Motion Interface) is a TCP-based protocol for sending motion commands, managing frames, and controlling the robot remotely.
- [Motion commands](/fanuc/documentation/rmi-motion) : Send linear, joint, and circular motion commands with configurable speed, termination type, and acceleration via RMI.
- [Frames, I/O & status](/fanuc/documentation/rmi-frames-io) : Manage user frames and tools, read/write I/O, read positions, set speed override, and get controller status via RMI.

## Stream Motion

- [Stream Motion overview](/fanuc/documentation/stream-motion) : 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.
- [Connection, status & session](/fanuc/documentation/stream-motion-session) : Connect to the robot, read its status and its velocity, acceleration and jerk limits, and run one or several Stream Motion sessions.
- [Send trajectories](/fanuc/documentation/stream-motion-trajectories) : Queue joint or Cartesian trajectories, send your own positions, and control the motion with override, pause and abort.
- [Real-time control](/fanuc/documentation/stream-motion-real-time) : Make the robot follow a target that changes at any time, or compute the position of the robot at every cycle with a callback.
- [I/O during motion](/fanuc/documentation/stream-motion-io) : Read and write digital I/O with each position sent to the robot, and switch outputs at a precise point of a trajectory.
- [Troubleshooting & best practices](/fanuc/documentation/stream-motion-troubleshooting) : Handle Stream Motion errors, understand the usual MOTN alarms, and follow the good practices for smooth and reliable motions.

## Motion

- [Motion planner overview](/fanuc/documentation/motion) : Create smooth robot trajectories offline, with velocity, acceleration and jerk limits, using FANUC motion instructions (J, L, C, FINE, CNT, CR).
- [Joint & Cartesian motions](/fanuc/documentation/motion-moves) : Chain joint, linear and circular motions with FINE, CNT and CR terminations, waits and I/O, in tool and user frames.
- [Splines & shapes](/fanuc/documentation/motion-splines-shapes) : Pass through a list of points with a smooth spline, and draw circles, rectangles, polygons, helices and spirals in any plane.
- [Trajectories from points](/fanuc/documentation/motion-trajectory-from-points) : Create trajectories from your own positions, sampled or timed, check them against the limits of the robot, and slow them down if needed.
- [Frames & orientations](/fanuc/documentation/motion-frames-orientations) : Convert W, P, R angles to quaternions, interpolate orientations, and change frames between flange, tool, user frame and world frame.

## Offline tools

- [Forward & Inverse Kinematics](/fanuc/documentation/kinematics) : Perform forward and inverse kinematics calculations offline for FANUC industrial robots and CRX cobots using DH parameters.
- [Offline file parsing](/fanuc/documentation/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.

## How-To Articles

- [Read & write registers](/fanuc/documentation/how-to-read-write-fanuc-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](/fanuc/documentation/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](/fanuc/documentation/set-and-simulate-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](/fanuc/documentation/run-program-remotely) : Start, pause, abort, and monitor Fanuc programs remotely using Telnet, CGTP, SNPX system variables, or RMI.
- [Reset alarms remotely](/fanuc/documentation/how-to-reset-fanuc-alarm-remotely) : Clear and reset alarms on a Fanuc robot using SNPX, Telnet, or CGTP. Read active alarms and alarm history.
- [Read & write system variables](/fanuc/documentation/read-write-system-variables) : Access and modify Fanuc system variables ($RMT_MASTER, $MCR.$GENOVERRIDE, etc.) using Telnet, SNPX, CGTP, or FTP.
- [Monitor task execution](/fanuc/documentation/monitor-task-execution) : Supervise running programs, check task states, line numbers, and calling programs using SNPX, FTP, or Telnet.
- [Move robot remotely](/fanuc/documentation/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](/fanuc/documentation/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](/fanuc/documentation/read-write-io-comments) : Read and write comments (descriptions) for registers and I/O ports using SNPX or CGTP.
- [Access Karel program variables](/fanuc/documentation/access-karel-program-variables) : Read and write Karel program variables using SNPX ($[Program]Variable syntax), CGTP, or FTP variable files.
- [Optimize with batch operations](/fanuc/documentation/optimize-performance-batch-operations) : Maximize read/write performance using SNPX batch assignments and CGTP batch variables for high-frequency data exchange.
- [Move robot with mouse](/fanuc/documentation/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](/fanuc/documentation/tp-editor-with-breakpoints) : Prototype your own TP Editor with syntax highlighting and breakpoint debugging using Telnet and FTP features.
- [Legal notice and acknowledgements](/fanuc/documentation/credits) : Legal notice and acknowledgements for the UnderAutomation Fanuc SDK.
