UnderAutomation
¿Una pregunta?

[email protected]

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

Info: controller identity and motion groups

Read the model, serial number, software version and motion groups of a Fanuc, Yaskawa, Universal Robots, ABB or Stäubli controller with robot.Info. Brand support table, C# and Python examples.

  • Prerequisites
  • Brand support
  • Example
  • Read the identity of the controller
  • Read the motion groups
  • Reference
  • Methods of IInfoService
  • RobotControllerInfo
  • MotionGroupInfo
  • Errors
  • What to read next

robot.Info reads the identity of a robot controller: brand, model, serial number, software version and motion groups. The result types are the same for Fanuc, Yaskawa, Universal Robots, ABB and Stäubli controllers.

Prerequisites

  • A connected RobotController. See Connect to your robot.
  • The license of the brand of the controller, or the 30 day trial. See Licensing.
  • Nothing else: the two methods only read, they never change the controller.

Brand support

Each cell gives the protocol that the method uses on this brand, in the default order. The page Routing explains how the library chooses it. The table is generated from the route data of the library. (manual) marks a route that you enable yourself. "n of m" is the number of methods of the service that have a route on this brand.

Information
MethodFanucYaskawaUniversal RobotsABBStäubli
Info.ReadCGTP (Cgtp), FTPHigh Speed Ethernet ServerDashboard ServerRobot Web ServicesSOAP
Info.ReadGroupsCGTP (Cgtp), FTPHigh Speed Ethernet ServerDashboard ServerRobot Web ServicesSOAP
Info2 of 22 of 22 of 22 of 22 of 2

Before you call a method, robot.Info.IsAvailable(InfoFeature.Read) tells you if the connected controller supports it.

Example

Read the identity of the controller

Read returns a RobotControllerInfo. A text that the controller does not give is empty, never null.

RobotController robot = new RobotController();
robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));
RobotControllerInfo info = robot.Info.Read();
Console.WriteLine($"{info.BrandName} {info.Model}, serial {info.SerialNumber}, software {info.SoftwareVersion}");
robot.Disconnect();
}
Click to see the full code

Read the motion groups

A motion group is an arm, a set of external axes or a positioner, moved as one unit. ReadGroups returns one MotionGroupInfo per group. The number of a group, from 1, is the number that the motion methods take.

RobotController robot = new RobotController();
robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));
foreach (MotionGroupInfo group in robot.Info.ReadGroups())
Console.WriteLine($"Group {group.Number}: {group.Kind}, {group.AxisCount} axes ({string.Join(", ", group.AxisNames)})");
robot.Disconnect();
}
Click to see the full code

Reference

In Python, the names are in snake_case: robot.info.read(), robot.info.read_groups(), robot.info.is_available(...). The enum members keep their names.

Methods of IInfoService

Interface
IInfoService
C#Python

Info service of a robot controller: identity of the controller and its motion groups. The library implements this interface. A minor version of the library can add members to it: a class of the application that implements it, for example a test double, then needs the new methods. Errors of the methods other than IsAvailable: FeatureNotSupportedException when the brand has no route for the method, RouteUnavailableException when the method has routes but none of them can be used, ControllerRefusedException when the controller received the command and refused it, RobotControllerException when the route failed (the inner exception is the exception of the brand SDK), and ArgumentException or a derived exception for an invalid argument. IsAvailable only throws ArgumentOutOfRangeException, for a value that is not in the enum. Results: a text and an array are empty when there is no value, never null. The only null values are the Native properties when there is no object of the brand SDK, and Position when the variable is not a position.

MemberTypeDescription
IsAvailable(InfoFeature)
Method
bool
Returns true when the method can be called on the connected controller. The answer depends on the brand, on the routing settings and on the protocols that answered at the connection, not on the state of the controller.
  • feature : Method of the service
Read()
Method
RobotControllerInfo
Reads the identity of the controller: model, serial number, software version
ReadGroups()
Method
MotionGroupInfo[]
Reads the motion groups of the controller

RobotControllerInfo

Class
RobotControllerInfo
C#Python

Identity of a robot controller: brand, model, serial number, software version and motion groups. The library creates a new object at each call and does not read it back. The setters are public so that tests and serializers can build the object.

MemberTypeDescription
RobotControllerInfo()
Constructor
Creates an identity with the default value of each property
BrandName
Property
string
Name of the brand of the controller
Groups
Property
MotionGroupInfo[]
Motion groups of the controller, when the controller gives them with its identity. Empty otherwise: the info service of the robot reads them on demand.
Model
Property
string
Model of the controller or of the robot, as given by the controller. Empty when the controller does not give it.
Native
Property
object
Object of the brand SDK this information comes from. Null when there is none.
SerialNumber
Property
string
Serial number, as given by the controller. Empty when the controller does not give it.
SoftwareVersion
Property
string
Version of the software of the controller. Empty when the controller does not give it.
ToString()
Method
string

MotionGroupInfo

Class
MotionGroupInfo
C#Python

Motion group of a controller: a robot arm, external axes or a positioner, moved as one unit. The library creates a new object at each call and does not read it back. The setters are public so that tests and serializers can build the object.

MemberTypeDescription
MotionGroupInfo()
Constructor
Creates a group whose split between robot axes and extended axes is unknown (-1)
AxisCount
Property
int
Number of axes of the group
AxisNames
Property
string[]
Name of each axis. Empty when the controller does not give them.
AxisUnits
Property
AxisUnit[]
Unit of each axis. Empty when the controller does not give them.
ExtendedAxisCount
Property
int
Number of extended axes in the group, for example a track moved with the arm. 0 when the group has none, -1 (default) when the controller does not give it.
Kind
Property
MotionGroupKind
Kind of the group
Name
Property
string
Name of the group, as given by the controller. Empty when the controller does not give it.
Native
Property
object
Object of the brand SDK this information comes from. Null when there is none.
Number
Property
int
Number of the group, from 1
RobotAxisCount
Property
int
Number of axes of the robot arm in the group, without the extended axes. -1 (default) when the controller does not give it.
ToString()
Method
string
Enum
MotionGroupKind
C#Python

Kind of a motion group

NameValueDescription
Arm
1
Robot arm
ExternalAxes
2
External axes, for example a track
Positioner
3
Positioner that holds the part
Unknown
0
The controller does not give the kind
Enum
AxisUnit
C#Python

Unit of an axis

NameValueDescription
Degrees
1
Rotary axis, values in degrees
Millimeters
2
Linear axis, values in mm
Unknown
0
The controller does not give the unit

Errors

The page Errors explains each exception and how to avoid it.

  • FeatureNotSupportedException: the brand has no route for the method.
  • RouteUnavailableException: the method has routes, but none of them can be used, for example because the protocol did not answer at the connection.
  • RobotControllerException: the route failed. Its inner exception is the exception of the brand SDK.

IsAvailable only throws ArgumentOutOfRangeException, for a value that is not in the enum.

What to read next

  • State: read the operating mode and switch the servo power.
  • Routing: see which protocol answers each method.
  • Common API: the types shared by every brand.