Mitsubishi MC communication configuration
About 2908 wordsAbout 10 min
Mitsubishi MC is a communication method in which PickWiz serves as the client and Robot serves as the server. When PickWiz communicates with Robot, it actively controls Robot, sends instructions to Robot, and Robot executes the instructions after receiving them.

Before configuring Robot Mitsubishi MC communication, please refer to the [Project Operation Guide] (项目操作指南.md) to create a new project, and then click Robot Configuration Panel on the main interface to enter the New Robot interface.

1. Add new Robot
(1) Enter the Add Robot interface and click +Add Robot

(2) Select Mitsubishi MC as the communication method, click Next to enter the Robot Configuration interface

2. Configure Robot
In the Robot Configuration interface, you can configure Robot information, basic communication configuration, and customized communication message configuration.

2.1 Robot information configuration

| Configuration Item | Description |
|---|---|
| Communication method | The communication protocol used to establish communication between PickWiz and Robot, which cannot be modified |
| Configuration name | The name of Robot configuration, supports Chinese and English, numbers, and characters |
| Configuration ID | The unique identification ID of the Robot configuration, which can be modified and only supports numbers |
| Brand | The brand of the Robot. If the Robot is connected to a PLC, select the brand. Other equipment |
| Model | The model of the Robot. If the Robot is connected to a PLC, select the model. Other equipment |
| Model | When selecting another device for brand and model, you need to upload the model of the device. The format of the model file is urdf |
| Number of axes | The number of axes of the robot arm owned by the Robot, optional three axes, four axes, or six axes; |
| Rotation expression | Describes Robot's posture in three-dimensional space. Currently, there are two methods: Euler Angles and rotation vector. The order of Euler Angles can be modified. |
2.2 basic communication configuration

| configuration item | Description | |
|---|---|---|
| communication address | host ip | local IP address, the default is 127.0.0.1 | in Mitsubishi MC communication mode
| port number | Robot connects to the designated port of this machine. The default port number is 6000. Generally, there is no need to modify | |
| read and write format | Euler Angles unit | Euler Angle's unit, optional angle, radian, default angle |
| length unit | Robot uses the length unit, including Robot Pose, Target size, etc. The default is mm | |
| pose type | Robot Pose representation method, default tool pose. The tool pose refers to the pose of the Robot End-effector; the joint angle refers to the pose of each joint of the Robot. The pose combination of each joint can determine the pose of the robot arm or End-effector. Robot brand and model When selecting other devices, the pose type can only select tool pose | by default |
| Retain the number of decimal places | The floating point data in theRobot instruction retains several decimal places and only supports numbers. The default is 1 | |
2.3 Custom communication message configuration

3. Mitsubishi MC instruction description
3.1 communication guarantee field
Used to monitor communication status and ensure the uniqueness of instruction execution. The text box should be filled with the address block. The address block is the area where data is stored in Robot/PLC. Each area has a corresponding address number. The read and write operations of Robot/PLC or PickWiz are to read and write data to these corresponding storage areas.

| field | Description |
|---|---|
| Heartbeat | is used to monitor communication status. When the communication between Robot/PLC and PickWiz is connected, PickWiz writes 1 to the corresponding address block; when the communication between Robot/PLC and PickWiz is disconnected (PickWiz does not write 1 for a long time), Robot/PLC writes 0 | to the address block.
| trigger | is used to indicate whether Robot/PLC triggers instructions. When Robot/PLC triggers an instruction, Robot/PLC writes 1 to the trigger address block, and PickWiz reads data from the trigger address block; when Robot/PLC receives the information that PickWiz has received the instruction (the instruction confirmer is 1), Robot/PLC writes 0 to the trigger address block to prevent Robot/PLC from triggering a second time. After PickWiz executes the instruction, PickWiz Return the visual inspection result to Robot/PLC and read data from the trigger address block. If 0 is read, Robot/PLC can read the returned visual inspection result |
| command confirmer | is used to indicate whether PickWiz has received instructions. When Robot/PLC triggers the instruction and is read by PickWiz, PickWiz writes 1 to the instruction confirmer address block to notify Robot/PLC that the instruction has been received; when PickWiz completes the instruction and confirms that Robot/PLC has reset the trigger (write 0), PickWiz synchronously resets the instruction confirmer (writes 0) to inform Robot/PLC that the instruction has been executed, and the process ends. Robot reads the returned visual inspection results and then executes the task. |
| executes the instruction | is used to indicate that Robot/PLC executes a certain instruction. When Robot/PLC needs to execute an instruction, write 100/101 to the execution instruction address block; PickWiz reads data from the execution instruction address block to understand the instruction that Robot/PLC needs to execute. 100 is the photo taking command, 101 is the cache clearing command (used when taking multiple photos) |

3.2 calibration communication message

