Universal Robots

Universal Robots (UR) can be programmed with RoboDK using two different methods: URP files and Script files.

1.图形用户界面(URP文件):使用Teach Pendant的机器人触摸屏创建URP程序。URP程序可以将一个或多个脚本文件作为子程序。在执行之前,将URP程序转换为机器人控制器幕后的脚本程序。

2.脚本文件:脚本程序使用您的脚本编程语言。像任何其他编程语言一样,UR脚本具有变量,类型,控制语句流,功能等。此外,UR脚本具有多个内置变量和功能,可以控制I/O和机器人的运动。

With RoboDK you can generate SCRIPT and URP files that can be executed by a UR robot. Additionally, it is possible to在机器人上执行程序from RoboDK if the robot is connected to the computer.

RoboDK can also import SCRIPT files to the simulator. This allows you to simulate SCRIPT programs, modify them and re-export them.

UR机器人的图形用户界面称为polyscope(如下图所示)。

Robots Universal Robots - Image 1

Retrieve the UR robot IP

The IP of the robot is required execute programs directly from the RoboDK simulator. It is also possible to transfer program files through FTP.

The IP of the robot can be retrieved from theAboutmenu in the UR’s teach pendant main screen.

Robots Universal Robots - Image 2

机器人必须通过以太网连接(直接连接或通过网络)连接到计算机。PING测试允许测试网络链接是否正确稳定。

Run Program from RoboDK

Robot drivers provide an alternative to Offline Programming (where a program is generated, then, transferred to the robot and executed). You can run a simulation from RoboDK directly on the robot (Online Programming). More information available in the机器人司机部分。

Follow these steps to connect to the robot from RoboDK:

1.右键单击Robodk中的机器人

2.Select:Robots Universal Robots - Image 3Connect to robot…

3.Enter the IP of the robot

4.SelectConnect

There should be a green message displaying准备好if the connection succeeded.

The robot can be moved by selectingGet robot joints,移动联合Move Linear,from the connection menu.

Robots Universal Robots - Image 4

There are two different methods to run the program from the PC to the robot:

1.Run on robotstep by step with feedback in RoboDK (Online Programming):
This method uses the robot as a server and each instruction is sent to the robot step by step as it is executed in the simulator. This method is useful for debugging purposes.

a.Right click the program (Print3D in this example)

b.SelectRun on robot

c.Double click the program to start it (or right click and select Run)

Once this option is checked it will connect to the real robot every time we double click a program (or right click, then, selectRun)

这些操作也可从中获得RoboDK API和它allows integrating robot programming with other applications. The API is available in Python and C# and other programming languages.

Robots Universal Robots - Image 5

2.将程序发送到机器人generates the complete program, transfers it to the robot and starts the program on the real robot (Robot Offline Programming):

a.Right click the program (Print3D in this example)

b.Select将程序发送到机器人(Ctrl+F6)

Robots Universal Robots - Image 6

How to enable Remote Control on URe

You should enable theRemote Control如果您有URE机器人(UR3E,UR5E或UR10E),则在UR机器人控制器上进行选项。

Follow these steps to enable URe’s Remote Control:

1.Select the设置menu from the top right button

2.SelectSystem-Remote Control

3.SelectEnable

4.Change the mode of operation to Remote Control

Robots Universal Robots - Image 7Robots Universal Robots - Image 8

Robots Universal Robots - Image 9

UR Monitoring

There is a macro available in the library that allow you to monitor the state of a UR robot and update the position of the real robot in RoboDK.

1.Select文件➔Open

2.加载宏ur_activatemonitoring.py.py.from: C:/RoboDK/Library/Macros/. A new Python object will we added in the station.

3.Make sure the IP of the robot is properly provided in the robot connection parameters.

4.Double click the macro to start monitoring.

The simulator will update the position of the robot and will create targets as the real robot is moved. Among other things, it is possible to monitor the robot speed, acceleration and motor currents.

Run a Program on the UR controller

Once your RoboDK simulation is ready you can generate a SCRIPT and/or a URP program. These two files can be executed by the robot controller. Follow these steps to generate a SCRIPT and a URP program from your robot simulation:

1.右键单击程序(此示例中的Print3d)

2.Select生成机器人程序F6

该程序将显示在文本编辑器中(可以在菜单中更改此行为:工具OptionsProgram)。

Robots Universal Robots - Image 10

Transferring the SCRIPT and URP files can be done through SFTP transfer or a USB drive.

How to load a URP program

