UnderAutomation
Any question?

[email protected]

Contact us
UnderAutomation
⌘Q

Primary Interface : Data streaming

Receive robot state data at 10Hz via the Primary Interfaces

Data described below are sent by the robot controller at 10Hz by the TCP/IP Primary (and Secondary) Interface protocol.

For more information about Primry Interface, see : https://www.universal-robots.com/articles/ur/interface-communication/remote-control-via-tcpip/

Enable Primary Interface

When creating the ConnectParameters object or when the Connect() method is called by passing the IP address of the robot, the Primary Interface protocol is enabled by default.

You can however connect by specifying a ConnectParameters object. You can then choose the port to connect to.

using UnderAutomation.UniversalRobots;
using UnderAutomation.UniversalRobots.PrimaryInterface;
class PrimaryInterface
{
static void Main(string[] args)
{
var robot = new UR();
var param = new ConnectParameters("192.168.0.1");
param.PrimaryInterface.Enable = true; // enable Primary Interface
// param.PrimaryInterface.Enable = false; // Connect to the robot without Primary Interface
param.PrimaryInterface.Port = Interfaces.PrimaryInterface;
// Connect to the robot with custom parameters
robot.Connect(param);
// you can also connect directly without ConnectParameters
// Primary Interface and Dashboard are enabled by default
// robot.Connect("192.168.0.56");
//...
// Access all your data
var value = robot.PrimaryInterface.JointData.Base.ActualSpeed;
//...
// Disconnect only Primary Interface communication
robot.PrimaryInterface.Disconnect();
// Disconnect every interfaces (Primary Interface, Dashboard, RTDE, ...)
robot.Disconnect();
}
}

You can also instantiate a PrimaryInterface client directly without using the UR object.

using UnderAutomation.UniversalRobots.PrimaryInterface;
class PrimaryInterfaceDirect
{
static void Main(string[] args)
{
// Create a Prinmary Interface Client alone, outside any UR instance
var client = new PrimaryInterfaceClient();
// Open TCP connection to the robot
client.Connect("192.168.0.1", Interfaces.PrimaryInterface);
//...
// Access all your data
var value = client.JointData.Base.ActualSpeed;
//...
// Close connection to the robot
client.Disconnect();
}
}

In the robot, the Primary Client Interface must be enabled in the Polyscope settings for security reasons, see : this page

Get data

Once communication is established with the robot, you will receive data at 10Hz. You can either handle an event that is raised when data is received. But you can also access the last packet received through a property.

using UnderAutomation.UniversalRobots;
using UnderAutomation.UniversalRobots.PrimaryInterface;
class PrimaryInterfaceData
{
static void Main(string[] args)
{
var robot = new UR();
robot.Connect("192.168.0.1");
// Access last received data with properties
JointDataPackageEventArgs lastJointDataReceived = robot.PrimaryInterface.JointData;
KinematicsInfoPackageEventArgs lastKinematicsInfo = robot.PrimaryInterface.KinematicsInfo;
// Or you can subscribe to an event to be notified as soon as the data arrives
robot.PrimaryInterface.JointDataReceived += PrimaryInterface_JointDataReceived;
}
private static void PrimaryInterface_JointDataReceived(object sender, JointDataPackageEventArgs e)
{
// e contains my new data !!
}
}

Get connection status

The Connected property indicates whether the interface is connected. If the interface disconnects (e.g. the robot is stopped or the network cable is disconnected), this property is set to false without raising a fault.

There is no automatic reconnection mechanism. You will have to call the Connect() function again.

However, if an error occurs inside the library, the InternalErrorOccured event is raised.

using UnderAutomation.UniversalRobots;
using UnderAutomation.UniversalRobots.Common;
class PrimaryInterfaceStatus
{
static void Main(string[] args)
{
var robot = new UR();
robot.Connect("192.168.0.1");
// ...
// Check if Primary Interface client is still connected
bool isConnected = robot.PrimaryInterface.Connected;
// Handle the event that indicates an internal error
robot.InternalErrorOccured += Robot_InternalErrorOccured;
}
private static void Robot_InternalErrorOccured(object sender, InternalErrorEventArgs e)
{
// Get information about an internal error
Exception exception = e.Exception;
string message = e.Message;
StatusCode status = e.Status;
}
}

Try it with the Windows example

