UnderAutomation
¿Una pregunta?

[email protected]

Contactos
UnderAutomation
⌘Q
Esta página solo está disponible en inglés.

Routing: one protocol per method, chosen at the connection

How UnderAutomation.Robotics chooses the protocol of each method on a Fanuc, Yaskawa, Universal Robots, ABB or Stäubli controller, with nothing to install. Route explorer, robot.Routing, C# and Python examples.

  • How a route is chosen
  • Route explorer
  • Prerequisites
  • Example
  • Read the route of each method
  • Read the result of each protocol
  • Ask before a call
  • Nothing to install
  • Reference
  • Methods of ControllerRouting
  • RouteInfo
  • What to read next

A robot controller has several interfaces: a web server, an FTP server, a protocol for the signals, another for the moves. For each method of the common API, UnderAutomation.Robotics chooses the interface, called a route, that answers on your Fanuc, Yaskawa, Universal Robots, ABB or Stäubli controller, and tells you which one it chose and why.

At Connect, each method takes the first route of its list whose protocol answered. A method with no usable route is not available.At Connect, each method takes the first route of its list whose protocol answered. A method with no usable route is not available.
At Connect, each method takes the first route of its list whose protocol answered. A method with no usable route is not available.

How a route is chosen

Each method has a list of routes for each brand, in a default order. A route is a protocol of the controller, sometimes in a given mode: on Fanuc, the routes Cgtp and CgtpKcl use the same web server.

At Connect, the library tests the protocols of the brand one by one and keeps open the ones that give a route to a method. Each method then takes the first route of its list whose protocol answered. A controller without the SNPX option still reads its state on Fanuc: the method takes the next route of its list. The protocols opened by the test that no method needs are closed.

Three rules follow:

  • The route is chosen once, at Connect. When a call fails, the library does not try another route. Change the settings and connect again.
  • Some routes take control of the robot, for example RMI on Fanuc and Interpreter Mode on Universal Robots. The library never opens them by itself: you enable them in the connection parameters of the brand. They are marked (manual) below.
  • A method that has no route on a brand throws FeatureNotSupportedException. A method whose routes all failed or are off throws RouteUnavailableException. IsAvailable of each service returns false in both cases. One exception: on ABB, without the RAPID module, IsAvailable returns true for the moves and the call throws RouteUnavailableException. See Errors.

You can change the order: prefer a protocol for every method, set the routes of a group or of one method, or forbid a protocol. See Routing settings.

Route explorer

Choose a brand, then switch off the protocols and options that your controller does not have. For each method, the explorer shows the route used, the next route of its list, or "Not available". The routes marked (manual) start switched off: the library opens them only when you enable them. Without JavaScript, the table gives the routes of every brand in the default order.

The explorer is generated from the route data of the library.

