SNPX
On this page :
SNPX is a protocol that allows you to fast read and write data on the robot (registers, variables, alarms, IOs, etc.)
Overview
SNPX (Also known as RobotIF, Robot Interface, or SRTP) allows for quick reading and writing of data on the robot, including:
- Registers (Position, number, and string)
- Variables
- Signals (UI, UO, GI, GO, ...)
- Clear and read alarms
- Read the status programs
TCP port Robot IF Server (by default 60008) should be accessible on your controller.
Differences with official Fanuc Robot Interface
Fanuc also provides a Robot Interface client implementation (FRRJIF.DLL) and here are the main differences:
UnderAutomation.Fanuc.dll | FRRJIF.DLL | |
---|---|---|
Editor | UnderAutomation | Fanuc Ltd. |
Technology | 100% managed .NET assembly | native ActiveX / COM |
Portability | No dependencies, the DLL can be moved | Requires installation with a setup program, especially for license management |
Price and conditions | Pay once at an affordable price, forever, with no recurring charges No matter :
| Developer + runtime licences Contact Fanuc to find out your terms of use |
Robot options
To enable SNPX on your robot, you need one of the following option :
- If R650 FRA params is selected (Option "FANUC America Corp." in "Advanced" tab of ROBOGUIDE "Worcell creation wizard - Step 7 Robot options"), R553 "HMI Device SNPX" is needed.
- If R651 FRL Params is selected (Option "FANUC Ltd." in this "Advanced" tab), no option is needed.
Features
Not all functions have been documented yet, but you can take a look at the Winforms project source which implements all these features. I can be downloaded here.
// Example :Position register1 = robot.Snpx.PositionRegisters.Read(1);bool UI1 = robot.Snpx.UI.Read(1);
SNPX use case :
API reference
Members of Snpx.SnpxClient :public class SnpxClient : SnpxClientBase {public SnpxClient()public void Connect(string ip, int port = 60008)}
public class SnpxClientBase {// Analog Inputspublic NumericIO AI { get; }// Analog Outputspublic NumericIO AO { get; }public void ClearAlarms()public void ClearAssignments()protected void ConnectInternal(string ip, int port = 60008)public bool Connected { get; }// List of all digital signal accessors (SDI, SDO, RDI, RDO, ...)public DigitalSignals[] DigitalSignals { get; }public void Disconnect()// Group Inputspublic NumericIO GI { get; }// Group Outputspublic NumericIO GO { get; }public Assignment[] GetAssignments()// Integer variablespublic IntegerSystemVariables IntegerSystemVariables { get; }public string Ip { get; }// List of all Numeric IOs accessors (GI, GO, AI, AO, ...)public NumericIO[] NumericIOs { get; }// Number registerspublic NumericRegisters NumericRegisters { 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; }// Position registerspublic PositionRegisters PositionRegisters { get; }// Position variablespublic PositionSystemVariables PositionSystemVariables { get; }// Remote Digital Inputspublic DigitalSignals RDI { get; }// Remote Digital Outputspublic DigitalSignals RDO { get; }// Safety Digital Inputspublic DigitalSignals SDI { get; }// Safety Digital Outputspublic DigitalSignals SDO { get; }// System Inputspublic DigitalSignals SI { get; }// System Outputspublic DigitalSignals SO { 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; }}
public class DigitalSignals : SnpxElements<bool, int> {public override bool Read(int index)public bool[] Read(int firstIndex, ushort count)public SegmentName SegmentName { get; }public SegmentOffset SegmentOffset { get; }public SegmentSelector SegmentSelector { get; }public void Write(int index, bool value)public void Write(int firstIndex, bool[] values)}
public class NumericIO : SnpxElements<ushort, int> {public override ushort Read(int index)public ushort[] Read(int firstIndex, ushort count)public SegmentName SegmentName { get; }public SegmentOffset SegmentOffset { get; }public SegmentSelector SegmentSelector { get; }public void Write(int index, ushort value)public void Write(int firstIndex, ushort[] values)}
public class NumericRegisters : SnpxWritableAssignableElements<float, int> {protected override int AssignmentSize { get; }protected override string GetAssignmentName(int index)protected override string GetAssignmentTarget(int index)protected override float ReadFromClient(int offset)protected override void WriteInClient(int offset, float value)}
public class PositionRegisters : SnpxWritableAssignableElements<Position, int> {protected override int AssignmentSize { get; }protected override string GetAssignmentName(int index)protected override string GetAssignmentTarget(int index)protected override Position ReadFromClient(int offset)protected override void WriteInClient(int offset, Position value)}
public class PositionSystemVariables : SnpxWritableAssignableElements<Position, string> {protected override int AssignmentSize { get; }protected override string GetAssignmentName(string index)protected override string GetAssignmentTarget(string index)protected override Position ReadFromClient(int offset)protected override void WriteInClient(int offset, Position value)}
public class StringRegisters : SnpxWritableAssignableElements<string, int> {protected override int AssignmentSize { get; }protected override string GetAssignmentName(int index)protected override string GetAssignmentTarget(int index)protected override string ReadFromClient(int offset)protected override void WriteInClient(int offset, string value)}
public class StringSystemVariables : SnpxWritableAssignableElements<string, string> {protected override int AssignmentSize { get; }protected override string GetAssignmentName(string index)protected override string GetAssignmentTarget(string index)protected override string ReadFromClient(int offset)protected override void WriteInClient(int offset, string value)}