Robot mode

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
RobotModeDataPackageEventArgs _value = ur.PrimaryInterface.RobotModeData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.RobotModeDataReceived += Ur_RobotModeDataReceived;
}
private void Ur_RobotModeDataReceived(object sender, RobotModeDataPackageEventArgs e) {
// e contains the incoming package
}
Class
RobotModeDataPackageEventArgsinherits PackageEventArgs
C#Python

Information about current robot mode

MemberTypeDescription
RobotModeDataPackageEventArgs()
Constructor
ControlMode
Property
ControlModes
Current robot control mode
EmergencyStopped
Property
bool
The button Emergency Stop is pressed
PhysicalRobotConnected
Property
bool
Robot is connected to its controller
ProgramPaused
Property
bool
The running program is paused
ProgramRunning
Property
bool
A program is running
ProtectiveStopped
Property
bool
A stop occured due to a fault detection
RealRobotEnabled
Property
bool
Real robot mode active. False if robot is in simulation
RobotMode
Property
RobotModes
Current robot running mode
RobotPowerOn
Property
bool
Robot is powered on and boot is completed. If false, you need to press "ON" button to power it on
SpeedScaling
Property
double
Speed scaling
TargetSpeedFraction
Property
double
Overriden speed ratio between 0 (0%) and 1 (100%)
TargetSpeedFractionLimit
Property
double
Maximum target speed fraction
Timestamp
Property
TimeSpan
Timespan since the robot controller has started
Enum
ControlModes
C#Python

Robot control modes

NameValueDescription
Force
2
Robot is force controlled. (For example : URScript force_mode() function is called)
Position
0
Robot is position controlled
Teach
1
The robot is hand guided by pushing teached button
Torque
3
Robot is torque controlled
Enum
RobotModes
C#Python

Robot running modes

NameValueDescription
BackDrive
6
The robot is hand guided by pushing teached button
Booting
2
The robot controller is booting
ConfirmSafety
1
Robot has stopped due to a Safety Stop
Disconnected
0
Robot is not connected to its controller
Idle
5
Power is on but breaks are not released
Other
-1
Robot is in an obsolete CB2 mode
PowerOff
3
The robot is powered off
PowerOn
4
The robot is powered on
Running
7
Robot is in normal mode
UpdatingFirmware
8
Firmware is upgrading

Joint data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
JointDataPackageEventArgs _value = ur.PrimaryInterface.JointData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.JointDataReceived += Ur_JointDataReceived;
}
private void Ur_JointDataReceived(object sender, JointDataPackageEventArgs e) {
// e contains the incoming package
}
Class
JointDataPackageEventArgsinherits PackageEventArgs
C#Python

Status of each joints

MemberTypeDescription
JointDataPackageEventArgs()
Constructor
Base
Property
JointData
Base joint data
Elbow
Property
JointData
Elbow joint data
Shoulder
Property
JointData
Shoulder joint data
Wrist1
Property
JointData
Wrist1 joint data
Wrist2
Property
JointData
Wrist2 joint data
Wrist3
Property
JointData
Wrist3 (Tool) joint data

Class
JointData
C#Python

Joint data

MemberTypeDescription
JointData()
Constructor
ActualSpeed
Property
double
Joint rotation speed in rad/s
Current
Property
float
Motor current in Amps
JointMode
Property
JointModes
Joint mode
Position
Property
double
Angular joint position in radian
TargetPosition
Property
double
Angular target position in radian
Temperature
Property
float
Joint temperature in °C
Voltage
Property
float
Motor votage in Volts
Enum
JointModes
C#Python

Joint modes

NameValueDescription
Backdrive
238
Booting
247
Bootloder
249
Calibration
250
Fault
252
Idle
255
MotorInitialisation
246
NotResponding
245
PartDCalibration
237
PartDCalibrationError
248
PowerOff
239
Running
253
ShuttingDown
236

Tool data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
ToolDataPackageEventArgs _value = ur.PrimaryInterface.ToolData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.ToolDataReceived += Ur_ToolDataReceived;
}
private void Ur_ToolDataReceived(object sender, ToolDataPackageEventArgs e) {
// e contains the incoming package
}
Class
ToolDataPackageEventArgsinherits PackageEventArgs
C#Python

Tool data

MemberTypeDescription
ToolDataPackageEventArgs()
Constructor
AnalogInput2
Property
double
Value of Analog input 2 (analog_in[2])
AnalogInput3
Property
double
Value of Analog input 3 (analog_in[3])
AnalogInputRange2
Property
AnalogRanges
Unit of analog input 2 (analog_in[2])
AnalogInputRange3
Property
AnalogRanges
Unit of analog input 3 (analog_in[3])
ToolCurrent
Property
float
Tool current in Amps
ToolMode
Property
ToolModes
Tool mode
ToolOutputVoltage
Property
sbyte
Tool output voltage
ToolTemperature
Property
float
Tool Temperature in °C
ToolVoltage48V
Property
float
Actual robot voltage power supply
Enum
AnalogRanges
C#Python

