Quick Facts of Adapter
Introduction to Adapter
Adapter is an integrated component used for communication in Mech-Center. It employs gRPC communication with Mech-Vision and Mech-Viz via Basic API interfaces, and enables communication with external devices over common industrial protocols, such as TCP/IP Socket, HTTP, and Mitsubishi PLC MC Protocol.
Adapter Functions
With Adapter, you can:
-
Control Mech-Vision and Mech-Viz internally
Category Function Mech-Vision related
Start Mech-Vision project and get vision target(s)
Set Mech-Vision Step parameter
Read Mech-Vision Step parameter
Switch Mech-Vision recipe
Mech-Viz related
Start Mech-Viz project
Stop Mech-Viz project
Set Mech-Viz Step parameter
Read Mech-Viz Step parameter
Set serial number of the gripper
Set the robot velocity
Set point cloud collision parameters
Obtain the running status of Mech-Viz
Others
Please refer to Adapter Programming Examples
-
Enable non-vision functions such as user interface customization, database creation, file reading and writing, and communication with the Web system
You will need to program in Python to enable these functions on external services.
Adapter Development
For TCP/IP Socket communication, Mech-Center provides an Adapter Generator, which helps beginners to generate an Adapter program rapidly and then build an Adapter project. Please refer to Adapter Generator Guide for detailed information.
You can program based on the generated Adapter program., or you can program Adapter from scratch. If you would like to program Adapter from scratch, please refer to Adapter Programming Guide and Adapter Programming Examples for detailed instructions.
Deployment of an Adapter Project
After programming the Adapter, you can deploy the program in the project:
-
Open Mech-Center, and click Deployment Settings in the toolbar.
-
In the Deployment Settings window, select Mech-Interface; select the Use Mech-Interface checkbox and select Adapter as the Interface Service Type.
-
Set Adapter project directory to the directory where the Adapter program is stored.
-
Set the Host Address according to the on-site situations. The port must be consistent with the peer port setting.
-
If the peer device works as the server, the Host Address parameter should be set to the IP address of the peer device.
-
If the peer device works as the client, the Host Address parameter should be set to 0.0.0.0.
-
-
Click Save and then restart Mech-Center.
-
Click Start Interface in the toolbar to enable the Adapter service.
When the Start Interface button turns to Stop Interface and the Adapter program is displayed in the Service Status panel, the Adapter service is enabled successfully.
After reading this section, you can generate your first Adapter program according to Adapter Generator Guide.