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.
SNPX (also known as RobotIF, Robot Interface, or SRTP) is a high-performance binary protocol for reading and writing data on a Fanuc robot controller in less than 2 ms.
Key features
- Registers: Read/write numeric (R[]), position (PR[]), string (SR[]), and flag (F[]) registers
- I/O signals: Read/write 13 digital signal types and 5 numeric I/O types
- System variables: Read/write integer, real, position, and string variables
- Current position: Read world and user frame positions for any group
- Alarms: Read active alarm, alarm history, clear alarms
- Task monitoring: Read running program status, line number, and caller
- Batch reading: Read groups of data in a single command for maximum throughput
- Comments: Read/write descriptions for registers and I/O
Quick example
using UnderAutomation.Fanuc;using UnderAutomation.Fanuc.Common;public class Snpx{static void Main(){// Create a new Fanuc robot instanceFanucRobot robot = new FanucRobot();// Set connection parametersConnectionParameters parameters = new ConnectionParameters("192.168.0.1");parameters.Snpx.Enable = true;// 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();/**/}}
Differences with official Fanuc Robot Interface
Fanuc provides its own Robot Interface client (FRRJIF.DLL). Here are the main differences:
| UnderAutomation SDK | Fanuc FRRJIF.DLL | |
|---|---|---|
| Publisher | UnderAutomation | Fanuc Ltd. |
| Technology | 100% managed .NET assembly | Native ActiveX / COM |
| Dependencies | No dependencies, single DLL | Requires PCDK installation |
| Typical read time | 2 ms | 30 ms |
| Cross platform | Windows, Linux, macOS | Windows only |
| Languages | C#, Python, LabVIEW | COM-compatible languages |
Robot options
To enable SNPX on your robot, you need one of the following:
- FANUC America (R650 FRA): Option R553 "HMI Device SNPX" is required
- FANUC Ltd. (R651 FRL): No additional option needed
TCP port 60008 (Robot IF Server) must be accessible on your controller.
Performance
SNPX is the fastest protocol in the SDK. Regardless of the amount of data transported in a single command, execution time remains constant at approximately 2 ms.
For example, you can read 80 position registers in a single batch in the same time as reading a single variable.
When used with ROBOGUIDE, execution times under 1 ms can be achieved.
Connection
// Via FanucRobotvar robot = new FanucRobot();var parameters = new ConnectionParameters("192.168.0.1");parameters.Snpx.Enable = true;robot.Connect(parameters);// Or standalonevar snpx = new SnpxClient();snpx.Connect("192.168.0.1");
Check if SNPX is available
Features features = robot.Ftp.GetSummaryDiagnostic().Features;bool isSnpxAvailable = features.HasSnpx;
Next steps
- Registers : R[], PR[], SR[], F[]
- Inputs & Outputs : Digital and numeric signals
- System variables : Integer, real, position, string variables
- Current position : World and user frame positions
- Alarms & task status : Alarm management and task monitoring
- Batch reading : High-performance batch operations
Demonstration
You can download the Windows Forms Desktop project which implements all SNPX features from the download page.

API reference
Members of Snpx.SnpxClient :public class SnpxClient : SnpxClientBase {// Initializes a new instance of the <xref href="UnderAutomation.Fanuc.Snpx.SnpxClient" data-throw-if-not-resolved="false"></xref> class.public SnpxClient()// Connects to a Fanuc robot using the SNPX protocol.public void Connect(string ip, int port = 60008)}
public class SnpxClientBase {// Analog Inputspublic NumericIO AI { get; }// Analog Outputspublic NumericIO AO { get; }// Current active alarmspublic AlarmAccess ActiveAlarm { get; }// Alarm historypublic AlarmAccess AlarmHistory { get; }// Clear all active alarmspublic void ClearAlarms()// Clear all assignmentspublic void ClearAssignments()// Comments of registers, I/O signals and other datapublic Comments Comments { get; }protected void ConnectInternal(string ip, int port = 60008)// Indicates if the SNPX underlying TCP client is connected to the robotpublic bool Connected { get; }// Current position in world or user framepublic CurrentPosition CurrentPosition { get; }// Current program tasks status. Index starts from 1.public CurrentTaskStatus CurrentTaskStatus { get; }// List of all digital signal accessors (SDI, SDO, RDI, RDO, ...)public DigitalSignals[] DigitalSignals { get; }// Disconnect from the robotpublic void Disconnect()// Flagspublic Flags Flags { get; }// Group Inputspublic NumericIO GI { get; }// Group Outputspublic NumericIO GO { get; }// Gets all current assignments.public Assignment[] GetAssignments()// Integer variablespublic IntegerSystemVariables IntegerSystemVariables { get; }// IP address of the connected robot.public string Ip { get; }// Controller language (default is English)public Languages Language { get; set; }// List of all Numeric IOs accessors (GI, GO, AI, AO, ...)public NumericIO[] NumericIOs { get; }// Number registers R[] as floating point valuespublic NumericRegisters NumericRegisters { get; }// Number registers R[] as 16-bit integer valuespublic NumericRegistersInt16 NumericRegistersInt16 { get; }// Number registers R[] as 32-bit integer valuespublic NumericRegistersInt32 NumericRegistersInt32 { get; }// Programmable Machine Controller Datapublic NumericIO PMC_D { get; }// Programmable Machine Controller Constantspublic DigitalSignals PMC_K { get; }// Programmable Machine Controller Relayspublic DigitalSignals PMC_R { get; }// Checks the actual connection status via an active socket pollingpublic bool PollAndGetUpdatedConnectedState()// Position registerspublic PositionRegisters PositionRegisters { get; }// Position variablespublic PositionSystemVariables PositionSystemVariables { get; }// Remote Digital Inputspublic DigitalSignals RDI { get; }// Remote Digital Outputspublic DigitalSignals RDO { get; }// Real variablespublic RealSystemVariables RealSystemVariables { get; }// Safety Digital Inputspublic DigitalSignals SDI { get; }// Safety Digital Outputspublic DigitalSignals SDO { get; }// System Inputspublic DigitalSignals SI { get; }// System Outputspublic DigitalSignals SO { get; }// Set boolean variable without assignments.public void SetVariable(string name, bool value)// Set double variable without assignments.public void SetVariable(string name, double value)// Set integer variable without assignments.public void SetVariable(string name, int value)// Set string variable without assignments.public void SetVariable(string name, string value)// I/O simulation statuspublic SimulationStatus SimulationStatus { get; }// String registerspublic StringRegisters StringRegisters { get; }// String variablespublic StringSystemVariables StringSystemVariables { get; }// User Inputspublic DigitalSignals UI { get; }// User Outputspublic DigitalSignals UO { get; }// Weld Inputspublic DigitalSignals WI { get; }// Weld Outputspublic DigitalSignals WO { get; }// Weld System Inputspublic DigitalSignals WSI { get; }}