Analog units of analog inputs and outputs

NameValueDescription
Current
0
The analog value is in Amps (A)
Voltage
1
The analog value is in Volts (V)
Enum
ToolModes
C#Python

Tool modes

NameValueDescription
Bootloader
249
Bootloader
Idle
255
Idle
Running
253
Running

Masterboard data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
MasterboardDataPackageEventArgs _value = ur.PrimaryInterface.MasterboardData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.MasterboardDataReceived += Ur_MasterboardDataReceived;
}
private void Ur_MasterboardDataReceived(object sender, MasterboardDataPackageEventArgs e) {
// e contains the incoming package
}
Class
MasterboardDataPackageEventArgsinherits PackageEventArgs
C#Python

Masterboard data

MemberTypeDescription
MasterboardDataPackageEventArgs()
Constructor
AnalogInput0
Property
double
Value of analog input 0 (analog_in[0])
AnalogInput1
Property
double
Value of analog input 1 (analog_in[1])
AnalogInputRange0
Property
AnalogRanges
Unit of analog input 0 (analog_in[0])
AnalogInputRange1
Property
AnalogRanges
Unit of analog input 1 (analog_in[1])
AnalogOutput0
Property
double
Value of analog output 0 (analog_out[0])
AnalogOutput1
Property
double
Value of analog output 1 (analog_out[1])
AnalogOutputDomain0
Property
AnalogRanges
Unit of analog output 0 (analog_out[0])
AnalogOutputDomain1
Property
AnalogRanges
Unit of analog output 1 (analog_out[1)
DigitalInputs
Property
MasterboardDigitalIO
Register where each bit is a digital input value
DigitalOutputs
Property
MasterboardDigitalIO
Register where each bit is a digital output value
Euromap67Installed
Property
sbyte
The robot is interfaced to injection molding machines Euromap 67
EuromapCurrent
Property
float
Euromap current
EuromapInputBits
Property
int
Register where each bit is a digital Euromap input
EuromapOutputBits
Property
int
Register where each bit is a digital Euromap output
EuromapVoltage
Property
float
Euromap votage
InReducedMode
Property
byte
Robot is in reduced speed mode
MasterIOCurrent
Property
float
Current of all digital and analog inputs and outputs
MasterboardTemperature
Property
float
Temperature of masterboard in °C
OperationalModeSelectorInput
Property
byte
Position of operational mode selector input switch
RobotCurrent
Property
float
Robot current consumption in Amps
RobotVoltage48V
Property
float
Voltage of internal 48V power supply
Safetymode
Property
SafetyStatus
Masterboard safety mode
ThreePositionEnablingDeviceInput
Property
byte
Position of the 3-position enabling device
Enum
AnalogRanges
C#Python

Analog units of analog inputs and outputs

NameValueDescription
Current
0
The analog value is in Amps (A)
Voltage
1
The analog value is in Volts (V)
Class
MasterboardDigitalIO
C#Python
MemberTypeDescription
BitArray
Property
read only
BitArray
Register value seen as a bool array
Configurable0
Property
read only
bool
Configurable1
Property
read only
bool
Configurable2
Property
read only
bool
Configurable3
Property
read only
bool
Configurable4
Property
read only
bool
Configurable5
Property
read only
bool
Configurable6
Property
read only
bool
Configurable7
Property
read only
bool
Digital0
Property
read only
bool
Digital1
Property
read only
bool
Digital2
Property
read only
bool
Digital3
Property
read only
bool
Digital4
Property
read only
bool
Digital5
Property
read only
bool
Digital6
Property
read only
bool
Digital7
Property
read only
bool
ToolDigital0
Property
read only
bool
ToolDigital1
Property
read only
bool
Value
Property
read only
int
Register value
Enum
SafetyStatus
C#Python

Safety modes

NameValueDescription
AutomaticModeSafeguardStop
10
Fault
9
Safety is in fault mode
Normal
1
Safety is in normal operating conditions
ProtectiveStop
3
Protective safeguard Stop. This safety function is triggeredby an external protective device using safety inputs which will trigger a Cat 2 stop3per IEC 60204-1.
Recovery
4
When a safety limit is violated, the safety system must be restarted.
Reduced
2
Speed is reduced
RobotEmergencyStop
7
(EA + EB + SBUS->Screen) Physical e-stop interface input activated
SafeguardStop
5
(SI0 + SI1 + SBUS) Physical s-stop interface input
SystemEmergencyStop
6
(EA + EB + SBUS->Euromap67) Physical e-stop interface input activated
SystemThreePositionEnablingStop
11
Violation
8
Safety is in violation mode (for example, violation of the allowed delay between redundant signals)

Cartesian information

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
CartesianInfoPackageEventArgs _value = ur.PrimaryInterface.CartesianInfo;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.CartesianInfoReceived += Ur_CartesianInfoReceived;
}
private void Ur_CartesianInfoReceived(object sender, CartesianInfoPackageEventArgs e) {
// e contains the incoming package
}
Class
CartesianInfoPackageEventArgsinherits PackageEventArgs
C#Python

