Set up Standard Interface Communication with DOBOT CR Series
This guide shows you how to set up the Standard Interface communication with a DOBOT CR Series robot.
Preparation before Loading
Check Controller and Software Compatibility
This guide shows how to use the DobotStudio Pro software to set up the Standard Interface communication between a DOBOT CR Series robot and Mech-Mind Vision System.
Please use the following controller versions and DobotStudio Pro versions. Other versions have not been tested. If you use other versions, the communication may fail to be set up.
-
Control software name and version: DobotStudio Pro v2.7.1 and later.
You can visit the official DOBOT download center, find the required DobotStudio Pro version in the Control Software section, click the icon to download the software package, and then install the software. |
-
Controller version: 3.5.6.1-stable and later.
-
Controller model: CC-162.
Check Controller Version
-
Open the installed DobotStudio Pro software and connect the robot as prompted in the selected region of the software, as shown in the following figure.
-
In the upper toolbar of the software, click the icon and select Settings.
-
In the left-side navigation pane of the Settings dialog box, select
. On the Basic tab, check the controller version in the Specification section.
Set up Network Connection
Connect the Hardware
Plug one end of the Ethernet cable into the network port of the IPC and the other end into the network port of the robot controller.
① is the network port of the robot controller.
Set the IP Address
-
In the upper toolbar of the DobotStudio Pro software, click the icon and select Settings.
-
In the left-side navigation pane of the Settings dialog box, select
. On the Communication settings tab, set the robot IP address in the IP Configuration section. To allow communication between the IPC and the robot controller, the robot IP address and the IPC IP address should reside in the same subnet. This means that the network portions and subnet masks of the IP addresses should be the same. For example, 192.168.100.2/255.255.255.0 and 192.168.100.3/255.255.255.0 are in the same subnet.
Before you perform this step, please make sure that the robot is connected in DobotStudio Pro. For information about how to connect the robot in DobotStudio Pro, see Step 1 of the Check Controller Version section. |
Load the Program Files to the Robot
-
In the main interface of DobotStudio Pro, click Script to create a script programming project. The created programming project contains two blank files: src0.lua and global.lua, as shown in the following figure.
Before you perform this step, please make sure that the robot is connected in DobotStudio Pro. For information about how to connect the robot in DobotStudio Pro, see Step 1 of the Check Controller Version section. -
Use a text editor to open the global.lua file by using the Communication Component\Robot_Interface\DOBOT\CR\global.lua path in the installation directory of Mech-Vision and Mech-Viz, and then copy all the content of the global.lua file to the global.lua file in the script programming project.
Set up Robot Communication Configuration
-
Open Mech-Vision, and you may enter different interfaces. Create a new solution according to the instructions below.
-
If you have entered the Welcome interface, click New blank solution.
-
If you have entered the main interface, click
on the menu bar.
-
-
Click Robot Communication Configuration on the toolbar of Mech-Vision.
-
In the Robot Communication Configuration window, complete the following configurations.
-
Click the Select robot drop-down menu, and select Listed robot. Click Select robot model, and select the robot model that you use. Then, click Next.
-
In the Communication mode section, select Standard Interface for Interface service type, TCP Server for Protocol, and ASCII for the protocol format.
-
It is recommended to set the port number to 50000 or above. Ensure that the port number is not occupied by another program.
-
(Optional) Select Auto enable interface service when opening the solution.
-
Click Apply.
-
-
On the main interface of Mech-Vision, make sure that the Robot Communication Configuration switch on the toolbar is flipped and has turned blue.
Test Standard Interface Communication
-
Return to the script programming interface of DobotStudio Pro, find the mm_comtest function in the gobal.lua file, and then change the IP address and port number in the mm_init_skt function to the IP address and port number of the IPC.
-
Open the src0.lua file and call mm_comtest in this file.
-
Click the enable button, as shown in the following figure, to power on the robot.
-
Click Start, as shown in the following figure, to run the current program.
-
If the following content is displayed in Mech-Vision, the communication is set up.