Mitsubishi MC

This topic introduces the Standard Interface commands based on the Mitsubishi MC protocol.

Command 101: Start Mech-Vision Project

In scenarios where only Mech-Vision is used, this command starts the Mech-Vision project that executes image capturing and performs vision recognition.

Command Sent

Parameter

Address offset

Command code 101

1

Mech-Vision project ID

4

Expected number of vision points

3

Robot pose type

2

Robot pose

6-17 (JPs) or 18-29 (Flange pose)

Mech-Vision project ID

Mech-Vision project ID is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to autoloaded, or else the project ID will not be displayed.

Expected number of vision points

The expected number of vision points for Mech-Vision to send. The vision point contains the vision pose, corresponding point cloud, label, scaling, etc.

  • 0: Receive all vision points in the recognition result from Mech-Vision.

  • Integers greater than 0: Receive a specified number of vision points in the recognition result from Mech-Vision.

    • If the total number of vision points is less than the parameter value, all vision points in the recognition result will be received.

    • If the total number of vision points is greater than or equal to the parameter value, the specified number of vision points will be received.

Hint

By default, command 102 can only fetch at most 20 vision points at a time. Therefore, command 102 may need to be repeatedly executed until all the vision points required are obtained.

Robot pose type and Robot pose

  • Robot pose type indicates the type of pose of the real robot to input to Mech-Vision. The value range is 0–3.

  • The value of Robot pose depends on the value of Robot pose type.

The following table explains the relations between Robot pose type and Robot pose.

Robot pose type value

Robot pose value

Description

Applicable scenario

0

0, 0, 0, 0, 0, 0

No need to input robot pose to Mech-Vision.

Project is in the eye-to-hand mode. If the “Path Planning” Step is used, the planned path starts at the Home point set in the path planning tool.

1

Current joint positions and flange pose of the robot

Robot joint positions and flange pose must be input to Mech-Vision as the image-capturing pose.

Project is in the eye-in-hand mode. Applicable to most robots (excluding truss robots).

2

Current flange pose of the robot

Robot flange pose must be input to Mech-Vision as the image-capturing pose.

Project is in the eye-in-hand mode. The robot has no joint positions and only a flange pose (such as truss robots).

3

Joint positions at the start point of the planned path

The joint positions at the path start point must be input to Mech-Vision.

Project is in the eye-to-hand mode and the Mech-Vision project contains the “Path Planning” Step, whose start point needs to be set from the robot side.

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 1102 will be returned. Otherwise, the corresponding error code will be returned.

Command 102: Get Vision Target(s)

This command is called after Command 101: Start Mech-Vision Project to obtain the vision points output by Mech-Vision and transform the vision points into vision targets.

The transformation process, in which the pose of the vision point is transformed into the robot TCP, is as follows:

  • Rotate the poses around their Y axes by 180 degrees.

  • Determine whether the definition of the reference frame used by the robot model involves robot base height, and add a vertical offset accordingly.

Hint

By default, command 102 can only fetch at most 20 vision targets at a time. Therefore, command 102 may need to be repeatedly executed until all the vision targets required are obtained.

Command Sent

Parameter

Address offset

Command code 102

1

Mech-Vision project ID

4

Mech-Vision project ID

Mech-Vision project ID is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to autoloaded, or else the project ID will not be displayed.

Data Returned

Parameter

Address offset

Status code

100

Data transmission status

101

Number of vision targets

102

Reserved field

/

All TCPs obtained this time

104

All labels obtained this time

584

Status code

If there is no error, status code 1100 will be returned. Otherwise, the corresponding error code will be returned.

After executing this command, if the results from Mech-Vision have not been returned, this command will wait before sending the results to the robot. The default wait time is 10 seconds. If a timeout occurs, the timeout error status code will be returned.

Data transmission status

This parameter indicates whether the data returned is the new vision target.

1: The returned data is new and can be read.

Note

After the newly returned data is read, reset this parameter to 0.

Number of vision targets

The number of vision targets obtained by executing this command this time.

  • If the requested number of vision targets is greater than or equal to the number of vision points recognized by Mech-Vision, all vision points recognized by Mech-Vision will be sent.

  • If the requested number of vision targets is less than the number of vision points recognized by Mech-Vision, the requested number of vision points will be sent.

Reserved field

This field is not used. The default value is 0.

All TCPs obtained this time

The information contained in a single TCP includes pose coordinates (XYZ) and orientation Euler angles (ABC).