Contains current cartesian position of the robot, including its TCP offset

MemberTypeDescription
CartesianInfoPackageEventArgs()
Constructor
Rx
Property
double
RX axis coordinate in rad of the TCP in the current frame
Ry
Property
double
RY axis coordinate in rad of the TCP in the current frame
Rz
Property
double
RZ axis coordinate in rad of the TCP in the current frame
TCPOffsetRX
Property
double
RX position of the TCP in the flange frame in rad
TCPOffsetRY
Property
double
RY position of the TCP in the flange frame in rad
TCPOffsetRZ
Property
double
RZ position of the TCP in the flange frame in rad
TCPOffsetX
Property
double
X position of the TCP in the flange frame in meter
TCPOffsetY
Property
double
Y position of the TCP in the flange frame in meter
TCPOffsetZ
Property
double
Z position of the TCP in the flange frame in meter
X
Property
double
X axis coordinate in meter of the TCP in the current frame
Y
Property
double
Y axis coordinate in meter of the TCP in the current frame
Z
Property
double
Z axis coordinate in meter of the TCP in the current frame
AsPose()
Method
Pose
Returns the current cartesian position as a Pose object
AsTCPOffsetPose()
Method
Pose
Returns the TCP offset as a Pose object

Kinematics information

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
KinematicsInfoPackageEventArgs _value = ur.PrimaryInterface.KinematicsInfo;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.KinematicsInfoReceived += Ur_KinematicsInfoReceived;
}
private void Ur_KinematicsInfoReceived(object sender, KinematicsInfoPackageEventArgs e) {
// e contains the incoming package
}
Class
KinematicsInfoPackageEventArgsinherits PackageEventArgs
C#Python

Kinematics info

MemberTypeDescription
KinematicsInfoPackageEventArgs()
Constructor
A2
Property
read only
double
DH parameter a2 (Shoulder.DHa)
A3
Property
read only
double
DH parameter a3 (Elbow.DHa)
Base
Property
JointKinematicsInfo
Base kinematics info
CalibrationStatus
Property
int
Calibration status (0 : OK)
D1
Property
read only
double
DH parameter d1 (Base.DHd)
D4
Property
read only
double
DH parameter d4 (Wrist1.DHd)
D5
Property
read only
double
DH parameter d5 (Wrist2.DHd)
D6
Property
read only
double
DH parameter d6 (Wrist3.DHd)
Elbow
Property
JointKinematicsInfo
Elbow kinematics info
Shoulder
Property
JointKinematicsInfo
Shoulder kinematics info
Wrist1
Property
JointKinematicsInfo
Wrist1 kinematics info
Wrist2
Property
JointKinematicsInfo
Wrist2 kinematics info
Wrist3
Property
JointKinematicsInfo
Wrist3 (Tool) kinematics info

Class
JointKinematicsInfo
C#Python

Joint kinematics info, Denavit–Hartenberg (DH) parameters

MemberTypeDescription
JointKinematicsInfo()
Constructor
Checksum
Property
int
Joint checksum
DHa
Property
double
DH convention a parameter
DHd
Property
double
DH convention d parameter
DHtheta
Property
double
DH convention theta parameter
Dhalpha
Property
double
DH convention alpha parameter

For more information about DH (Denavit-Hartenberg) parameters, please refer the following links :

  • https://www.youtube.com/watch?v=rA9tm0gTln8
  • https://en.wikipedia.org/wiki/Denavit..