Routes of each method in the default order. The first route is used, the next ones are fallbacks.
MethodFanucYaskawaUniversal RobotsABBStäubli
Information
Info.ReadCGTP (Cgtp), FTPHigh Speed Ethernet ServerDashboard ServerRobot Web ServicesSOAP
Info.ReadGroupsCGTP (Cgtp), FTPHigh Speed Ethernet ServerDashboard ServerRobot Web ServicesSOAP
State
State.ReadSNPX, FTPHigh Speed Ethernet Server, Ethernet ServerDashboard Server, Primary Interface (Primary)Robot Web ServicesNot available
State.ServoOnCGTP (CgtpKcl), Telnet, SNPX, RMI (manual)High Speed Ethernet Server, Ethernet ServerDashboard Server, REST API, Primary Interface (Primary)Robot Web ServicesSOAP
State.ServoOffNot availableHigh Speed Ethernet Server, Ethernet ServerDashboard Server, REST API, Primary Interface (Primary)Robot Web ServicesSOAP
Programs
Program.ListCGTP (Cgtp), FTPHigh Speed Ethernet Server, Ethernet Server, FTPSFTPRobot Web ServicesSOAP, Files
Program.SelectCGTP (Cgtp)High Speed Ethernet Server, Ethernet ServerDashboard Server, REST APIRobot Web ServicesSOAP
Program.StartCGTP (Cgtp), CGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerDashboard Server, REST APIRobot Web ServicesSOAP
Program.PauseCGTP (Cgtp), CGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerDashboard Server, REST APIRobot Web ServicesSOAP
Program.ResumeCGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerDashboard Server, REST APIRobot Web ServicesSOAP
Program.StopCGTP (Cgtp), CGTP (CgtpKcl), TelnetNot availableDashboard Server, REST APIRobot Web ServicesSOAP
Program.ReadExecutionSNPX, CGTP (CgtpKcl), Telnet, FTPHigh Speed Ethernet Server, Ethernet ServerDashboard Server, REST APIRobot Web ServicesSOAP
Program.HoldCGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerNot availableNot availableNot available
Program.SetCycleModeNot availableHigh Speed Ethernet Server, Ethernet ServerNot availableRobot Web ServicesNot available
Program.SelectAtLineCGTP (Cgtp)High Speed Ethernet Server, Ethernet ServerNot availableRobot Web ServicesNot available
Program.StartAtLineCGTP (Cgtp)High Speed Ethernet Server, Ethernet ServerNot availableRobot Web ServicesNot available
Program.StopTaskCGTP (Cgtp), CGTP (CgtpKcl), TelnetNot availableNot availableNot availableSOAP
Program.Position.ReadFTP, CGTP (Cgtp)FTP, High Speed Ethernet ServerNot availableRobot Web ServicesNot available
Program.Position.WriteCGTP (Cgtp)Not availableNot availableRobot Web ServicesNot available
Program.Position.SetToCurrentCGTP (Cgtp)Not availableNot availableRobot Web ServicesNot available
Debug
Debug.AddBreakpointCGTP (CgtpKcl), TelnetNot availablePrimary Interface (Primary)Robot Web ServicesNot available
Debug.RemoveBreakpointCGTP (CgtpKcl), TelnetNot availablePrimary Interface (Primary)Not availableNot available
Debug.ReadBreakpointsCGTP (CgtpKcl), TelnetNot availableNot availableRobot Web ServicesNot available
Debug.SetStepModeCGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerPrimary Interface (Primary)Robot Web ServicesNot available
Debug.ContinueCGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerPrimary Interface (Primary)Robot Web ServicesNot available
Debug.SetTaskStepModeCGTP (CgtpKcl), TelnetNot availableNot availableNot availableNot available
Debug.ContinueTaskCGTP (CgtpKcl), TelnetNot availableNot availableNot availableNot available
Variables
Variable.ReadCGTP (Cgtp), SNPXHigh Speed Ethernet Server, Ethernet ServerDashboard Server, Primary Interface (Primary)Robot Web ServicesNot available
Variable.WriteIntegerCGTP (Cgtp), SNPXHigh Speed Ethernet Server, Ethernet ServerInterpreter Mode (manual)Robot Web ServicesNot available
Variable.WriteRealCGTP (Cgtp), SNPXHigh Speed Ethernet Server, Ethernet ServerInterpreter Mode (manual)Robot Web ServicesNot available
Variable.WriteStringCGTP (Cgtp), SNPXHigh Speed Ethernet Server, Ethernet ServerInterpreter Mode (manual)Robot Web ServicesNot available
Variable.WriteBooleanCGTP (Cgtp), SNPXHigh Speed Ethernet Server, Ethernet ServerInterpreter Mode (manual)Robot Web ServicesNot available
Variable.ReadPositionCGTP (Cgtp), SNPXNot availableNot availableRobot Web ServicesNot available
Variable.WritePositionCGTP (Cgtp), SNPXNot availableNot availableRobot Web ServicesNot available
Variable.ReadCommentCGTP (Cgtp), SNPXHigh Speed Ethernet ServerNot availableNot availableNot available
Variable.WriteCommentCGTP (Cgtp), SNPXHigh Speed Ethernet ServerNot availableNot availableNot available
Variable.ListCGTP (Cgtp)High Speed Ethernet ServerPrimary Interface (Primary)Robot Web ServicesNot available
Variable.ReadManyCGTP (Cgtp), SNPXHigh Speed Ethernet Server, Ethernet ServerNot availableNot availableNot available
Inputs and outputs
Io.ReadSNPX, CGTP (Cgtp)High Speed Ethernet Server, Ethernet ServerRTDE, Primary Interface (Primary)Robot Web ServicesSOAP
Io.WriteBooleanSNPX, CGTP (Cgtp), CGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerPrimary Interface (Script), Interpreter Mode (manual)Robot Web ServicesSOAP
Io.WriteNumberSNPX, CGTP (Cgtp), CGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerPrimary Interface (Script), Interpreter Mode (manual)Robot Web ServicesSOAP
Io.ReadCommentCGTP (Cgtp), SNPXHigh Speed Ethernet ServerNot availableNot availableNot available
Io.WriteCommentCGTP (Cgtp), SNPXHigh Speed Ethernet ServerNot availableNot availableNot available
Io.ListCGTP (Cgtp)High Speed Ethernet ServerNot availableRobot Web ServicesSOAP
Io.ReadManySNPX, CGTP (Cgtp)High Speed Ethernet Server, Ethernet ServerNot availableNot availableSOAP
Io.SimulateCGTP (Cgtp)Not availableNot availableNot availableNot available
Io.UnsimulateCGTP (Cgtp)Not availableNot availableNot availableNot available
Alarms
Alarm.ReadActiveSNPX, FTPHigh Speed Ethernet Server, Ethernet ServerPrimary Interface (Primary), Dashboard ServerRobot Web ServicesNot available
Alarm.ReadHistorySNPX, FTPNot availableNot availableRobot Web ServicesNot available
Alarm.ResetSNPX, CGTP (CgtpKcl), TelnetHigh Speed Ethernet Server, Ethernet ServerDashboard ServerNot availableNot available
Motion
Motion.ReadPoseSNPX, CGTP (Cgtp), RMI (manual), FTPHigh Speed Ethernet Server, Ethernet ServerRTDE, Primary Interface (Primary)Robot Web ServicesSOAP
Motion.ReadJointsSNPX, CGTP (Cgtp), RMI (manual), FTPNot availableRTDE, Primary Interface (Primary)Robot Web ServicesSOAP
Motion.ForwardKinematicsCGTP (Cgtp)Not availablePrimary Interface (Primary)Robot Web ServicesSOAP
Motion.InverseKinematicsCGTP (Cgtp)Not availablePrimary Interface (Primary)Robot Web ServicesSOAP
Motion.ReadUserFrameRMI (manual)Not availableNot availableNot availableNot available
Motion.ReadToolRMI (manual)Not availableNot availableNot availableNot available
Motion.MoveJointRMI (manual)Not availablePrimary Interface (Script), Interpreter Mode (manual)Robot Web ServicesSOAP
Motion.MoveJointToPoseRMI (manual)High Speed Ethernet Server, Ethernet ServerPrimary Interface (Script), Interpreter Mode (manual)Robot Web ServicesSOAP
Motion.MoveLinearRMI (manual)High Speed Ethernet Server, Ethernet ServerPrimary Interface (Script), Interpreter Mode (manual)Robot Web ServicesSOAP
Motion.MoveLinearToJointsRMI (manual)Not availablePrimary Interface (Script), Interpreter Mode (manual)Robot Web ServicesSOAP
Motion.StopMotionRMI (manual)High Speed Ethernet Server, Ethernet ServerPrimary Interface (Script), Dashboard ServerRobot Web ServicesSOAP
Motion.WaitForMotionEndRMI (manual)High Speed Ethernet Server, Ethernet ServerDashboard Server, Primary Interface (Primary)Robot Web ServicesNot available
Motion.ForwardKinematicsInFrameCGTP (Cgtp)Not availableNot availableNot availableNot available
Motion.ReadKinematicModelFTPHigh Speed Ethernet ServerNot availableNot availableNot available
Files
File.ListFTP, CGTP (Cgtp)FTP, High Speed Ethernet Server, HTTPSFTPRobot Web ServicesFiles
File.DownloadFTPFTP, High Speed Ethernet Server, HTTPSFTPRobot Web ServicesFiles
File.ReadBytesFTPFTP, High Speed Ethernet Server, HTTPSFTPRobot Web ServicesFiles
File.ReadTextFTP, CGTP (Cgtp)FTP, High Speed Ethernet Server, HTTPSFTPRobot Web ServicesFiles
File.UploadFTPFTP, High Speed Ethernet ServerSFTPRobot Web ServicesFiles
File.WriteBytesFTPFTP, High Speed Ethernet ServerSFTPRobot Web ServicesFiles
File.WriteTextFTPFTP, High Speed Ethernet ServerSFTPRobot Web ServicesFiles
File.DeleteFTPFTP, High Speed Ethernet ServerSFTPRobot Web ServicesFiles
File.ExistsFTPFTPSFTPRobot Web ServicesFiles
File.RenameFTPNot availableSFTPRobot Web ServicesFiles
File.CreateDirectoryFTPNot availableSFTPRobot Web ServicesFiles
File.DeleteDirectoryFTPNot availableSFTPRobot Web ServicesFiles
File.ReadBytesWithProgressFTPFTP, High Speed Ethernet Server, HTTPSFTPRobot Web ServicesFiles
File.WriteBytesWithProgressFTPFTP, High Speed Ethernet ServerSFTPRobot Web ServicesFiles
Pendant
Pendant.ShowMessageNot availableHigh Speed Ethernet Server, Ethernet ServerDashboard Server, REST APINot availableNot available