All labels obtained this time

The integer label assigned to the pose. If the labels in the Mech-Vision project are strings, they need to be mapped to integers by using the Label Mapping Step before being output. If there are no labels in the Mech-Vision project, the default value of this parameter is 0.

Command 103: Switch Mech-Vision Recipe

This command switches the parameter recipe used by the Mech-Vision project. It should be executed before Command 101: Start Mech-Vision Project.

Command Sent

Parameter

Address offset

Command code 103

1

Mech-Vision project ID

4

Recipe number

5

Mech-Vision project ID

Mech-Vision project ID is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to autoloaded, or else the project ID will not be displayed.

Recipe number

The ID number of the parameter recipe to switch to, i.e., the number on the left of the parameter recipe name in Project Assistance ‣ Parameter Recipe ‣ Parameter Recipe Editor in Mech-Vision.

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 1107 will be returned. Otherwise, the corresponding error code will be returned.

Command 105: Get Result of Step “Path Planning” in Mech-Vision

After executing Command 101: Start Mech-Vision Project, this command gets the collision-free planned path output by the “Path Planning” Step in Mech-Vision.

When using this command, the Port Type parameter of the “Procedure Out” Step must be set to Predefined (robot path).

Hint

Before executing command 105, please set expected number of vision points of command 101 to 0 to reduce the times of execution of command 105. If expected number of vision points of command 101 is set to 1, then every time command 105 is executed, only 1 waypoint can be returned, and command 105 must be executed multiple times to obtain all the waypoints.

Command Sent

Parameter

Address offset

Command code 105

1

Mech-Vision project ID

4

Waypoint pose type

2

Mech-Vision project ID

Mech-Vision project ID is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to autoloaded, or else the project ID will not be displayed.

Waypoint pose type

The type of waypoint pose returned by the “Path Planning” Step.

  • 1: The waypoint poses are returned in the form of JPs.

  • 2: The waypoint poses are returned in the form of TCP.

Data Returned

Parameter

Address offset

Status code

100

Data transmission status

101

Number of waypoints

102

Position of “Vision Move”

103

All waypoint poses sent this time

104

All waypoint labels sent this time

584

All waypoint velocities sent this time

624

Status code

If there is no error, status code 1103 will be returned. Otherwise, the corresponding error code will be returned.

Data transmission status

This parameter indicates whether the data returned is the new waypoint.

1: The returned data is new and can be read.

Note

After the newly returned data is read, reset this parameter to 0.

Number of waypoints

The number of waypoints obtained by executing this command this time. The value range is 0–20. If the planned path contains more than 20 waypoints, please repeat executing this command.

Position of “Vision Move”

The position of the Vision Move Step, i.e., the move to the vision pose (usually the pose for picking the object) in the entire robot motion path.

For example, if the path is composed of Steps Fixed-Point Move_1, Fixed-Point Move_2, Vision Move, Fixed-Point Move_3 sequentially, the position of Vision Move is 3.

If there is no Vision Move Step in the path, the returned value will be 0.

All waypoint poses sent this time

The Cartesian coordinates (XYZ in mm) and Euler angles (ABC in degree), or JPs (in degree). The type is determined by the waypoint pose type parameter in command 105.

All waypoint labels sent this time

The integer labels assigned to the poses. If the labels in the Mech-Vision project are strings, they need to be mapped to integers by using the Label Mapping Step before being output. If there are no labels in the Mech-Vision project, the default value of this parameter is 0.

All waypoint velocities sent this time

The velocities set in the path planning tool.

Command 201: Start Mech-Viz Project

In scenarios where both Mech-Vision and Mech-Viz are used, this command starts the Mech-Viz project that triggers the corresponding Mech-Vision project, and therefore the Mech-Viz project can plan the robot path based on the vision points received from Mech-Vision.

Command Sent

Parameter

Address offset

Command code 201

1

Robot pose type

2

Robot pose

6-17 (JPs) or 18-29 (Flange pose)

Robot pose type and Robot pose

  • Robot pose type indicates the type of the robot pose of the real robot to input to Mech-Viz. The value range is 0–2.

  • The value of robot pose depends on the value of robot pose type.

The following table explains the relations between Robot pose type and Robot pose.

Robot pose type value

Robot pose value

Description

Applicable scenario

0

0, 0, 0, 0, 0, 0

No need to input robot pose to Mech-Viz. The simulated robot in Mech-Viz moves from JPs = [0, 0, 0, 0, 0, 0] to the first waypoint.