Configuration data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
ConfigurationDataPackageEventArgs _value = ur.PrimaryInterface.ConfigurationData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.ConfigurationDataReceived += Ur_ConfigurationDataReceived;
}
private void Ur_ConfigurationDataReceived(object sender, ConfigurationDataPackageEventArgs e) {
// e contains the incoming package
}
Class
ConfigurationDataPackageEventArgsinherits PackageEventArgs
C#Python

Joint configuration

MemberTypeDescription
ConfigurationDataPackageEventArgs()
Constructor
A2
Property
read only
double
DH parameter a2 (Shoulder.DHa)
A3
Property
read only
double
DH parameter a3 (Elbow.DHa)
AJointDefault
Property
double
Default joint acceleration speed in rad/s²
AToolDefault
Property
double
Default TCP acceleration speed in m/s²
Base
Property
JointConfiguration
Base joint configuration
ControllerBoxType
Property
ControllerBoxTypes
Controller box type
D1
Property
read only
double
DH parameter d1 (Base.DHd)
D4
Property
read only
double
DH parameter d4 (Wrist1.DHd)
D5
Property
read only
double
DH parameter d5 (Wrist2.DHd)
D6
Property
read only
double
DH parameter d6 (Wrist3.DHd)
Elbow
Property
JointConfiguration
Elbow joint configuration
EqRadius
Property
double
Equipment radius in meter
MasterboardVersion
Property
int
Masterboard version
RobotSubType
Property
RobotSubTypes
Robot serie
RobotType
Property
RobotModels
Model of the robot (UR3, UR5, UR10, UR16)
Shoulder
Property
JointConfiguration
Shoulder joint configuration
VJointDefault
Property
double
Default joint angular speed in rad/s
VToolDefault
Property
double
Default TCP speed speed in m/s
Wrist1
Property
JointConfiguration
Wrist1 joint configuration
Wrist2
Property
JointConfiguration
Wrist2 joint configuration
Wrist3
Property
JointConfiguration
Wrist3 (Tool) joint configuration
Enum
ControllerBoxTypes
C#Python

Controller box types

NameValueDescription
UR10
5
UR10 controller box
UR16
16
UR16 controller box
UR20
10
UR20 controller box
UR3
6
UR3 controller box
UR30
11
UR30 controller box
UR5
4
UR5 controller box
Class
JointConfiguration
C#Python

Joint configuration

MemberTypeDescription
JointConfiguration()
Constructor
DHa
Property
double
a parameter of Denavit–Hartenberg (DH) convention
DHalpha
Property
double
Alpha parameter of Denavit–Hartenberg (DH) convention
DHd
Property
double
d parameter of Denavit–Hartenberg (DH) convention
DHtheta
Property
double
Theta parameter of Denavit–Hartenberg (DH) convention
JointMaxAcceleration
Property
double
Maximum rotation speed in rad/s²
JointMaxLimit
Property
double
Maximum angular position in rad
JointMaxSpeed
Property
double
Maximum rotation speed in rad/s
JointMinLimit
Property
double
Minimum angular position in rad
Enum
RobotSubTypes
C#Python

Robot sub type (e-Serie or CB-Serie)

NameValueDescription
CB2Serie
1
CB2-series (Firmware 1.x)
CB3Serie
2
CB3-series (Firmware 3.x)
ESerie
3
e-series (Firmware 5.x)
Enum
RobotModels
C#Python

Model of a UR robot

NameValueDescription
UR10
2
UR16
4
UR20
7
UR3
3
UR30
8
UR5
1

Force mode data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
ForceModeDataPackageEventArgs _value = ur.PrimaryInterface.ForceModeData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.ForceModeDataReceived += Ur_ForceModeDataReceived;
}
private void Ur_ForceModeDataReceived(object sender, ForceModeDataPackageEventArgs e) {
// e contains the incoming package
}
Class
ForceModeDataPackageEventArgsinherits PackageEventArgs
C#Python

Force mode data

MemberTypeDescription
ForceModeDataPackageEventArgs()
Constructor
RobotDexterity
Property
double
Dexterity of the robot
Rx
Property
double
Rx torque in tool frame in Nm
Ry
Property
double
Ry torque in tool frame in Nm
Rz
Property
double
Rz torque in tool frame in Nm
X
Property
double
X force in tool frame in N
Y
Property
double
Y force in tool frame in N
Z
Property
double
Z force in tool frame in N

