UnderAutomation
質問ですか?

[email protected]

お問い合わせ
UnderAutomation
⌘Q
Fanuc SDK documentation
Read and decode files
Documentation home

SNPX

SNPX is a protocol that allows you to fast read and write data on the robot (registers, variables, alarms, IOs, etc.)

  • Overview
  • Differences with official Fanuc Robot Interface
  • Robot options
  • Features
  • API reference

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.dllFRRJIF.DLL
EditorUnderAutomationFanuc Ltd.
Technology100% managed .NET assemblynative ActiveX / COM
PortabilityNo 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 :

  • how many piece of software you redistribute
  • how many developers you have in your team
  • how many robots you have

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.

using UnderAutomation.Fanuc;
using UnderAutomation.Fanuc.Common;
namespace Snippets
{
public class Snpx
{
static void Main()
{
// Create a new Fanuc robot instance
FanucRobot robot = new FanucRobot();
// Set connection parameters
ConnectionParameters parameters = new ConnectionParameters("192.168.0.1");
parameters.Snpx.Enable = true;
// Connect to the robot
robot.Connect(parameters);
/**/
// Read a register
Position posReg1 = robot.Snpx.PositionRegisters.Read(1);
float numReg5 = robot.Snpx.NumericRegisters.Read(5);
string strReg10 = robot.Snpx.StringRegisters.Read(10);
// Write a register
posReg1.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 variable
int 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 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);
// 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 alarms
robot.Snpx.ClearAlarms();
/**/
}
}
}

SNPX use case :

SNPX

API reference

Snpx Client

Members of Snpx.SnpxClient :
public class SnpxClient : SnpxClientBase {
public SnpxClient()
public void Connect(string ip, int port = 60008)
}
Members of Snpx.Internal.SnpxClientBase :
public class SnpxClientBase {
// Analog Inputs
public NumericIO AI { get; }
// Analog Outputs
public 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 Inputs
public NumericIO GI { get; }
// Group Outputs
public NumericIO GO { get; }
public Assignment[] GetAssignments()
// Integer variables
public IntegerSystemVariables IntegerSystemVariables { get; }
public string Ip { get; }
// List of all Numeric IOs accessors (GI, GO, AI, AO, ...)
public NumericIO[] NumericIOs { get; }
// Number registers
public NumericRegisters NumericRegisters { get; }
// Programmable Machine Controller Data
public NumericIO PMC_D { get; }
// Programmable Machine Controller Constants
public DigitalSignals PMC_K { get; }
// Programmable Machine Controller Relays
public DigitalSignals PMC_R { get; }
// Position registers
public PositionRegisters PositionRegisters { get; }
// Position variables
public PositionSystemVariables PositionSystemVariables { get; }
// Remote Digital Inputs
public DigitalSignals RDI { get; }
// Remote Digital Outputs
public DigitalSignals RDO { get; }
// Safety Digital Inputs
public DigitalSignals SDI { get; }
// Safety Digital Outputs
public DigitalSignals SDO { get; }
// System Inputs
public DigitalSignals SI { get; }
// System Outputs
public DigitalSignals SO { get; }
// String registers
public StringRegisters StringRegisters { get; }
// String variables
public StringSystemVariables StringSystemVariables { get; }
// User Inputs
public DigitalSignals UI { get; }
// User Outputs
public DigitalSignals UO { get; }
// Weld Inputs
public DigitalSignals WI { get; }
// Weld Outputs
public DigitalSignals WO { get; }
// Weld System Inputs
public DigitalSignals WSI { get; }
}

Inputs and Outputs

Members of Snpx.Internal.DigitalSignals :
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)
}
Members of Snpx.Internal.NumericIO :
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)
}

Registers

Members of Snpx.Internal.NumericRegisters :
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)
}
Members of Snpx.Internal.PositionRegisters :
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)
}

Variables

Note that you can read and write Karel program variables by using the variable name $[KarelProgram]KarelVariable.

Members of Snpx.Internal.PositionSystemVariables :
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)
}
Members of Snpx.Internal.StringRegisters :
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)
}
Members of Snpx.Internal.StringSystemVariables :
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)
}

Universal Robots、Fanuc、Yaskawa、Staubli ロボットを .NET、Python、LabVIEW、または Matlab アプリケーションに簡単に統合

UnderAutomation
お問い合わせ価格設定 • 販売代理店お見積り・ご注文Legal

© All rights reserved.