DOBOT CR5 User Guide
DOBOT CR5 User Guide
DOBOT CR5
User Guide
Issue: V 3.5.3.1
Date: 2020-05-09
Copyright © Shenzhen Yuejiang Technology Co., Ltd 2020. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means
without the prior written consent of Yuejiang Technology Co., Ltd
Disclaimer
To the maximum extent permitted by applicable law, the products described (including its
hardware, software, and firmware, etc.) in this document are provided AS IS, which may have flaws,
errors or faults. Yuejiang makes no warranties of any kind, express or implied, including but not
limited to, merchantability, satisfaction of quality, fitness for a particular purpose and non-
infringement of third party rights. In no event will Yuejiang be liable for any special, incidental,
consequential or indirect damages resulting from the use of our products and documents.
Before using our product, please thoroughly read and understand the contents of this document
and related technical documents that are published online, to ensure that the robot is used on the
premise of fully understanding the robot and related knowledge. Please use this document with
technical guidance from professionals. Even if follow this document or any other related
instructions, Damages or losses will be happening in the using process, Dobot shall not be
considered as a guarantee regarding all security information contained in this document.
The user has the responsibility to make sure following the relevant practical laws and
regulations of the country, in order that there is no significant danger in the use of the robot.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
i
DOBOT CR5 User Guide Preface
Preface
Purpose
This Document describes the functions, technical specifications, installation guide and system
commissioning of DOBOT CR5 robot system, making it easy for users to fully understand and use
it.
Intended Audience
This document is intended for:
Customer
Sales Engineer
Installation and Commissioning Engineer
Technical Support Engineer
Change History
Symbol Conventions
The symbols that may be founded in this document are defined as follows.
Symbol Description
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
ii
DOBOT CR5 User Guide Contents
Contents
Security Precautions ................................................................................................ 1
Security Warning Sign ...................................................................................................... 1
General Security................................................................................................................ 1
Personal Security .............................................................................................................. 5
Overview ................................................................................................................... 6
Technical Specifications ................................................................................................... 6
Robot Body Technical Parameters ....................................................................... 6
Controller Technical Parameters.......................................................................... 8
Robot Workspace .............................................................................................................. 8
End-effector Size .............................................................................................................. 9
End-effector Load Description........................................................................................ 10
Product Features ............................................................................................................. 10
Motion Function ................................................................................................ 10
Coordinate System............................................................................................. 13
Arm Orientation................................................................................................. 16
Singularity Point ................................................................................................ 17
Collision Detection ............................................................................................ 18
Key Description on Robot .............................................................................................. 19
Electrical Specifications......................................................................................... 21
Controller I/O Interface Description ............................................................................... 21
Emergency Stop I/O description ..................................................................................... 23
User Emergency Stop ........................................................................................ 23
Protective Stop................................................................................................... 24
Automatic Operation Remote Confirmation ..................................................... 24
End I/O Interface Description ......................................................................................... 25
Interface Board ............................................................................................................... 26
External Interface Board Description ................................................................ 26
Internal Module Description.............................................................................. 27
Digital Input ...................................................................................................... 28
Multiplex Digital Input/ Digital Output............................................................. 29
Analog Input ...................................................................................................... 30
Analog Output ................................................................................................... 31
Incremental Encoder ABZ Input........................................................................ 32
Installation and Commissioning ........................................................................... 33
Installation Environment ................................................................................................. 33
Installation Location ....................................................................................................... 33
Controller Installation Location......................................................................... 33
Robot Installation Location ............................................................................... 34
Connecting cables ........................................................................................................... 34
Precautions ........................................................................................................ 34
Connecting Controller and Robot by Heavy Duty Cables ................................. 35
Connecting Emergency Stop Switch ................................................................. 35
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
iii
DOBOT CR5 User Guide Contents
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
iv
DOBOT CR5 User Guide 1 Security Precautions
Security Precautions
This topic describes the security precautions that should be noticed when using this product.
Please read this document carefully before using the robot for the first time. This product needs to
be carried out in an environment meeting design specification. You cannot remold the product
without authorization, otherwise, it could lead to product failure, and even personal injury, electric
shock, fire, etc. People who use this product for system design and manufacture must be trained by
our company, relevant institution, or must have the same professional skills. The installation
personnel, operators, teaching personnel, programmers and system developers of the robot must
read this document carefully and use the robot strictly according to the regulations of this document
strictly.
Sign Description
May cause dangerous hot surfaces, if touched, may cause personal injury
HOT
Indicates a potential risk, and ignoring these texts may result in damage to
ATTENTION the robotic arm, loss of data, or unpredictable results
For items marked with such symbols, depending on the specific situation,
there is sometimes the possibility of significant consequences
General Security
The following security rules should be followed when using the robot for industrial design and
manufacture.
DANGER
HOT
The robot and the controller will generate heat during operation. Please do not
operate or touch the robot when the robot is working or has just stopped working.
Turn off the power and wait an hour for the robot to cool down.
Do not put your fingers where the control cabinet gets hot.
NOTICE
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
2
DOBOT CR5 User Guide 1 Security Precautions
Please make sure that there are no obstacles within 2 meters of the robot during
transportation, and relevant personnel should stay away from the suspended robot.
Shenzhen Yuejiang Technology Co., Ltd. is not responsible for the damage caused
during the transportation and handling of equipment.
Please make sure that the robot is in the packing posture before packaging, and the
brakes on each axis are normal.
Please make sure that there are no obstacles around the packing area, so that the
staff can leave in a timely manner.
When the robot is transported, the packaging needs to be fixed to ensure that the
robot is stable.
After removing the outer packaging, please make sure that the robot maintains the
original packing posture and the brakes on each axis are normal.
In order to prevent personnel from entering the working space of the robot arm by
mistake, please set up safety barriers to prevent personnel from entering the
hazardous area.
Do not enter the working space of the manipulator at will during operating the robot,
otherwise cause injury to the robot or yourself.
After the commissioning of the operator is completed, the test needs to be performed
in the Manual mode first, and then it is automatically run after it is confirmed to be
correct.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
3
DOBOT CR5 User Guide 1 Security Precautions
If the controller needs to be restarted due to power failure, when restarting, the robot
must be manually returned to the initial position of the automatic operation program
before restarting the automatic operation.
Before maintenance and wiring work, the power supply must be cut off, and the
sign No power supply must be put on. Otherwise, electric shock and personal injury
may result.
Please observe the ESD regulations when disassembling the robot or controller.
Avoid dismantling the power supply system in the controller. After the controller is
turned off, its power supply system may still have high voltage for several hours.
Please contact our technical support staff for the disassembly and repair of the robot.
If the brake is manually released, the robot may move because of the action of
gravity. So, when manually releasing the brake, please ensure that the robot body
and the tools or workpieces installed on the robot are effectively supported.
In order to prevent electric shock, when replacing parts, please turn off the circuit
breaker in advance and cut off the main power before proceeding.
Turn off the main power supply for 5 minutes before replacing parts.
WARNING
Before the operation, please wear protective clothing, such as antistatic uniform,
protective gloves, and protective shoes.
It is prohibited to modify or remove the nameplates, instructions, icons, and marks
on the robot and the related equipment.
Before operating and maintaining the robot, the personnel responsible for the
installation, operation and maintenance must be trained to understand the various
security precautions and to master the correct methods of operation, and
maintenance.
All the required cables must be connected before powering on the equipment.
Be careful during the robot carrying or installing. Please follow the instructions on
the packing box to put down the robot gently and place it correctly in direction of
the arrow.
Please use the matched cables when connecting a robot to internal or external
equipment for personal security and equipment protection.
Please do not plug or unplug the power cables or communication cables when
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
4
DOBOT CR5 User Guide 1 Security Precautions
Personal Security
When operating the robot system, it is necessary to ensure the personal safety of the operator.
The general precautions are listed below, please strictly follow.
WARNING
To reduce the risk of personal injury, please comply with local regulations with
regard to the maximum weight one person is permitted to carry.
Do not touch the terminal blocks or disassemble the equipment with the power ON.
Otherwise, it may result in an electric shock
Please confirm that the equipment is well grounded, otherwise it will endanger
personal safety.
Do not touch the terminal blocks or remove the interval circuit components in 10
minutes after the power is shut off, to avoid an electric shock since there is residual
capacitance inside the controller.
Please do not reach out into the workspace of the robot when operating it, otherwise,
it will be vulnerable to injury the device or the person.
Even if the power switch of the controller is already in the OFF status, touching the
terminal blocks or removing the interval circuit components is not allowed, to avoid
an electric shock since there is residual capacitance inside the controller.
Please do not reach out into the workspace of the robot when operating it, otherwise,
it will be vulnerable to injury the device or the person.
When working with robots, please do not wear loose clothing or jewelry. When
operating the robot, make sure that the long hair bundle is behind your head.
If the robot appears to have stopped during the operation of the equipment, it may
be because the robot is waiting for the start signal and is in the state of being about
to move. In this case, the robot should also be considered to be in motion, please do
not approach the robot.
Please ensure that the robot establishes safety measures near the operation area,
such as guardrails, to protect the operator and surrounding people.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
5
DOBOT CR5 User Guide 2 Overview
Overview
The collaborative robot work system is composed of the collaborative robot body, robot control
software, and robot operation software. DOBOT CR5 supports APP wireless direct connection,
which is really simple and easy to use. With the self-developed dynamic algorithm, one-handed
teach-in and sensor less collision detection are realized to ensure the safety of human and machine
working together. The drag trajectory reproduction function is creatively introduced, which
completely reproduces the drag trajectory and reduces the threshold for robot use. DOBOT CR5 has
a repeat positioning accuracy of ± 0.03mm, a max load of 5kg, and a joint speed of 180 °/s. It is a
product with the advantages of both industrial robots and collaborative robots.
Technical Specifications
Robot Body Technical Parameters
Weight 25kg
Reach(mm) 900mm
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
6
DOBOT CR5 User Guide 2 Overview
J1 ±360°
J2 ±360°
J3 ±160°
Motion Range (°)
J4 ±360°
J5 ±360°
J6 ±360°
J1 180°/s
J2 180°/s
Speed(°/s) J4 180°/s
J5 180°/s
J6 180°/s
DI 2
End-effector I/O DO 2
Interface AI 2
AO 0
Communication RS485
Interface
DI 16
DO/DI 16
Controller I/O
AI 2
Interface
AO 2
Repeatability ±0.03mm
IP Classification IP54
Temperature 0℃~45℃
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
7
DOBOT CR5 User Guide 2 Overview
Safety Function Emergency stop function and reserved external safety interface (can be controlled by
I/O interface) Protective stop interface, Automatic Operation Remote Confirmation
Indicator Status The indicator light will be steady red when the power is on; the indicator light will be
off when the power is off
Robot Workspace
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
8
DOBOT CR5 User Guide 2 Overview
End-effector Size
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
9
DOBOT CR5 User Guide 2 Overview
Product Features
Motion Function
The motion trajectory consists of a series of interpolated motions since the interpolated motion
is the basic motion type. According to the different trajectories, motion functions are classified as
joint interpolated motion, linearly interpolated motion, circular interpolated motion and continuous
path. The joint interpolated motion is in the joint space. And the other interpolated motions are in
the Cartesian space.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
10
DOBOT CR5 User Guide 2 Overview
Jump: The trajectory looks like a door. From point A to point B, the robot will move in
the Move mode
Move up to the lifting height (StartHeight is a relative height).
Move up to the maximum lifting height (zLimit).
Move horizontally to a point that is above point B.
Move down to a point where the height is point B plus the dropping height
(EndHeight is a relative height).
Move down to Point B.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
11
DOBOT CR5 User Guide 2 Overview
NOTICE
Point A and point B cannot be higher than zLimit. Otherwise, an alarm will be
triggered.
If point A plus StartHeight or point B plus EndHeight is higher than zLimit, the
robot moves up from point A to zLimit or moves down from zLimit to point B
directly, the trajectory looks like a door without transition, as shown in Figure 2.8.
If the heights of point A and point B are the same with zLimit, the trajectory is
shown in Figure 2.9.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
12
DOBOT CR5 User Guide 2 Overview
Coordinate System
This topic describes the coordinate systems for different types of robots, which are divided into
Joint coordinate system, Base coordinate system, User coordinate system, and Tool coordinate
system. The next three coordinate systems which are based on the right-handed rule are called the
Cartesian coordinate system.
2.5.2.1 Joint Coordinate System
The Joint coordinate system is determined by the motion joints.
Figure 2.12 shows the Joint coordinate system of a CR5 robot. All the joints are rotating joints.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
13
DOBOT CR5 User Guide 2 Overview
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
14
DOBOT CR5 User Guide 2 Overview
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
15
DOBOT CR5 User Guide 2 Overview
Arm Orientation
Table 2.3 lists the values of the R, D, N arm parameters and their right orientations.
Arm parameter 1 -1
Besides, in this system, we use Cfg to represent the sixth-axis angle, as shown in Table 2.4.
… …
2 [90°,180°)
1 (0°,90°)
-1 [0°,-90°)
-2 [-90°,-180°)
… …
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
16
DOBOT CR5 User Guide 2 Overview
Singularity Point
When the robot moves under the Cartesian coordinate system, the resultant velocity of the two
axes cannot be in any direction if the directions of them are aligned, resulting in that the degrees of
freedom of the robot are degraded. Namely, the robot moves to the singularity point and an alarm
about singularity point is triggered. However, when the robot moves to the singularity point under
the Joint coordinate system, the movement will not be affected. And also, the alarm will not be
triggered.
There are three singularity points shown as follows.
Wrist singularity point: The axes of J4 and J6 are aligned.
Shoulder singularity point: The TCP is located in the plane performed by Joint1 and
Joint2.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
17
DOBOT CR5 User Guide 2 Overview
Elbow singularity point: The Rear arm and Forearm in a straight line.
Collision Detection
Collision detection is mainly used for reducing the impact on the robot, to avoid damage to the
robot or external equipment. If the collision detection is activated, the robot arm will stop running
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
18
DOBOT CR5 User Guide 2 Overview
Key Description
Open/close hand-hold Long press and then release: Open hand-hold teach, and the LED indicator turns
teach blue and blinks
Short press and then release: Close hand-hold teach, and the LED indicator turns
green
Trajectory record Long press and release: Open trajectory record, and the LED indicator turns yellow
Short press and release: Close trajectory record, and the LED indicator turns green
Playback Long press and then release: Open playback, and the LED indicator turns yellow
and blinks
Short press and then release: Close playback, and the LED indicator turns green
Control end-effectors Short press and then release: Open or close end-effectors
Enable/disable robot Long press 3s and then release: Enable robot., the LED indicator turns green from blue
and blinks
Long press 6s and then release: Disable robot, the LED indicator turns blue from green
and blink.
NOTE
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
19
DOBOT CR5 User Guide 2 Overview
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
20
DOBOT CR5 User Guide 3 Electrical Specifications
Electrical Specifications
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
21
DOBOT CR5 User Guide 3 Electrical Specifications
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
22
DOBOT CR5 User Guide 3 Electrical Specifications
43 B-
44 Z-
50 A+
51 B+
52 Z+
46 AI 1 Analog input 1
48 AO 1 Analog output 1
54 AI 2 Analog input 2
56 AO 2 Analog output 2
User emergency stop I / O is an emergency stop interface provided to users, and users can
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
23
DOBOT CR5 User Guide 3 Electrical Specifications
I/O28(X18:4) DI12(X19:4) Short connection I/O28 and DI12, I/O29 and DI13 are
redundant circuits of the user emergency stop
interface. Any one of the disconnections will
I/O29(X18:5) DI13(X19:5) Short connection cause the user emergency stop function to be
triggered
Protective Stop
Protective stop I/O is a protective stop interface provided to users, and users can connect
external protective stop devices. The interface description is as follows:
The automatic operation remote confirmation interface is an interface for users to access the
automatic operation remote confirmation button. The main function is that the user can manually
confirm the operation at the remote before automatic operation to ensure the safety of personnel.
The interface description is as follows:
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
24
DOBOT CR5 User Guide 3 Electrical Specifications
5 24V 24V(Out)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
25
DOBOT CR5 User Guide 3 Electrical Specifications
8 GND GND
Interface Board
External Interface Board Description
Figure 3.4 shows the interface board of the CC series controller. Table 3.6 lists the description.
No. Description
1 LAN interface
3 USB interface
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
26
DOBOT CR5 User Guide 3 Electrical Specifications
No. Description
6 Power interface
A controller contains all necessary functions for controlling the robot. Figure 3.5 shows the
internal modules.
Module Function
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
27
DOBOT CR5 User Guide 3 Electrical Specifications
Module Function
Safety I/O interface Safety I/O interface is used to control the safety circuit
of system, such as emergency stop
Digital Input
Figure 3.6 shows the simple digital input circuit and Table 3.8 lists the technical specifications.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
28
DOBOT CR5 User Guide 3 Electrical Specifications
Item Specification
3.4.4.1 Introduction
The multiplex digital input/ digital output interface can be powered by the internal or external
power supply. Figure 3.7 shows the simple digital output circuit and Table 3.9 lists the technical
specifications.
Item Specification
Output current 2A
Analog Input
3.4.5.1 Introduction
An analog input can be set to a current input or voltage input by the DIP switch for measuring
current or voltage. A controller uses 2-channel DIP switches to control 2 channel analog inputs.
Each channel can be controlled separately. Figure 3.8 shows the simple analog input circuit. V
indicates the voltage input and I indicates the current input. The default is voltage input. If you need
to change, please contact our technical support.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
30
DOBOT CR5 User Guide 3 Electrical Specifications
Table 3.10 lists the relation between the DIP switch and analog input.
Table 3.10 The relation between the DIP switch and analog input
Analog Output
3.4.6.1 Introduction
Much like the analog input, an analog output can be set to a current output or voltage output
by the DIP switch. A controller uses 2-channel DIP switches to control 2 channel analog outputs.
Each channel can be controlled separately. Figure 3.9 shows the simple analog output circuit. V
indicates the voltage output and I indicates the current output. The default is voltage output. If you
need to change, please contact our technical support.
Table 3.11 lists the relation between the DIP switch and analog output.
Table 3.11 The relation between the DIP switch status and analog output
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
31
DOBOT CR5 User Guide 3 Electrical Specifications
An encoder is a device that converts angular or linear displacement into electrical signals.
Namely, it converts displacement into periodic electrical signals and then converts electrical signals
into count pluses. So, the displacements can be measured by the number of pluses.
This topic takes OMRON E6B2-CWZ1X as an example to describe how to use.
As the different color cables of the encoder, connect the 5V power line to Pin49, the 0V power
line to Pin41, and then connect each coded wiring in turn.
The cable color description is shown as follow.
Color Description
Brown I/O 5V
Blue I/O 0V
Black A+
White B+
Orange Z+
Shield Ground
NOTE
If a ground wire is required, it can be fixed to the control cabinet with screws. Non-
special circumstances (strong magnetic interference, etc.)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
32
DOBOT CR5 User Guide 4 Installation and Commissioning
Installation Environment
To maintain the controller and robot performance and to ensure the safety, please place them
in an environment with the following conditions.
Install indoors with good ventilation.
Do not install in a closed environment.
Keep away from excessive and shock.
Keep away from direct sunlight.
Keep away from dust, oily smoke, salinity, metal powder, corrosive gases, and other
contaminants.
Keep away from flammable.
Keep away from cutting and grinding fluids
Keep away from sources of electromagnetic interference.
When the robot is installed, corresponding measures should be taken for positioning. The
base of the robot must use four hexagon socket bolts M8 (GB / T 3098.1-82 strength level
12.9) and tighten with 20 N • m torque.
When the robot is mounted on the wall or upside down, just in case, the anti-falling
measures of the robot base must be done.
When the robot is installed, the robot must be fixed on a sufficiently strong base. The base
must be able to withstand the reaction force of the robot during acceleration and
deceleration and the static weight of the robot and the workpiece.
Installation Location
Controller Installation Location
Please place the controller on the horizontal surface outside robot’s workspace and reserve
enough space for connecting cables and operating controller. Figure 4.1 shows the installation space
requirement. There is no blockage near the air outlet for sufficient heat dissipation.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
33
DOBOT CR5 User Guide 4 Installation and Commissioning
The stability of a robot depends on the installation. You can design the platform according to
the size of the hole of the base and the real environment for mounting a robot. The platform must
not only bear the robot but also bear the dynamic force by the maximum acceleration. Note the
following before mounting the robot.
Design the platform according to the robot’s workspace, and ensure that the robot moves
without interference.
Keep the platform level which is used to mount a robot.
Connecting cables
Precautions
The specifications and installation of the external wiring should comply with local laws
and regulations.
Do not disassemble the controller by yourself. Otherwise, it may result in electric leakage.
The equipment must be grounded properly at all times to avoid the risk of electric shock.
Do not allow unnecessary strain on the cables. Otherwise, damaged cables, disconnection,
and contact failure are extremely hazardous and may result in electric shock.
Before connecting to external equipment, please turn off the controller and related
equipment, and then unplug the power. If not, it may result in electric shock or malfunction
of the robot system.
Please make sure that the cables are connected correctly. Otherwise, it may result in a
malfunction of internal modules or external devices.
Please use the matched cables for personal security and equipment protection.
After the cable connections are complete, please make sure that there are no redundant
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
34
DOBOT CR5 User Guide 4 Installation and Commissioning
Connect controller and robot by heavy-duty cables. Figure 4.2 shows the connection of the
controller with heavy-duty cables. After plugging the heavy cables into the heavy-duty connector
interface of the controller, please fasten the heavy-duty connector.
Plug emergency stop switch cable into controller, when connecting them, you need to align the
red dot on the connector with the red dot on the interface. As shown in Figure 4.3.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
35
DOBOT CR5 User Guide 4 Installation and Commissioning
NOTICE
Before running a robot, please make sure that the emergency stop switch has been
turned on (the red button has been released). Otherwise, the robot cannot work
normally.
In the emergency situation, press the emergency stop switch to make the robot stop
running immediately.
Rotate the emergency stop switch (Red button) clockwise, If the red button is
released, the emergency stop switch is turned on successfully.
Plug WiFi module into USB interface.as shown in Figure 4.4. The Overall connection diagram
is shown in Figure 4.4, the default IP is 192.168.1.6.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
36
DOBOT CR5 User Guide 4 Installation and Commissioning
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
37
DOBOT CR5 User Guide 4 Installation and Commissioning
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
38
DOBOT CR5 User Guide 4 Installation and Commissioning
The robot icon turns green, indicating that robot enables successfully. Now you
can jog robot.
NOTICE
The robot arm will move a certain distance during the enabling process. Please ensure
that there are no obstacles around the robot.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
39
DOBOT CR5 User Guide 4 Installation and Commissioning
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
40
DOBOT CR5 User Guide 5 Function Description of Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
41
DOBOT CR5 User Guide 5 Function Description of Software
NO. Description
1 Manager
2 alarm log
4 Connection button
When device and robot arm are connected to network, click the
button to connect the device to robot arm
6 Programming module
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
42
DOBOT CR5 User Guide 5 Function Description of Software
NO. Description
programs
7 Monitoring module
You can view the status of robot arm, set the output of I/O , set
the end parameters of robot arm and other functions
ON: the icon is green when robot motor is in the enabled status
OFF: the icon is red when robot motor is in the disabled status
11 System settings
12 Setting
13 Craft
NOTICE
The software supports the screen lock function. If the software has not been operated for
a long time, the screen is automatically locked. The unlock password is 000000 by
default.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
43
DOBOT CR5 User Guide 5 Function Description of Software
Setting
Before teaching or running robot programs, a series of settings are required, including motion
parameter setting, language selecting, user mode selecting and process setting.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
44
DOBOT CR5 User Guide 5 Function Description of Software
When doing jogging or playback, the method calculating the velocity and acceleration for each
axis (in Joint or Cartesian coordinate system) is shown as follows.
Actual jogging velocity = the maximum jogging velocity * global velocity rate
Actual jogging acceleration = the maximum jogging acceleration* global velocity
rate
Actual playback velocity = the maximum playback velocity * the set velocity rate in
the velocity function
Actual playback acceleration = the maximum playback acceleration * the set
acceleration rate in the acceleration function
Actual playback jerk = the maximum playback jerk * the set acceleration rate in the
jerk function
NOTE
The rates (velocity rate, acceleration rate, or jerk rate) can be set in the related speed
functions. For details, please see 6.9 Motion Parameter Commands.
If the motion mode is Jump when running robot programs, you need to set StartHeight,
EndHeight, and zLimit. For details about Jump, please see2.5.1.2Linearly Interpolated Motion.
You can set 10 sets of Jump parameters. Please set and select any set of parameters for calling
Jump command during programming. As shown in Figure 5.6. Please refer to Table 6.24 for use
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
45
DOBOT CR5 User Guide 5 Function Description of Software
NOTICE
When creating a User coordinate system, please make sure that the reference coordinate
system is the Base coordinate system.
Point: move TCP to any point A to create origin, and create user coordinate system
according to the default tool coordinate system As shown in Figure 5.7.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
46
DOBOT CR5 User Guide 5 Function Description of Software
Line: Confirm a straight line by any two points A and B. The direction from A to B is
defined as the positive direction of Y-axis, The Z-axis of Tool coordinate system of which point
A is the origin is projected into the vertical plane that confirmed by points A and point B, we
can define it as the positive direction of Z-axis. and then the positive direction X axis can be
defined based on the right-hand rule. As shown Figure 5.8.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
47
DOBOT CR5 User Guide 5 Function Description of Software
Area: User coordinate system is created by three-point calibration method. Move the robot
to three points A(x1, y1, z1), B(x2, y2, z2), and C(x3, y3, z3). Point A is defined as the origin
and the line from point A to Point B is defined as the positive direction of X-axis. The line that
point C is perpendicular to X-axis is defined as the position direction of Y-axis. And then the
Z-axis can be defined based on the right-handed rule, as shown in Figure 5.9.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
48
DOBOT CR5 User Guide 5 Function Description of Software
NOTICE
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
49
DOBOT CR5 User Guide 5 Function Description of Software
When creating a Tool coordinate system, please make sure that the reference coordinate
system is the predefined Tool coordinate system.
Tool coordinate system is created by three-point calibration method (TCP +ZX): After the end
effector is mounted, please adjust the direction of the end effector, to make TCP (Tool Center Point)
align with the same point (reference point) in three different directions, for obtaining the position
offset of the end effector, and then jog the robot to the other three points (A, B, C) for obtaining the
angle offset, as shown in Figure 5.11.
Procedure
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
50
DOBOT CR5 User Guide 5 Function Description of Software
NOTE
Rx, Ry, Rz are the orientation data, which are designated by rotating the tool center point
(TCP) around the X, Y, Z axes under the selected Tool coordinate system.
Setting Safety
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
51
DOBOT CR5 User Guide 5 Function Description of Software
In the safety setting module, you can set safety parameters such as safety hit, power control,
joint brake, etc.
5.1.2.1 Safety Hit
If the collision detection is activated, the robot arm will stop running automatically when the
robot arm hits an obstacle.
Remote Control
External equipment can send commands to a robot by different remote control modes, such as
remote I/O mode and remote Modbus mode. The default mode is Teaching mode when the robot is
shipped out. When you need to set the remote mode, please set it on APP with the robot motor in
the disabled state.
NOTICE
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
53
DOBOT CR5 User Guide 5 Function Description of Software
DI 11 Clear alarm
DI 12 Continue to run
DO 13 Ready status
DO 14 Pause status
DO 15 Alarm status
DO 16 Running status
NOTICE
Prerequisites
The project to be running in the remote mode has been prepared.
The external equipment has been connected to the robot system by the I/O interface. The
specific I/O interface description is shown in Table 5.2. The IP address of the Dobot robot
control system and the external device must be on the same network segment. The default IP
address of the Dobot robot control system is 192.168.5.1 and the port is 8080.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
54
DOBOT CR5 User Guide 5 Function Description of Software
Procedure
Right now, only the emergency stop button and the real-time coordinates displaying
section are available.
The robot will move as the selected offline project. If the stop signal is triggered, the
remote I/O mode will be invalid.
5.1.3.2 Remote Modbus
When the remote mode is Modbus mode, external equipment can control a robot in this mode.
For details about Modbus registers, please see 6.16.1Modbus Register Description.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
55
DOBOT CR5 User Guide 5 Function Description of Software
Coil register
10001 0 Auto-exit
Prerequisites
The project to be running in the remote mode has been prepared.
The robot has been connected to the external equipment with the ethernet interface. You
can connect them directly or via a router, please select based on site requirements.
The IP address of the robot system must be in the same network segment of the external
equipment without conflict. The default IP address is 192.168.5.1.
The robot has been powered on.
NOTE
The details on how to connect external equipment and use it are not described in this
topic.
Procedure
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
56
DOBOT CR5 User Guide 5 Function Description of Software
Right now, only the emergency stop button and the real-time coordinates displaying
section are available.
The robot will move as the selected offline project. If the stop signal is triggered, the
remote Modbus mode will be invalid.
Homing
After some parts (motors, reduction gear units) of the robot have been replaced or the robot has
been hit, the origin of the robot will be changed. You need to reset the origin.
Click Home to make robot move to the origin position after switching robot to manual mode
and enabling robot.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
57
DOBOT CR5 User Guide 5 Function Description of Software
If the origin of robot has been changed, you need to reset it. Switch Back to home to Set home
position, and put the robot in the original position and click Home to set origin of the robot. This
feature only supports administrator settings.
Running Log
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
58
DOBOT CR5 User Guide 5 Function Description of Software
Setting Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
59
DOBOT CR5 User Guide 5 Function Description of Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
60
DOBOT CR5 User Guide 5 Function Description of Software
Hand-Hold Teach
You can drag robot to teach by APP or function keys on the end of robot. For function key
details, please refer to 2.6 Key Description on Robot.
Click Craft>Drag teach, the dragging page is displayed, as shown in Figure 5.26.
Button Description
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
61
DOBOT CR5 User Guide 5 Function Description of Software
Button Description
Select the recorded trajectory, and click Path playback to start trajectory playback
You can set Path playback loop-time on the hand-hold teach page, the default value is 1
NOTE
There are two kinds of trajectory names. For example, 01-01-00-20-07.csv is a trajectory which
records by APP. You can record multiple trajectories in this type. Button_drag_track.csv is a
trajectory which records by clicking function keys on the end of robot. In this type, you can only
record one trajectory.
Monitor
I/O Monitor
You can monitor the status of I/O, as shown in Figure 5.27, you can select checkbox to change
the X:0 from output into input. Click X:0 to set High(1) or Low(0) level (X indicates the number of
I/O).
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
62
DOBOT CR5 User Guide 5 Function Description of Software
Robot Status
Controlling End-effectors
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
63
DOBOT CR5 User Guide 5 Function Description of Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
64
DOBOT CR5 User Guide 5 Function Description of Software
Calibration
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
65
DOBOT CR5 User Guide 5 Function Description of Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
66
DOBOT CR5 User Guide 5 Function Description of Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
67
DOBOT CR5 User Guide 5 Function Description of Software
After the calibration is completed, the programming instruction can be called in the
programming module to control the six-dimensional force sensor. For details, please refer to
6.10Six-axis Force Sensor .
Programming
Program Description
CR5 robot supports script programming, graphics programming, and Blockly programming
which use the Lua language as the programming language.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
68
DOBOT CR5 User Guide 5 Function Description of Software
Script Programming
Script programming uses Lua as the programming language, as shown in Figure 5.40.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
69
DOBOT CR5 User Guide 5 Function Description of Software
Button Description
Tree Programming
Tree programming is programmed in a way similar to building blocks, making it easier for
users to operate and get started.
Blockly Program
Blockly is a graphical programming platform developed by YueJiang based on Google's open-
source platform. The operation of the robot can be programmed through puzzles which is intuitive
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
70
DOBOT CR5 User Guide 5 Function Description of Software
Program Example
This section takes script programming as an example to describe how to program. We call Go
command to make the robot move between point P1 and point P2 circularly.
Prerequisites
Robot has connected to APP.
Procedure
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
71
DOBOT CR5 User Guide 5 Function Description of Software
Arm is the arm orientation, Tool is tool coordinate system, User is User coordinate
system.
Button Description
Cover a point
you can select a teaching point and click Cover to cover the current teaching point
Move to a point
Select a point, and long press this button to make robot move to this point
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
72
DOBOT CR5 User Guide 5 Function Description of Software
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
73
DOBOT CR5 User Guide 5 Function Description of Software
Button Description
Run a program step by step, you can run a program step by step by
setting a breakpoint
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
74
DOBOT CR5 User Guide 6 Program Language
Program Language
CC series controller encapsulates the robot dedicated API commands for programming with
Lua language. This section describes commonly used commands for reference.
Arithmetic Operators
Table 6.1 Arithmetic operator
Command Description
+ Addition
- Subtraction
* Multiplication
// Floor division
% Remainder
^ Exponentiation
| OR operator
~ XOR operator
Relational Operator
Table 6.2 Relational Operator
Command Description
== Equal
~= Not equal
Logical Operators
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
75
DOBOT CR5 User Guide 6 Program Language
Command Description
or Logical OR operator
General Keywords
Table 6.4 General keyword
Command Description
nil Null
General Symbol
Table 6.5 General symbol
Command Description
Command Description
Global Variable
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
76
DOBOT CR5 User Guide 6 Program Language
The robot global variables can be defined in the global.lua file, including global functions,
global points, and global variables.
Global function:
function exam()
print("This is an example")
end
Define a joint coordinate point, of which R sets to 1, D sets to -1, N sets to 0, Cfg
sets to 1, the User and Tool coordinate systems are both default coordinate systems.
P = {armOrientation = {1, 1, -1, 1}, joint = {20,10,22,2.14,0.87,3.85}, tool = 0, user = 0}
Global variable
flag = 0
Motion Commands
Table 6.7 Motion command
Command Description
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
77
DOBOT CR5 User Guide 6 Program Language
Command Description
NOTICE
Description Move from the current position to a target position in a point-to-point mode under the Cartesian
coordinate system
Parameter Required parameter: P: Indicate target point, which is user-defined or obtained from the
TeachPoint page. Only Cartesian coordinate points are supported
Optional parameter:
Go(P1)
Description Move from the current position to a target position in a point-to-point motion under the Joint
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
78
DOBOT CR5 User Guide 6 Program Language
coordinate system
Parameter Required parameter: P: Indicate the joint angle of the target point, which cannot be obtained from
the TeachPoint page. You need to define the joint coordinate point before calling this command
Optional parameter:
MoveJ(P)
Description Move from the current position to a target position in a straight line under the Cartesian coordinate
system
Parameter Required parameter: P: Indicate the target point, which is user-defined or obtained from the
TeachPoint page. Only Cartesian coordinate points are supported
Optional parameter:
Move(P1)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
79
DOBOT CR5 User Guide 6 Program Language
Description Move from the current position to a target position in an arc interpolated mode under the Cartesian
coordinate system
This command needs to combine with other motion commands, to obtain the starting point of an
arc trajectory
P1: Middle point, which is user-defined or obtained from the TeachPoint page. Only
Cartesian coordinate points are supported
P2: End point, which is user-defined or obtained from the TeachPoint page. Only Cartesian
coordinate points are supported
Optional parameter:
Go(P1)
Arc3(P2,P3)
end
The robot cycles from point P1 to point P3 in the arc interpolated mode
Function Jump(P,” User=1 Tool=2 SpeedS=50 AccelS=20 Start=10 Zlimit=80 End=50 SYNC=1”)
Description The robot moves from the current position to a target position in the Move mode. The trajectory
looks like a door
Parameter Required parameter: P: Indicate the target point, which is user-defined or obtained from the
TeachPoint page. Only Cartesian coordinate points are supported. Also, the target point cannot
be higher than Zlimit, to avoid an alarm about JUMP parameter error
Optional parameter:
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
80
DOBOT CR5 User Guide 6 Program Language
Example Jump(P1)
NOTICE
The lifting height and dropping height cannot be higher than Zlimit, to avoid an alarm on
JUMP parameter error. For details about JUMP, please see 2.5.1.1 Joint Interpolated
Motion.
Description Move from the current position to a target position in a circular interpolated mode under the
Cartesian coordinate system
This command needs to combine with other motion commands, to obtain the starting point of an
arc trajectory
P1: Middle point, which is user-defined or obtained from the TeachPoint page. Only
Cartesian coordinate points are supported
P2: End point, which is user-defined or obtained from the TeachPoint page. Only Cartesian
coordinate points are supported
Optional parameter:
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
81
DOBOT CR5 User Guide 6 Program Language
execution, this command has a return immediately after calling it, regardless of the
command process. If SYNC is 1, it indicates synchronous execution. After calling this
command, it will not return until it is executed completely
Example Go(P1)
Circle3(P2,P3,1)
Description Set the X, Y, Z axes offset under the Cartesian coordinate system to return a new Cartesian
coordinate point
The robot can move to this point in all motion commands except MoveJ
Parameter P1: Indicate the current Cartesian coordinate point, which is user-defined or obtained from
the TeachPoint page. Only Cartesian coordinate points are supported
Unit: mm
Description Set the joint offset in the Joint coordinate system to return a new joint coordinate point
Parameter P1: Indicate the current joint coordinate point, which cannot be obtained from the
TeachPoint page. You need to define the joint coordinate point before calling this command
Unit: °
P2=RJ(P1, {60,50,32,30})
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
82
DOBOT CR5 User Guide 6 Program Language
Function GoR({OffsetX, OffsetY, OffsetZ},” User=1 Tool=2 CP=1 Speed=50 Accel=20 SYNC=1 ”)
Description Move from the current position to the offset position in a point-to-point mode under the Cartesian
coordinate system
Parameter Required parameter: OffsetX, OffsetY, OffsetZ: X, Y, Z axes offset in the Cartesian coordinate
system
Unit: mm
Optional parameter:
Example Go(P1)
Description Move from the current position to the offset position in a point-to-point motion under the Joint
coordinate system
Unit: °
Optional parameter:
Example Go(P1)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
83
DOBOT CR5 User Guide 6 Program Language
MoveJR({20,20,10,0},"SYNC=1")
Description Move from the current position to the offset position in a straight line under the Cartesian
coordinate system
Parameter Required parameter: OffsetX, OffsetY, OffsetZ: X, Y, Z axes offset in the Cartesian coordinate
system
Unit: mm
Optional parameter:
Example Go(P1)
Command Description
Speed Set the velocity rate. This command is valid only when
the motion mode is Go, or MoveJ
SpeedS Set the velocity rate. This command is valid only when
the motion mode is Move, Jump, Arc3, or Circle3
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
84
DOBOT CR5 User Guide 6 Program Language
Command Description
Function Accel(R)
Description Set the acceleration rate. This command is valid only when the motion mode is Go, Jump, or
MoveJ
Example Accel(50)
Go(P1)
Function AccelS(R)
Description Set the acceleration rate. This command is valid only when the motion mode is Move, Arc3, or
Circle3
Example AccelS(20)
Move(P1)
Function Speed(R)
Description Set the velocity rate. This command is valid only when the motion mode is Go, Jump, or MoveJ
Example Speed(20)
Go(P1)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
85
DOBOT CR5 User Guide 6 Program Language
Function SpeedS(R)
Description Set the acceleration rate. This command is valid only when the motion mode is Move, Arc3, or
Circle3
Example SpeedS(20)
Move(P1)
Function Arch(Index)
Description Set the index of sets of parameters (StartHeight, zLimit, EndHeight) in the Jump mode
The sets of parameters need to be set on the Setting > PlaybackArch of the APP.
This parameter is valid only when the right index has been selected from the Setting >
PlaybackArch of the APP
Example Arch(1)
Jump(P1)
Function CP(R)
Description Set the continuous path rate. This command is valid only when the motion mode is Go, Move,
Arc3, Circle3, or MoveJ
Example CP(50)
Move(P1)
Move(P2)
The robot moves from point P1 to point P2 with 50% Continuous path ratio
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
86
DOBOT CR5 User Guide 6 Program Language
Function LimZ(zValue)
Parameter zValue: The maximum lifting height which cannot exceed the Z-axis limiting position of the
robot
Example LimZ(80)
Command Description
Function SixForceHome
Parameter None
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
87
DOBOT CR5 User Guide 6 Program Language
Function Spiral(P, User, Tool, Direction, SpeedC, Force, Insertion, Perturn, PeckMode, MaxValue)
Description The robot arm performs a spiral motion between the current position and the specified position to
find the hole position. The specified point needs to be closer to the hole position, which is the
starting point for hole position exploration.
Do a spiral motion between the current position and P1 to find the hole position. When the
resistance in the direction of the jack is greater than the Force threshold, the robot performs a
spiral motion to explore the hole position. When the resistance in the direction of the jack is less
than the Insertion threshold, the robot moves in the direction of the jack to perform the jack work.
Function Rotation (P, User, Tool, Direction, SpeedC, Force, RotationSpeed, MaxTorque,
PeckMode, MaxValue)
Description The robotic arm rotates between the current position and the specified position to find the hole
position. The specified point needs to be close to the hole position, which is the starting point for
hole position exploration.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
88
DOBOT CR5 User Guide 6 Program Language
Example Rotation (P1, “User=1 Tool=2 Dirction=0 SpeedC =5 Force =10 RotationSpeed=5 MaxTorque=1
Do a rotation motion between the current position and P1 to find the hole position. When the
resistance in the direction of the jack is greater than the Force threshold, the robot performs a
rotation motion to explore the hole position. When the resistance in the direction of the jack is
less than the Force threshold, the robot moves in the direction of the jack to perform the jack
work.
Description The robot arm makes a linear jack movement in the direction of the hole
Do a linear jack movement at the current hole position. When the resistance in the insertion
direction is greater than the Force threshold, the insertion is considered complete.
Input/output Commands
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
89
DOBOT CR5 User Guide 6 Program Language
Command Description
NOTE
Dobot robot system supports two kinds of commands: Immediate command and queue
command:
Immediate command: The robot system will process the command once received
regardless of whether there is the rest commands processing or not in the current
controller;
Queue command: When the robot system receives a command, this command will
be pressed into the internal command queue. The robot system will execute
commands in the order in which the commands were pressed into the queue.
Function DI(index)
Return When an index is set in the DI function, DI(index) returns the status (ON/OFF) of this
speicified input port
When there is no index in the DI function, DI() returns the status of all the input ports,
which are saved in a table
For example, local di=(), the saving format is {num = 24 value = {0x55, 0xAA, 0x52}},
you can obtain the status of the specified input port with di.num and di.value[n]
Move(P1)
end
The robot moves to point P1 when the status of the digital input port 1 is ON
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
90
DOBOT CR5 User Guide 6 Program Language
ON/OFF: Status of the digital output port. ON: High level; OFF: Low level
Example DO(1,ON)
ON/OFF: Status of the digital output port. ON: High level; OFF: Low level
Example DOExecute(1,OFF)
Command Description
Function Wait(time)
Example Go(P1)
Wait(1000)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
91
DOBOT CR5 User Guide 6 Program Language
Function Sleep(time)
Speed(100)
Go(P1)
sleep(3)
Speed(100)
Accel(40)
Go(P2)
sleep(3)
end
Function Pause()
When the program runs to this command, robot pauses running and the button on the APP
Parameter None
do
Go(P1)
Go(P2)
Pause()
Go(P3)
Go(P4)
end
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
92
DOBOT CR5 User Guide 6 Program Language
Function ResetElapsedTime()
Description Start timing after all commands before this command are executed completely. Use in conjunction
with ElapsedTime() command
For example: Get the execution time that a piece of code takes
Parameter None
Return None
ResetElapsedTime()
for i=1,10 do
end
print (ElapsedTime())
Sleep(1000)
Function ElapsedTime()
Description Stop timing and return the time difference. Use in conjunction with ResetElapsedTime()
command
Parameter None
ResetElapsedTime()
for i=1,10 do
end
print (ElapsedTime())
Sleep(1000)
Function Systime()
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
93
DOBOT CR5 User Guide 6 Program Language
Parameter None
local time1=Systime()
for i=1,10 do
end
local time2=Systime()
Sleep(1000)
Function GetPose()
Description Get the current pose of the robot under the Cartesian coordinate system
If you have set the User or Tool coordinate system, the current pose is under the current User or
Tool coordinate system
Parameter None
Go(liftPose,"Speed=100 Accel=100")
Go(P1)
Function GetAngle()
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
94
DOBOT CR5 User Guide 6 Program Language
Description Get the current pose of the robot under the Joint coordinate system
Parameter None
TCP
Table 6.45 Create TCP command
IP: IP address of the server, which is in the same network segment of the client without conflict
When the robot is set as a server, port cannot be set to 502 and 8080. Otherwise, it will be in
conflict with the Modbus default port or the port used in the conveyor tracking application,
causing the creation to fail
Return err:
timeout: Wait timeout. Unit: s. If timeout is 0, the connection is still waiting. If not, after
exceeding the timeout, the connection is exited.
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
95
DOBOT CR5 User Guide 6 Program Language
4: If the robot is set as a client, it indicates that the connection is wrong. If the robot is set
as a server, it indicates that receiving data is wrong
timeout: Receiving timeout. Unit: s. If timeout is 0 or is not set, this command is a block reading.
Namely, the program will not continue to run until receiving data is complete. If not, after
exceeding the timeout, the program will continue to run regardless of whether receiving data is
complete
type: Buffer type. If type is not set, the buffer format of RecBuf is a table. If type is set to string,
the buffer format is a string
Return err:
timeout: Timeout. Unit: s. If timeout is 0 or not set, this command is a block reading. Namely,
the program will not continue to run until sending data is complete. If not, after exceeding the
timeout, the program will continue to run regardless of whether sending data is complete
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
96
DOBOT CR5 User Guide 6 Program Language
Function TCPDestroy(socket)
NOTICE
Only a single TCP connection is supported. Please start the server before connecting a
client. Please shut down the client before disconnection, to avoid re-connection failure
since the server port is not released in time.
local err=0
local socket=0
if err == 0 then
err = TCPStart(socket, 0)
if err == 0 then
local RecBuf
while true do
if err == 0 then
Go(P1) //Start to run motion commands after the server receives data
Go(P2)
print(buf)
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
97
DOBOT CR5 User Guide 6 Program Language
else
break
end
end
else
end
TCPDestroy(socket)
else
end
local err=0
local socket=0
if err == 0 then
err = TCPStart(socket, 0)
if err == 0 then
local RecBuf
while true do
if err == 0 then
Go(P1) // Start to run motion commands after the client receives the data
Go(P2)
print(buf)
else
break
end
end
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
98
DOBOT CR5 User Guide 6 Program Language
else
end
TCPDestroy(socket)
else
end
UDP
Table 6.50 Create UDP network command
IP: IP address of the server, which is in the same network segment of the client without conflict
When the robot is set as a server, port cannot be set to 502 or 8080. Otherwise, it will be in
conflict with the Modbus default port or the port used in the conveyor tracking application,
causing the creation to fail
Return err:
timeout: Receiving timeout. Unit: s. If timeout is 0 or not set, this command is a block reading.
Namely, the program will not continue to run until receiving data is complete. If not, after
exceeding the timeout, the program will continue to run regardless of whether receiving data is
complete
type: Buffer type. If type is not set, the buffer format of RecBuf is a table. If type is set to string,
the buffer format is a string
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
99
DOBOT CR5 User Guide 6 Program Language
Return err:
timeout: Timeout. Unit: s. If timeout is 0 or not set, this command is a block reading. Namely,
the program will not continue to run until sending data is complete. If not, after exceeding the
timeout, the program will continue to run regardless of whether sending data is complete
NOTICE
Only a single UDP connection is supported. Please start the server before connecting a
client. Please shut down the client before disconnection, to avoid re-connection failure
since the server port is not released in time.
local err=0
local socket=0
if err == 0 then
local RecBuf
while true do
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
100
DOBOT CR5 User Guide 6 Program Language
if err == 0 then
Go(P1) // Start to run motion commands after the server receives the data
Go(P2)
print(buf)
else
break;
end
end
else
end
local err=0
local socket=0
if err == 0 then
local RecBuf
while true do
if err == 0 then
Go(P1) // Start to run motion commands after the client receives the data
Go(P2)
print(buf)
else
break
end
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
101
DOBOT CR5 User Guide 6 Program Language
end
else
end
Modbus
Modbus Register Description
Modbus protocol is a serial communication protocol. The robot system can communicate with
external equipment by this protocol. Here, External equipment such as a PLC is set as the Modbus
master, and the robot system is set as the salve.
Modbus data is most often read and written as registers. Based on our robot memory space, we
also define four types of registers: coil, discrete input, input, and holding registers for data
interaction between the external equipment and robot system. Each register has 4096 addresses. For
details, please see as follows.
Coil register
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
102
DOBOT CR5 User Guide 6 Program Language
Input register
Holding register
Command Description
Parameter addr: Starting address of the coils to read. Value range: 0 - 4095
Return Return a table, each with the value 1 or 0, where the first value in the table corresponds to the coil
value at the starting address
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
103
DOBOT CR5 User Guide 6 Program Language
Coils = GetCoils(0,5)
Return:
Coils={1,0,0,0,0}
As shown in Table 6.52, it indicates that the robot is in the starting state
This command is not supported when the coil register address is from 0 to 5
Parameter Addr: Starting address of the coils to set. Value range: 6 - 4095
Return None
Parameter addr: Starting address of the discrete inputs to read. Value range: 0-4095
Return Return a table, each with the value 1 or 0, where the first value in the table corresponds to the
discrete value at the starting address
inBits = GetInBits(0,5)
Return:
inBits = {0,0,0,1,0}
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
104
DOBOT CR5 User Guide 6 Program Language
Description Read the input register value with the specified data type from the Modbus slave
Parameter addr: Starting address of the input registers. Value range: 0 - 4095
Empty: Read 16-bit unsigned integer ( two bytes, occupy one register)
“U16”: Read 16-bit unsigned integer ( two bytes, occupy one register)
“U32”: Read 32-bit unsigned integer (four bytes, occupy two registers)
“F32”: Read 32-bit single-precision floating-point number (four bytes, occupy two
registers)
“F64”: Read 64-bit double-precision floating-point number (eight bytes, occupy four
registers)
Return Return a table, the first value in the table corresponds to the input register value at the starting
address
data = GetInRegs(2048,1)
Description Read the holding register value from the Modbus slave according to the specified data type
Parameter addr: Starting address of the holding registers. Value range: 0 - 4095
type: Datatype
Empty: Read 16-bit unsigned integer ( two bytes, occupy one register)
“U16”: Read 16-bit unsigned integer ( two bytes, occupy one register)
“U32”: Read 32-bit unsigned integer (four bytes, occupy two registers)
“F32”: Read 32-bit single-precision floating-point number (four bytes, occupy two
registers)
“F64”: Read 64-bit double-precision floating-point number (eight bytes, occupy four
registers)
Return Return a table, the first value in the table corresponds to the input register value at the starting
address
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
105
DOBOT CR5 User Guide 6 Program Language
data = GetHoldRegs(2048,1)
Parameter addr: Starting address of the holding registers to set. Value range: 0 - 4095
type: Datatype
Empty: Read 16-bit unsigned integer ( two bytes, occupy one register)
“U16”: Set 16-bit unsigned integer ( two bytes, occupy one register)
“U32”: Set 32-bit unsigned integer (four bytes, occupy two registers)
“F32”: Set 32-bit single-precision floating-point number (four bytes, occupy two
registers)
“F64”: Set 64-bit double-precision floating-point number (eight bytes, occupy four
registers)
Return None
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
106