Dobot installation and setup
The Pickit integration for Dobot robots is a set of DobotStudio Pro project scripts that communicate with the Pickit processor over TCP/IP. Pickit acts as the server on port 5001, the robot controller connects to it as a client. This page describes how to install and set up the integration on the robot controller via Dobotstudio Pro.
Compatibility and requirements
Robot / controller |
Dobot robot with V4 controller |
DobotStudio Pro |
4.6.4 or newer |
Pickit |
3.4 or newer (for Protocol 12) |
If your project requires other Dobot series or controller versions, or older Pickit systems, please contact our support team.
Before starting the installation, make sure that:
DobotStudio Pro is installed on a PC or tablet, and is connected to the robot.
You can access the Administrator role in Dobotstudio Pro. This is needed to run the background service.
Setting up the network connection
Connect via Ethernet the LAN1 port of the controller to the Pickit processor ROBOT port as described here.
The controller LAN1 port and the Pickit ROBOT port must have a different IP address in the same subnet. By default, they are not in the same subnet: the Pickit ROBOT port uses 169.254.5.180 and the controller LAN1 port uses 192.168.5.1. Change one of the two:
The Pickit ROBOT port address is changed from the Pickit web interface, as described here.
The controller LAN1 address is changed in DobotStudio Pro, under Settings > Communication.
Loading the integration files
Download the Pickit Dobot integration files here.
Copy the files to your PC or tablet where DobotStudio Pro is installed, and unzip them.
The package contains five DobotStudio Pro script projects, every script project contains a src0.lua file, a global.lua file, and three json files (for pose data).
The example programs are in the example_programs folder.
In every example program, the Pickit API functions are defined in the global.lua file, and the application logic is defined in the src0.lua file.
Project |
Contents |
|---|---|
|
The background service, which handles all TCP/IP communication with Pickit. It needs to be set up once per robot. |
|
Example program for multi-pose robot-camera calibration. |
|
Example program for simple pick and place. |
|
Example program for bin picking, with a reachability check and a pick check. |
|
Example program that follows a path taught relative to the detected part. |
Creating the global variables
Robot application programs and the background service exchange data through four controller global variables. Create them once per robot: in DobotStudio Pro, go to Monitor > Global variable and click New for each of the following variables. Enable Global Persistence for all four variables, and enter the names exactly as shown (they are case sensitive).
Name |
Type |
Initial value |
|---|---|---|
|
string |
|
|
string |
|
|
number |
|
|
number |
|
Enter the initial values of PickitRequest and PickitResponse as comma-separated numbers, without brackets or spaces.
Installing the background service
The background service runs on the controller as a DobotStudio Pro background process. It keeps running as long as the robot is powered on, independently of the robot programs and of robot errors.
Import the project
In DobotStudio Pro, go to Application > Script programming.
Open the File menu and import the
pickit_backgroundfolder as a new project (Open > Import project).At the top of
src0.lua, setPICKIT_HOSTto the IP address of the Pickit ROBOT port. This address is shown in the Pickit web interface, as described here.-- Set the correct Pickit Robot port IP address here (see Pickit web interface) local PICKIT_HOST="169.254.5.180"
Save the project as
pickit_backgroundand close it in the editor.
Run the background process
On the DobotStudio Pro homepage, switch the role to Administrator.
Go to Settings > Background Process and click Add file.
Select the
pickit_backgroundproject and click Select.Click Run to start the process.
Note
Pickit always receives the robot flange pose in the robot base frame. Tool coordinate system 0 must be the flange, without offset, and user coordinate system 0 must be the robot base. This is already the case by default. Your robot application programs can use any tool and user coordinate system.
Verifying the communication
Make sure Pickit is powered on, then check that:
In DobotStudio Pro, in Monitor > Global variable,
PickitReadyis1andPickitHeartbeatkeeps changing (this is the current unix timestamp).On the Pickit web interface, the robot connection symbol is shown in the top bar.
When moving the robot, the robot flange frame moves in the 3D view.
Troubleshooting:
If PickitHeartbeat does not change, the background service is not running.
Check its status in Settings > Background Process.
When the service starts, it logs Pickit background service started in the DobotStudio Pro user log.
If PickitReady stays at 0, the background service runs but cannot reach Pickit.
Check the network cable, the IP configuration, and the PICKIT_HOST value.
The background service retries every second, so it connects as soon as the cause is solved.
The connection to the robot can also be pinged from the Pickit side via the web interface: Testing the Robot to Pickit connection.
Using the example programs
Import the example programs from the example_programs folder in Application > Script programming, the same way as pickit_background, but these are regular robot application programs.
The example programs contain points like Dropoff and Detect that need to be taught for your specific cell.
The documentation for each example program states which points need to be taught.
Only one program may use Pickit at a time. A communication problem stops the program with an error.
The example programs are explained in detail in the following articles:
Using Pickit in your own program
The Pickit API functions are defined in the global.lua file of the example projects, and are documented in Dobot Pickit interface.
To use them in your own program, copy global.lua from an example project into the global.lua file of your project, and add your own variables or functions below it if needed.
The following example snippet chooses a Pickit configuration, detects objects and moves to the first pick pose. The terms starting with pickit_ are Pickit API functions, the rest are standard DobotStudio Pro functions:
pickit_configure(1, 1)
MovJ(Detect, {cp = 0})
Wait(200)
pickit_find_objects_with_retries(5)
if pickit_get_result() then
MovL(PickitPick, {user = 0, tool = 1, cp = 0})
end