Project is in the eye-to-hand mode. This setting is not recommended.

1

Current JPs and flange pose of the robot

Robot JPs and flange pose must be input to Mech-Viz. The simulated robot in Mech-Viz moves from the input JPs to the first waypoint.

This setting is recommended for projects in the eye-in-hand mode.

2

Specific JPs of the robot

The robot JPs of a point determined by teaching must be input to Mech-Viz. The input JPs are used to trigger Mech-Viz to plan the next path in advance while the robot is not in the camera capture region, as shown below. The simulated robot in Mech-Viz moves from the input JPs to the first waypoint.

This setting is recommended for projects in the eye-to-hand mode.

The reason for setting robot pose type to 2 when the project is in the eye-to-hand mode:

In the eye-to-hand mode, the camera can perform image capturing for the next round of path planning before the robot returns to the camera capture region and picking region, shortening the cycle time.

If robot pose type is set to 1, the robot’s current pose is sent to Mech-Viz. The simulated robot will move from the input pose to the first waypoint in the planned path, while the real robot might move to another point first, and then move to the first waypoint. Therefore, the path of the real robot may contain unpredicted collisions, leading to safety hazards.

In conclusion, robot pose type should be set to 2 for projects in the eye-to-hand mode.

../../../../../_images/robot_example.png

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 2103 will be returned. Otherwise, the corresponding error code will be returned.

Command 202: Stop Mech-Viz Project

This command stops the Mech-Viz project. This command is needed only when the Mech-Viz project falls into an infinite loop or cannot be stopped normally.

Command Sent

Parameter

Address offset

Command code 202

1

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 2104 will be returned. Otherwise, the corresponding error code will be returned.

Command 203: Select Mech-Viz Branch

This command is used to select along which branch the Mech-Viz project should proceed. Such branching is achieved by adding Branch by Msg Step(s) to the project. This command specifies which exit port such Step(s) should take. Command 201: Start Mech-Viz Project must be called BEFORE this command.

Command Sent

Parameter

Address offset

Command code 203

1

Branching Step ID

30

Exit port number

31

Branching Step ID

The Step ID (integer) of the Branch by Msg Step.

Exit port number

This parameter is used for specifying which exit port of the specified Step, i.e., the branch, the project should run along. The value should be an integer ([1, N]).

An exit port number is the 1-based index of the specified exit port on the Step. For example, if the specified exit port is the second exit port of the Step from left to right, the exit port number is 2.

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 2105 will be returned. Otherwise, the corresponding error code will be returned.

Command 204: Set Move Index

This command is for setting the index parameter of a Step that involves sequential or separate motions or operations. Steps with index parameters include Move by List, Move by Grid, Custom Pallet Pattern, Smart Pallet Pattern, etc.

Command Sent

Parameter

Address offset

Command code 204

1

Step ID

32

Index value

33

Step ID

The ID of the Step with the Index parameters. The value should be a positive integer.

Index value

The index value that should be set the next time this Step is executed.

When this command is sent, the current index value in Mech-Viz will become the parameter value minus 1.

When the Mech-Viz project runs to the Step specified by this command, the current index value in Mech-Viz will be increased by 1 to become the parameter’s value.

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 2106 will be returned. Otherwise, the corresponding error code will be returned.

Command 205: Get Planned Path

This command obtains the planned path from Mech-Viz after Command 201: Start Mech-Viz Project is executed.

By default, this command can only fetch at most 20 waypoints at a time. Therefore, it may need to be repeatedly executed until all the waypoints are obtained.

Attention

If you do not want to send a waypoint in the move-type Steps of Mech-Viz to the robot, please unselect “Send Waypoint” in Move-Type Step Common Parameters.

Command Sent

Parameter

Address offset

Command code 205

1

Waypoint pose type

2

Waypoint pose type

This parameter specifies the type of waypoint poses to return from Mech-Viz.

  • 1: The waypoint poses returned should be in JPs.

  • 2: The waypoint poses returned should be in TCP.

Data Returned

Parameter

Address offset

Status code

100

Data transmission status

101

Number of waypoints

102

Position of “Vision Move”

103

All waypoint poses sent this time

104

All waypoint labels sent this time

584

All waypoint velocities sent this time

624

Status code

If there is no error, status code 2100 will be returned. Otherwise, the corresponding error code will be returned.

Attention

