Primary/Secondary Client Interface
Primary/Secondary Client Interface
The information contained herein is the property of Universal Robots A/S and shall not be
reproduced in whole or in part without prior written approval of Universal Robots A/S. The
information herein is subject to change without notice and should not be construed as a
commitment by Universal Robots A/S. This document is periodically reviewed and revised.
Universal Robots A/S assumes no responsibility for any errors or omissions in this document.
Copyright © 2009–2021 by Universal Robots A/S.
The Universal Robots logo is a registered trademark of Universal Robots A/S.
Contents
1. Introduction 1
2. Robot Software 5.9 2
2.1. Messages sent to primary and secondary clients 2
2.1.1. Robot State Message 2
2.1.2. Robot mode data (Sub Package of Robot State Message) 2
2.1.3. Joint data (Sub Package of Robot State Message) 3
2.1.4. Tool data (Sub Package of Robot State Message) 3
2.1.5. Masterboard data (Sub Package of Robot State Message) 4
2.1.6. Cartesian info (Sub Package of Robot State Message) 5
2.1.7. Kinematics info (Sub Package of Robot State Message) 5
4. Control Modes 26
5. Robot Modes 27
6. Joint Modes 28
7. Tool Modes 29
8. Message Sources 30
9. Safety Mode Types 32
10. Safety Status Types 33
11. Report Levels 34
12. Requested Types 35
13. Value Types 36
1. Introduction
The Primary Client Interface (10 Hz)
uint64_t timestamp
bool isRealRobotConnected
bool isRealRobotEnabled
bool isRobotPowerOn
bool isEmergencyStopped
bool isProtectiveStopped
bool isProgramRunning
bool isProgramPaused
unsigned char robotMode Robot Modes
unsigned char controlMode Control Modes
double targetSpeedFraction
double speedScaling
The "jointMode" field is a code for the joint status (shown on the initialisation screen):
The "toolMode" field is a code for the joint status (shown on the initialisation screen):
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
This information is sent when leaving initializing mode and/or if the kinematics configuration is
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
changed.
This information is sent when leaving initializing mode and/or if the kinematics configuration is
changed.
This package is used internally by Universal Robots software only and should be skipped.
int messageSize
unsigned char messageType = MESSAGE_TYPE_ROBOT_MESSAGE = 20
uint64_t timestamp
char source Message Sources
char robotMessageType = ROBOT_MESSAGE_TYPE_VERSION = 3
char projectNameSize
charArray projectName
unsigned char majorVersion
unsigned char minorVersion
int bugfixVersion
int buildNumber
charArray buildDate
charArray popupTextMessage
int messageSize
unsigned char messageType = MESSAGE_TYPE_ROBOT_MESSAGE = 20
uint64_t timestamp
char source Message Sources
char robotMessageType = ROBOT_MESSAGE_TYPE_TEXT = 0
charArray textTextMessage
int messageSize
unsigned char messageType = MESSAGE_TYPE_ROBOT_MESSAGE = 20
uint64_t timestamp
char source Message
Sources
char robotMessageType = ROBOT_MESSAGE_TYPE_RUNTIME_
EXCEPTION = 10
int scriptLineNumber
int scriptColumnNumber
charArray runtimeExceptionTextMessage
Each variable value contains type byte, data, and terminating new line character (\n character).
Example - two variables of type BOOL(True), and STRING("aaaa"): 0c 01 0a03 00 04 61 61 61 61
0a
uint64_t timestamp
bool isRealRobotConnected
bool isRealRobotEnabled
bool isRobotPowerOn
bool isEmergencyStopped
bool isProtectiveStopped
bool isProgramRunning
bool isProgramPaused
unsigned char robotMode Robot Modes
unsigned char controlMode Control Modes
double targetSpeedFraction
double speedScaling
The "jointMode" field is a code for the joint status (shown on the initialisation screen):
The "toolMode" field is a code for the joint status (shown on the initialisation screen):
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
This information is sent when leaving initializing mode and/or if the kinematics configuration is
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
changed.
This information is sent when leaving initializing mode and/or if the kinematics configuration is
changed.
This package is used internally by Universal Robots software only and should be skipped.
int messageSize
unsigned char messageType = MESSAGE_TYPE_ROBOT_MESSAGE = 20
uint64_t timestamp
char source Message Sources
char robotMessageType = ROBOT_MESSAGE_TYPE_VERSION = 3
char projectNameSize
charArray projectName
unsigned char majorVersion
unsigned char minorVersion
int bugfixVersion
int buildNumber
charArray buildDate
charArray popupTextMessage
int messageSize
unsigned char messageType = MESSAGE_TYPE_ROBOT_MESSAGE = 20
uint64_t timestamp
char source Message Sources
char robotMessageType = ROBOT_MESSAGE_TYPE_TEXT = 0
charArray textTextMessage
int messageSize
unsigned char messageType = MESSAGE_TYPE_ROBOT_MESSAGE = 20
uint64_t timestamp
char source Message
Sources
char robotMessageType = ROBOT_MESSAGE_TYPE_RUNTIME_
EXCEPTION = 10
int scriptLineNumber
int scriptColumnNumber
charArray runtimeExceptionTextMessage
Each variable value contains type byte, data, and terminating new line character (\n character).
Example - two variables of type BOOL(True), and STRING("aaaa"): 0c 01 0a03 00 04 61 61 61 61
0a
4. Control Modes
Control Modes
Mode Description
0 CONTROL_MODE_POSITION
1 CONTROL_MODE_TEACH
2 CONTROL_MODE_FORCE
3 CONTROL_MODE_TORQUE
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
5. Robot Modes
Robot Modes
Mode Description
-1 ROBOT_MODE_NO_CONTROLLER
0 ROBOT_MODE_DISCONNECTED
1 ROBOT_MODE_CONFIRM_SAFETY
2 ROBOT_MODE_BOOTING
3 ROBOT_MODE_POWER_OFF
4 ROBOT_MODE_POWER_ON
5 ROBOT_MODE_IDLE
6 ROBOT_MODE_BACKDRIVE
6. Joint Modes
Value
JOINT_MODE_RESET 235
JOINT_MODE_SHUTTING_DOWN 236
JOINT_MODE_BACKDRIVE 238
JOINT_MODE_POWER_OFF 239
JOINT_MODE_READY_FOR_POWER_OFF (FROM VERSION 5.1) 240
JOINT_MODE_NOT_RESPONDING 245
JOINT_MODE_MOTOR_INITIALISATION 246
JOINT_MODE_BOOTING 247
JOINT_MODE_VIOLATION 251
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
JOINT_MODE_FAULT 252
JOINT_MODE_RUNNING 253
JOINT_MODE_IDLE 255
7. Tool Modes
Value
JOINT_MODE_RESET 235
JOINT_MODE_SHUTTING_DOWN 236
JOINT_MODE_POWER_OFF 239
JOINT_MODE_NOT_RESPONDING 245
JOINT_MODE_BOOTING 247
JOINT_MODE_BOOTLOADER 249
JOINT_MODE_FAULT 252
JOINT_MODE_RUNNING 253
8. Message Sources
Each message sent has a "source" code for the sender of the message.
Value
MESSAGE_SOURCE_JOINT_0_FPGA 100
MESSAGE_SOURCE_JOINT_0_A 110
MESSAGE_SOURCE_JOINT_0_B 120
MESSAGE_SOURCE_JOINT_1_FPGA 101
MESSAGE_SOURCE_JOINT_1_A 111
MESSAGE_SOURCE_JOINT_1_B 121
MESSAGE_SOURCE_JOINT_2_FPGA 102
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
MESSAGE_SOURCE_JOINT_2_A 112
MESSAGE_SOURCE_JOINT_2_B 122
MESSAGE_SOURCE_JOINT_3_FPGA 103
MESSAGE_SOURCE_JOINT_3_A 113
MESSAGE_SOURCE_JOINT_3_B 123
MESSAGE_SOURCE_JOINT_4_FPGA 104
MESSAGE_SOURCE_JOINT_4_A 114
MESSAGE_SOURCE_JOINT_4_B 124
MESSAGE_SOURCE_JOINT_5_FPGA 105
MESSAGE_SOURCE_JOINT_5_A 115
MESSAGE_SOURCE_JOINT_5_B 125
MESSAGE_SOURCE_TOOL_FPGA 106
MESSAGE_SOURCE_TOOL_A 116
MESSAGE_SOURCE_TOOL_B 126
MESSAGE_SOURCE_EUROMAP_FPGA 107
MESSAGE_SOURCE_EUROMAP_A 117
MESSAGE_SOURCE_EUROMAP_B 127
MESSAGE_SOURCE_TEACH_PENDANT_A 108
MESSAGE_SOURCE_TEACH_PENDANT_B 118
MESSAGE_SOURCE_SCB_FPGA 40
MESSAGE_SAFETY_PROCESSOR_UA 20
MESSAGE_SAFETY_PROCESSOR_UB 30
MESSAGE_SOURCE_ROBOTINTERFACE -2
MESSAGE_SOURCE_RTMACHINE -3
MESSAGE_SOURCE_SIMULATED_ROBOT -4
MESSAGE_SOURCE_GUI -5
MESSAGE_SOURCE_CONTROLLER 7
MESSAGE_SOURCE_RTDE 8
MESSAGE_TYPE_DISCONNECT -1
MESSAGE_TYPE_ROBOT_STATE 16
MESSAGE_TYPE_ROBOT_MESSAGE 20
MESSAGE_TYPE_HMC_MESSAGE 22
MESSAGE_TYPE_MODBUS_INFO_MESSAGE 5
11. Report Levels
Value
REPORT_LEVEL_INFO 1
REPORT_LEVEL_WARNING 2
REPORT_LEVEL_VIOLATION 3
REPORT_LEVEL_FAULT 4
REPORT_LEVEL_DEVL_DEBUG (INTERNAL USE ONLY) 128
REPORT_LEVEL_DEVL_INFO 129
REPORT_LEVEL_DEVL_WARNING 130
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
REPORT_LEVEL_DEVL_VIOLATION 131
REPORT_LEVEL_DEVL_FAULT 132
12. Requested Types
Value
REQUEST_VALUE_TYPE_BOOLEAN 0
REQUEST_VALUE_TYPE_INTEGER 1
REQUEST_VALUE_TYPE_FLOAT 2
REQUEST_VALUE_TYPE_STRING 3
REQUEST_VALUE_TYPE_POSE 4
REQUEST_VALUE_TYPE_JOINTVECTOR 5
REQUEST_VALUE_TYPE_WAYPOINT (UNUSED) 6
REQUEST_VALUE_TYPE_EXPRESSION (UNUSED) 7
REQUEST_VALUE_TYPE_NONE (*) 8
13. Value Types
NONE
// No content -> has not been initialized yet
CONST_VAR_STRING
int16_t valueLength
charArray value
VAR_STRING
int16_t valueLength
charArray value
Copyright © 2009–2021 by Universal Robots A/S. All rights reserved.
LIST
int16_ listLength
For each item:
uint8_t valueType
DataValueType
end
POSE
float X
float Y
float Z
float Rx
float Ry
float Rz
BOOL
bool value
NUM
float value
INT
int32_t value
FLOAT
float value
MATRIX
int16_t nRows
int16_t nColumns
For each value in each row:
uint8_t valueType
DataValueType
end
Up to software 3.2
NONE = 0
STRING = 3
LIST = 4
POSE = 9
BOOL = 11
NUM = 12
INT = 13
FLOAT = 14
VAR_STRING = 4
LIST = 5
POSE = 10
BOOL = 12
NUM = 13
INT = 14
FLOAT = 15
POSE = 12
BOOL = 13
NUM = 14
INT = 15
FLOAT = 16
LIST = 17
MATRIX = 18