Prerequisites

  • The license of the brand of the controller, or the 30 day trial. See Licensing.
  • To read the routes: a connected RobotController. See Connect to your robot.
  • To change the routes: the connection parameters of the brand, before Connect.

Example

Read the route of each method

robot.Routing gives the result of the choice made at Connect. GetRoute returns the route of one method, or the reason why it is not available. GetReport returns the protocols and the route of every method as text, for a log or for the support.

RobotController robot = new RobotController();
robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));
// Route of one method: the protocol it uses, or why it is not available
RouteInfo route = robot.Routing.GetRoute("Program.Start");
Console.WriteLine(route.Available ? $"{route.Route} ({route.Protocol})" : route.Reason);
// Route of every method, as text
Console.WriteLine(robot.Routing.GetReport());
robot.Disconnect();
}
Click to see the full code

Read the result of each protocol

GetProtocols returns the result of each protocol of the brand at Connect: open, no answer, credentials refused, disabled, not needed.

RobotController robot = new RobotController();
robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));
// Result of the connection of each protocol of the brand
foreach (ProtocolInfo protocol in robot.Routing.GetProtocols())
Console.WriteLine($"{protocol.DisplayName}: {protocol.Status}");
robot.Disconnect();
}
Click to see the full code

Ask before a call