The following steps summarize the procedure to load a URP file on the Universal Robots robot.

1.右键单击程序并选择选择后处理器

2.SelectUniversal Robots URP
These first 2 steps are optional as the default post also generates a URP file, however, it will allow you to generate a user-readable URP program instead of a URP program that executes a script file.

3.右键单击程序并选择生成机器人程序(F6)

4.Save the generated URP file(s) to a USB memory disk.

5.Connect the USB memory disk to the robot teach pendant (UR’s Polyscope)

6.On the robot teach pendant: Select theRuntab

7.SelectLoad Program并加载从Robodk生成的程序

8.Select the Program tab and select thePlaybutton to start it

9.选择播放按钮以启动程序。

Robots Universal Robots - Image 11Robots Universal Robots - Image 12

Robots Universal Robots - Image 13Robots Universal Robots - Image 14

How to load a Script file

The following steps and images summarize the procedure to execute a SCRIPT program on the robot. These steps are not required to run a URP program file:

1.SelectProgram Robot在教导吊坠的主屏幕上

2.SelectEmpty Program

3.Select the结构tab

4.Select the先进的tab

5.SelectScript code

6.Select文件(如图所示)

7.Select the script file generated by RoboDK

8.Select the play icon to run the program

9.Select File➔Save to save the changes

10.Finally, the program can be executed

Robots Universal Robots - Image 15Robots Universal Robots - Image 16

Robots Universal Robots - Image 17Robots Universal Robots - Image 18

Transfer a Program (FTP)

如果连接机器人和计算机,可以使用Robodk生成的脚本程序(例如,按F6)使用USB磁盘或FTP传输传输到机器人。

建议安装它filezilla客户端on the default path or directly inside the RoboDK install folder so that it is detected automatically by RoboDK:

C:\RoboDK\FileZilla FTP Client\

To transfer a file through FTP:

1.Right click a robot

2.SelectConnect to robot...

3.SelectExplore。filezilla客户端will open (software for FTP transfer).

4.Select文件➔Site Manager...

5.SelectUniversal Robot sample, 在Predefined Sites

6.SelectDuplicate。将创建通用机器人设置的副本。

7.Enter the IP of the robot (192.168.1.66 in this example).

8.SelectConnect

9.Transfer the SCRIPT file previously generated to the robot.

脚本程序通常存储在机器人控制器上的文件夹 /程序中。

Robots Universal Robots - Image 19

Update Robot Kinematics

Following the steps in this section is optional and only required under certain circumstances when accuracy is required in offline programming. This section explains how to input the unique kinematic values of your UR robot in RoboDK to accurately simulate the robot.

UR controller kinematics are unique for each robot. The kinematics are the dimensions that define the robot in the form of the DH table (Denavit Hartenberg). RoboDK simulator uses the nominal UR kinematics by default, therefore, you may see from 2 mm to 10 mm discrepancy between the simulator kinematics and the controller kinematics.

To make the simulation exactly match the real robot you can import your UR robot-specific kinematics by simply opening a URP file created with the teach pendant.

您也可以通过遵循此过程手动加载URP文件:

1.Retrieve a URP file generated using the real robot (not using RoboDK or the UR simulator)

2.Open your robot in RoboDK. You'll find your UR robot in the RoboDK library. You can also use a UR robot available in one of your existing RoboDK stations.

3.Select工具-Run Script

4.SelectUR_LoadControllerKinematics

5.Select the URP file extracted from the robot controller.

You should see a message as shown in the following image. You may see warning message if you did not load a valid URP file or you did not select the right UR robot.

Robots Universal Robots - Image 20

When this procedure is completed, you can right click a robot and selectSave as .robot。These parameters are saved with the robot file and you can use the robot file instead of repeating this procedure for every new project.

RoboDK extracts the information specific to your robot from the URP file and takes it into account for simulation and offline programming in the robot file. You can change this setting and revert to the default kinematics in the robot parameters menu as shown in the following image.

Robots Universal Robots - Image 21

You’ll notice that the Pose information displayed in the teach pendant matches the kinematics displayed in RoboDK (make sure you remove the tool frame and reference frame on RoboDK and the UR robot to make the comparison).

我们的运动学从一个机器人更改为另一个机器人,因为UR在工厂校准了每个机器人。除非您购买所谓的Absolute Accuracyoption. The Absolute Accuracy options may take into account up to 40 calibration parameters or more.

This procedure is not the same asRobodk的机器人校准。机器人校准helps improving the accuracy of the real robot.