Additional information

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
AdditionalInfoPackageEventArgs _value = ur.PrimaryInterface.AdditionalInfo;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.AdditionalInfoReceived += Ur_AdditionalInfoReceived;
}
private void Ur_AdditionalInfoReceived(object sender, AdditionalInfoPackageEventArgs e) {
// e contains the incoming package
}
Class
AdditionalInfoPackageEventArgsinherits PackageEventArgs
C#Python

Additional information

MemberTypeDescription
AdditionalInfoPackageEventArgs()
Constructor
FreedriveButtonEnabled
Property
bool
The free drive button is enabled
FreedriveButtonPressed
Property
bool
The free drive button is pressed
IOEnabledFreedrive
Property
bool
Free drive is enable via IO

Calibration data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
CalibrationDataPackageEventArgs _value = ur.PrimaryInterface.CalibrationData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.CalibrationDataReceived += Ur_CalibrationDataReceived;
}
private void Ur_CalibrationDataReceived(object sender, CalibrationDataPackageEventArgs e) {
// e contains the incoming package
}
Class
CalibrationDataPackageEventArgsinherits PackageEventArgs
C#Python

Calibration data

MemberTypeDescription
CalibrationDataPackageEventArgs()
Constructor
Frx
Property
double
Frx calibration data
Fry
Property
double
Fry calibration data
Frz
Property
double
Frz calibration data
Fx
Property
double
Fx calibration data
Fy
Property
double
Fy calibration data
Fz
Property
double
Fz calibration data

Safety data

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
SafetyDataPackageEventArgs _value = ur.PrimaryInterface.SafetyData;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.SafetyDataReceived += Ur_SafetyDataReceived;
}
private void Ur_SafetyDataReceived(object sender, SafetyDataPackageEventArgs e) {
// e contains the incoming package
}
Class
SafetyDataPackageEventArgsinherits PackageEventArgs
C#Python

Safety internal data

MemberTypeDescription
SafetyDataPackageEventArgs()
Constructor
Data
Property
byte[]
Irrelevent (Internal use only)

Tool communication information

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
ToolCommunicationInfoPackageEventArgs _value = ur.PrimaryInterface.ToolCommunicationInfo;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.ToolCommunicationInfoReceived += Ur_ToolCommunicationInfoReceived;
}
private void Ur_ToolCommunicationInfoReceived(object sender, ToolCommunicationInfoPackageEventArgs e) {
// e contains the incoming package
}
Class
ToolCommunicationInfoPackageEventArgsinherits PackageEventArgs
C#Python

Tool communication info

MemberTypeDescription
ToolCommunicationInfoPackageEventArgs()
Constructor
BaudRate
Property
int
Baude rate
Parity
Property
int
Parity
RxIdleChars
Property
float
RX Idle Chars
StopBits
Property
int
Stop bits
ToolCommunicationIsEnabled
Property
bool
Is the tool communication interface enabled
TxIdleChars
Property
float
TX Idle Chars

Tool mode

C#
private UR ur;
private void Start() {
ur = new UR(); // Create a new UR instance
ur.Connect("192.168.0.1"); // Connect to the robot
// ...
// Direct access to last received package
ToolModeInfoPackageEventArgs _value = ur.PrimaryInterface.ToolModeInfo;
// Attach a delegate to the event triggered when new package comes
ur.PrimaryInterface.ToolModeInfoReceived += Ur_ToolModeInfoReceived;
}
private void Ur_ToolModeInfoReceived(object sender, ToolModeInfoPackageEventArgs e) {
// e contains the incoming package
}
Class
ToolModeInfoPackageEventArgsinherits PackageEventArgs
C#Python

Tool mode info

MemberTypeDescription
ToolModeInfoPackageEventArgs()
Constructor
DigitalOutputMode0
Property
DigitalOutputConfigurations
Digital output 0 configuration
DigitalOutputMode1
Property
DigitalOutputConfigurations
Digital output 1 configuration
OutputMode
Property
OutputModes
Digital output mode
Enum
DigitalOutputConfigurations
C#Python

Digital output configuration (NPN, PNP, Push/Pull)

NameValueDescription
PushPull
3
Push / Pull
SinkingNPN
1
Sinking (NOPN)
SourcingPNP
2
Sourcing (PNP)
Enum
OutputModes
C#Python

Digital output modes

NameValueDescription
DualPinPower
1
Dual Pin Power
StandardOutput
0
Standard output

Easily integrate Universal Robots, Fanuc, Yaskawa, ABB or Staubli robots into your .NET, Python, LabVIEW or Matlab applications

UnderAutomation
Contact usLegal

© All rights reserved.