When executing this command, if Mech-Viz has not returned the planned robot motion path yet, this command will wait before sending the result to the robot. The default wait time is 10 seconds. If a timeout occurs, the timeout error status code will be returned.

Data transmission status

This parameter indicates whether the data returned is the new waypoint.

1: The returned data is new and can be read.

Note

After the newly returned data is read, reset this parameter to 0.

Number of waypoints

The number of waypoints obtained by executing this command this time. The value range is 0–20. If the planned path contains more than 20 waypoints, please repeat executing this command.

Position of “Vision Move”

The position of the Vision Move Step, i.e., the move to the vision pose (usually the pose for picking the object) in the entire robot motion path.

For example, if the path is composed of Steps Fixed-Point Move_1, Fixed-Point Move_2, Vision Move, Fixed-Point Move_3 sequentially, the position of Vision Move is 3.

If there is no Vision Move Step in the path, the returned value will be 0.

All waypoint poses sent this time

The Cartesian coordinates (XYZ in mm) and Euler angles (ABC in degree), or JPs (in degree). The type is determined by the waypoint pose type parameter in command 205.

All waypoint labels sent this time

The integer labels assigned to the poses. If the labels in the Mech-Vision project are strings, they need to be mapped to integers by using the Label Mapping Step before being output. If there are no labels in the Mech-Vision project, the default value of this parameter is 0.

All waypoint velocities sent this time

The velocity in percentage set in move-type Step parameters.

Command 206: Get DO List

This command gets the planned DO signal list, which is used to control multiple grippers or multiple suction cup sections. Before executing this command, Command 205: Get Planned Path needs to be executed to obtain the planned motion path from Mech-Viz.

In the parameters of the Set DO List Step:

  • Select “Standard Interface” under “Receiver”

  • Select “Get DO List from ‘Vision Move’”

  • Select a Vision Move Step that needs the DO signal list in the drop-down list of the “Select ‘Vision Move’” parameter

Command Sent

Parameter

Address offset

Command code 206

1

Data Returned

Parameter

Address offset

Status code

100

DO signal list

664

Status code

If there are no errors, status code 2102 will be returned. Otherwise, the corresponding error code will be returned.

DO signal list

This command returns 64 DO port numbers. The valid port numbers are positive integers, from 0–999, while invalid port numbers are -1 (used as a placeholder).

As shown in the table below, the valid DO port numbers are 1, 3, 5, and 6, i.e., the values of the corresponding ports will be set to 1.

1

3

5

6

-1

-1

-1

-1

-1

-1

1st place

2nd place

3rd place

4th place

5th place

6th place

7th place

8th place

63th place

64th place

Command 501: Input Object Dimensions to Mech-Vision

This command is used for dynamically inputting object dimensions into the Mech-Vision project. Please confirm the actual object dimensions before running the Mech-Vision project.

The Mech-Vision project should contain the Read Object Dimensions Step, and the Step’s parameter Read Sizes from Properties should be selected.

Command Sent

Parameter

Address offset

Command code 501

1

Mech-Vision project ID

4

[Length, Width, Height]

34

Mech-Vision project ID

Mech-Vision project ID is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to autoloaded, or else the project ID will not be displayed.

Length, Width, Height

The object dimensions (mm) to input to the Mech-Vision project. These values will be read by the Read Object Dimensions Step.

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 1108 will be returned. Otherwise, the corresponding error code will be returned.

Command 502: Input TCP to Mech-Viz

This command is used for dynamically inputting robot TCP into the Mech-Viz project after Command 201: Start Mech-Viz Project is executed. The Step that receives the robot TCP is External Move.

Please deploy the Mech-Viz project based on the template project at xxx\Mech-Mind Software Suite-x.x.x\Mech-Center\tool\viz_project\outer_move, and add the External Move Step to a proper position in the workflow.

Command Sent

Parameter

Address offset

Command code 502

1

TCP

40

TCP

The TCP data used to set the waypoint for the Step External Move.

Data Returned

Parameter

Address offset

Status code

100

Status code

If there is no error, status code 2107 will be returned. Otherwise, the corresponding error code will be returned.

Command 901: Get Software Status

This command is designed for checking the software running status of Mech-Vision, Mech-Viz, and Mech-Center. At present, this command only supports checking whether Mech-Vision is ready for running the project.

Command Sent

Parameter

Address offset

Command code 901

1

Data Returned

Parameter

Address offset

Status code

100

Status code

1101 indicates the Mech-Vision project is ready to run, while other codes indicate that the project is not ready.