IsAvailable of each service returns false when the method has no route on the brand, or when no route of the method can be used on this connection. A user interface can hide the action.

RobotController robot = new RobotController();
robot.Connect(RobotConnectionParameters.Create("staubli", "192.168.0.254"));
// False when the brand has no route for the method, or no protocol of the route answered
if (robot.State.IsAvailable(StateFeature.Read))
{
Console.WriteLine(robot.State.Read().Mode);
}
try
{
robot.State.Read();
}
catch (FeatureNotSupportedException ex)
{
Console.WriteLine($"{ex.Feature} is not supported on {ex.BrandName}");
}
catch (RouteUnavailableException ex)
{
Console.WriteLine($"{ex.Feature}: {ex.Message}");
}
robot.Disconnect();
}
Click to see the full code

Nothing to install

On the PC, there is no software of the robot maker to install: no driver, no USB key. The library is one managed DLL, or one Python package.

On the controller, the library uses the interfaces that the controller already has. For most methods, there is no program to load on the controller. There are two exceptions:

  • ABB: the moves need one RAPID module, UnderAutomationMotion.mod, loaded once in the motion task of the robot. Without it, the route of the moves is still chosen and IsAvailable returns true, but a move throws RouteUnavailableException at the call.
  • Universal Robots: the variable writes need the interpreter program running on the robot (Interpreter Mode).

Nothing to install does not mean nothing to set. A protocol can need an option of the controller, a function enabled in its network settings, a user and a password, or a mode. For example on Fanuc, SNPX needs the option R553 HMI Device, and RMI needs the option R912. The route explorer below and the page Which protocol for which task give what each route needs.

Reference

In Python, the names are in snake_case: robot.routing.get_route(...), get_routes(), get_protocols(), get_report(). The properties of the results are in snake_case too: route.available, route.reason.

Methods of ControllerRouting

robot.Routing is a ControllerRouting. It reads the routes chosen at Connect. To change them, use the routing settings of the connection parameters.

MethodWhat it doesParametersResult
GetRouteReturns the route of one method.string feature: path of the method, for example "Program.Start"RouteInfo
GetRoutesReturns the route of every method, also the methods that are not available.NoneRouteInfo[]
GetProtocolsReturns the result of each protocol of the brand, in the order of the brand. Empty when not connected.NoneProtocolInfo[]
GetReportReturns the protocols and the route of every method as readable text, for logs and support.Nonestring

GetRoute throws ArgumentException when the path is not a method of the common API.

RouteInfo

PropertyTypeContent
FeaturestringPath of the method, for example "Program.Start".
RoutestringName of the route used by the method. Empty when the method is not available.
ProtocolstringName of the protocol of the route. Empty when the method is not available.
AvailableboolTrue when the method can be called.
ReasonstringWhy this route was chosen, for example a setting of the method or the default order of the brand, or why the method is not available. The text is for display and logs: it can change in a later version, do not compare it in code.
IsWriteboolTrue when the method changes the controller or moves the robot. False when it only reads.

ProtocolInfo and its ProtocolStatus values are described on the page Errors.

What to read next

  • Routing settings: prefer, set or forbid a route, and enable a manual route.
  • Which protocol for which task: the routes of each brand and of each method.
  • Errors: the exceptions of a method without a usable route.
  • The pages of the services: Info, State, Program, Debug, Variable, Io, Alarm, Motion, File, Pendant.