Robot sends Robot posture to PickWiz for Eye-hand calibration and when Eye in hand triggers photography, PickWiz obtains the current Robot real-time posture.
If Pose Type is Tool Pose selected in the basic communication configuration, the current Robot End-effector's Robot pose (6-bit data) is sent to PickWiz;
If Position Type is Joint Angle in the basic communication configuration, the joint posture (6-bit data) is sent, which is used to calculate the Pick Point joint posture closest to the reference joint posture.
When Eye-hand calibration or Eye in hand triggers photography, Robot writes the current Robot real-time pose to this address block, and PickWiz reads the pose from this address block.
Robot posture is 6-bit data, and storage space for 6-bit data needs to be reserved when writing to the address block.
3.3 visual computing communication message
When the value of execution command is 100, visual calculations can be performed and the following messages will take effect; check the checkbox and the corresponding address input box will pop up below. Enter the address block. When Robot triggers the photo command, it writes data to the corresponding address block and PickWiz will read the data of the corresponding address block.

(1) Robot sent to PickWiz command
| Field | Description |
|---|---|
| Joint pose | Robot reference joint pose, 6-digit data when the pose type is joint angle, you need to input the reference joint pose, which is used to calculate the Pick Point joint pose closest to the reference joint pose |
| Target size | Target size incoming materials are Targets of multiple sizes, and Robot needs to automatically adjust the crawling strategy according to different sizes. In different Scenes, the Target size digits passed in from the Robot side are different from the Target information corresponding to the digits. The circular Scene inputs 1 digit, representing the radius; the cylindrical Scene inputs 2 digits, representing radius\height; the carton Scene inputs 3 digits, representing length\width\height; the quadrilateral Scene inputs 2 digits, representing width\length. |
| Target Size Tolerance | Target Size Tolerance The incoming materials are Targets of multiple sizes, and the Robot needs to automatically adjust the crawling strategy according to different sizes. In different Scenes, the number of digits of the Target size tolerance passed in from the Robot side is different from the Target information corresponding to the number of digits. The number of digits passed in to the circular Scene is 1, representing the tolerance of the radius; the digits passed in to the cylindrical Scene are 2 digits, representing the tolerance of radius\height; the number of digits passed in to the quadrilateral Scene is 2 bits, representing the tolerance of width\length. |
| TargetID | TargetID, used by Robot to automatically switch the crawled Target |
| TaskID | TaskID, used by Robot to automatically switch Tasks |
| Calibration ID | Calibration ID, used for Robot to automatically switch Eye-hand calibration configuration files |
| End-effectorID | End-effectorID, used to automatically switch End-effector when Robot performs tasks |
| ROI ID | ID of ROI, used by Robot to automatically switch ROI |
| Visual ParameterID | Visual ParameterID, used by Robot to automatically switch visual Parameter |
| Scene ObjectID | Scene ObjectID, used by Robot to automatically switch Scene Object |
| Photography calculation type | Photography calculation type 0: Visual calculation after taking a new picture; 1: Use the cached image (the last image collected) for visual calculation; 2: Only take a picture 3: Take a picture of "random attitude automatic sampling" 4: Real-time correction of visual drift 5: Use historical data for visual calculation 6: Shut down the industrial computer |
(2)PickWiz sent to Robot command
- Visual inspection information
| Field | Description |
|---|---|
| Photographing completion signal | Photographing completion signal, 1 bit, indicating that the photographing is completed, Robot/PLC needs to be reset after receiving it |
| Detection result signal | Visual detection signal, 1 bit, default value is 100 for success, 0 for other exceptions, customizable configuration |
| Return instance type | Return instance type. The 1-digit instance type value is 0 for Target and 1 for pallet. Different instance types have different grabbing related information |
| The number of remaining instances | The number of remaining instances, 1 digit, under the fetching logic of shoot one, grab many, returns the current number of remaining cached instances |
| Return the number of instances | Return the number of instances, 1 digit, return the number of instances identified by Instance Segmentation2D, the value is less than or equal to the number of sent instances, if there are multiple instances, the grab related information length will increase with the number of returned instances |
| Total number of instance detections | Total number of instance detections, 1 digit, number of detection instances that have not been filtered by instances |
| Number of valid instances | Number of valid instances, 1 digit, number of detected instances after instance filtering |
| Target type | The type ID that can be returned when identifying multiple Target types. |
- Automatic calibration sampling and sending instructions
When the Eye-hand calibration method is "random posture automatic sampling", you need to set this command, otherwise Robot cannot communicate with PickWiz
| Calibration sampling results: Different calibration sampling results correspond to different signal values | 0: The minimum number of samples has been reached 1: The new sample was successfully added 11: The new sample failed 12: Automatic sampling ended and the sample list was executed 13: Failed to generate the sampling attitude 14: The calibration sampling page was not entered 15: System error |
|---|---|
| The next sampling pose | The next moving position of the Robot to collect calibration samples |
Grab relevant information
General information for all Scenes
Field Description Target Category Type ID that can be returned when identifying multiple Target types. Grab TargetID 1 digit; indicates the current Target serial number Pick Point pose 6 bits; represents the Pick Point pose data Pick Point index 1 bit; indicates the current Pick Point serial number Additional information 1 bit; indicates the custom additional information of the current Target Forward point Only applicable when the pose type is Joint Angle, the length is 1 + the number of path points; the format is (number of path points, joint path point posture from pre-grab point to Pick Point) Fallback point Only applicable when the pose type is Joint Angle, the length is 1 + the number of path points; the format is (number of path points, joint path point posture from Pick Point to Fallback Pick Point) General information on carton/sack depalletizing
Product length: 1 digit, current product length (along the x direction of the image)
Product Width: 1 bit, current product width (along the y direction of the image)
Product direction: 1 bit, product orientation (0: horizontal along x, 1: vertical along y)
Position of the upper left vertex of the tray: 3 bits (x, y, z), indicating the position information of the upper left vertex of the tray in the current Scene
Position of the upper right vertex of the tray: 3 bits (x, y, z), indicating the position information of the upper right vertex of the tray in the current Scene
Position of the lower left vertex of the tray: 3 bits (x, y, z), indicating the position information of the lower left vertex of the tray in the current Scene
Position of the lower right vertex of the pallet Position: 3 digits (x, y, z), indicating the position information of the lower right vertex of the pallet in the current Scene
Carton depalletizing information:
- Product Height: 1 digit, current product height
Ordered/unordered grabbing of wafers:
- Circular Radius: 1 digit, the current product’s circular surface radius
Cylinder ordered/unordered grabbing:
Circular Radius: 1 digit, the current product’s circular surface radius
Cylinder height: 1 digit, current product height
Unordered fetching:
- Target category: 1 digit, current Target category
quadrilateral:
Quad length: 1 digit, current product length
Quad width: 1 bit, current product width
Visual Status Code
Visual status codes are used for troubleshooting. The complete status codes are as follows:
You need to check "Visual Status Code" in PickWiz Send to Robot Command-Visual Detection Information, and configure the address block and communication data type.
If there is no custom configured visual status code, the default value is to return
100on success and0for other exceptions.
| Error content | Default value | Related nodes |
|---|---|---|
| Success | 100 | / |
| Detect base plate | 301 | Foreground Builder |
| Container frame not detected | 4000 | Container frame detection (Container Builder) |
| Instance not detected | 5000 | Instance Segmentation(Instance Builder) |
| No pose detected | 6000 | Pose Estimation (Pose Builder) |
| Pick Point not detected | 7000 | Pick Point Generation (Grasp Builder) |
| No path detected | 8000 | Robot Trajectory Builder (Trajectory Builder) |
| Instance size not detected | 9000 | Target Size Builder (Size Builder) |
| Empty ROI | 1101 | ValidPoints Criteria |
| No valid instance | 12000 | Instance Criteria |
| No valid Target pose | 13000 | Pose Criteria |
| No valid Pick Point | 14000 | Pick Point filter (Grasp Criteria) |
| All detection results are collision-uncatchable | 15000 | Collision detection filter (Collision Criteria) |
| No instance with valid size | 17000 | Target size filter (Size Criteria) |
| Exception | 20000 | General exception error, please check the log to confirm |
| Insufficient video memory | 20001 | General exception error, please check the log to confirm |
| Invalid input (please check the algorithm Parameter) | 20002 | General exception error, please check the log for confirmation |
| Full inspection | 20003 | Point Cloud processing operator related (full_detect_judgment) |
| Foreign object detection anomaly | 20004 | Instance filter operator related (foreign_matter_judgement) |
4. Edit, copy, and delete Robot
(1) Edit Robot configuration
In the Add Robot interface, left-click the Robot configuration to edit the selected Robot configuration.

(2) Copy Robot configuration
Right-click the Robot configuration on the Add Robot interface to copy the selected Robot configuration.

(3) Delete Robot configuration
Right-click the Robot configuration on the Add Robot interface to delete the selected Robot configuration.

5. Select Robot configuration
After completing the Mitsubishi MC communication configuration, you can select the Robot configuration for the current TaskScene in the Task main interface and select the corresponding Robot configuration in the Robot configuration selection column. PickWiz will try to establish communication with the Robot through the Mitsubishi MC communication protocol.

If the communication connection is successful, the Robot communication connection status in the lower left corner of the main interface will display "Connected".

If the communication connection fails, the Robot communication connection status displays "Not Connected". Please check whether the network cable between the Robot and the industrial computer is firmly connected, whether the program loaded and run by the Robot system is correct, and then reconfigure the Robot.
