Standard Interface Commands
Mech-Mind Vision System provides six Standard Interface command components, as shown in the following figure.

Precautions
Configure Network Settings
For the command components dragged from the left-side Components (except for MM init), click the edit icon in the top-left corner of the component, check the Advanced option, and then set all network devices with send and recv attributes to the network devices generated by MM init. This ensures that all component network devices are consistent.
In the following figure, run_vision_recv of Run Vision is used to set the network device for run_vision_recv.

Modify Component Parameter Value
If you need to modify the value of a component parameter, see the following operations.
The following section explains how to modify the parameter value by using Run Vision component → Set_Recipe parameter group → g_mm_whether_set_recipe parameter.
-
Select mm_v201_runvis1 and click the edit icon in the top-left corner.
-
Select Set_Recipe and click the edit icon.
-
Click Select.
-
Select g_mm_whether_set_recipe and click the edit icon.
-
Modify the parameter value in the right-side section and click OK.
Initialize Communication (MM init)
This component is used to establish a network connection with the IPC. As such, this component must be placed at the beginning of the program.

Parameters
For information about how to modify the IP address and port number of an IPC, see this document.
Calibration (MM calibration)
This component is used for camera calibration and includes the entire calibration process. It has no configurable parameters.

Run Mech-Vision Project (Run Vision)
This component triggers the following operations in sequence: set the parameter recipe to be used by the Mech-Vision project (which is skipped if the project doesn’t have a parameter recipe), trigger the Mech-Vision project to run, and obtain vision result (i.e., vision points) from the vision system.

Parameters
-
config
-
g_mm_pose_type: This parameter specifies the way in which the real robot pose is sent to the Mech-Vision project. Valid values: 0, 1, and 2. The following table describes the details.
g_mm_pose_type Description Applicable scenario 0
The component does not send the robot pose to the Mech-Vision project.
This setting is recommended when the camera is mounted in eye to hand mode.
1
This component sends the current joint positions of the robot to the Mech-Vision project.
This setting should be used when the camera is mounted in eye in hand mode.
This setting is recommended for most scenarios except those involving gantry robots.
2
Specify that the robot flange pose must be input to the Mech-Vision project.
This setting is recommended for scenarios involving gantry robots.
-
g_mm_point_number: The number of vision points.
By default, the vision system sends no more than 20 vision points at a time. Therefore, the maximum default value of this parameter is 20. From the toolbar of Mech-Vision, go to
. Modify the value of max num of poses to send per time. The limit is 30. -
g_mm_project_ID: The Mech-Vision project ID.
Mech-Vision project ID, which is the number before the project name in the Project List panel in Mech-Vision.
-
-
Set_Recipe
-
g_mm_whether_set_recipe: Specify whether to set the parameter recipe. true means the parameter recipe is set, and false means the parameter recipe is not set.
-
g_mm_recipe_ID: The parameter recipe ID in the Mech-Vision project.
-
Run Mech-Viz Project (Run Viz)
This component performs the following operations in sequence: trigger the Mech-Viz project to run, set the Current Index value of index-type Step (if you do not need to specify the Current Index value in the project, you can skip this operation), specify the exit port of the Branch by Msg Step (if no Branch by Msg Step exists in the project, you can skip this operation), and return the path planned by the Mech-Viz project.

Parameters
-
Config
-
g_mm_pose_type: This parameter specifies the way in which the real robot pose is sent to the Mech-Viz project. Valid values: 0 and 1. The following table describes the details.
g_mm_runviz_pose_type Description Applicable scenario 0
The robot pose does not need to be sent to the Mech-Viz project. The simulated robot in the Mech-Viz project will move from the set home position to the first waypoint.
This setting is recommended when the camera is mounted in eye to hand mode.
1
This component sends the current joint positions and flange pose of the robot to the Mech-Viz project. The simulated robot in Mech-Viz moves from the input joint positions to the first waypoint.
This setting is recommended when the camera is mounted in eye in hand mode.
-
g_whether_after_161: Specify whether the version of Mech-Vision and Mech-Viz is later than 1.6.1. True means it is, and false means it is not.
-
-
Set_Branch
-
g_mm_whether_set_branch: Specify whether to set the exit port of the Branch by Msg Step. true indicates to set the exit port, and false indicates not to set the exit port.
-
g_mm_branch_task_ID: The Step ID the Branch by Msg Step.
-
g_mm_branch_out_port: The number of the exit port of the Branch by Msg Step to take.
-
-
Set_Index
-
g_mm_whether_set_index: Specify whether to set the Current Index value. true means the value needs to be set, and false means it does not need to be set.
-
g_mm_index_task_ID: The Step ID of the Step with the Current Index parameter.
-
g_mm_index_value: The value for the Current Index parameter.
-
Get Vision Result (Receive Vision)
This component is used to obtain the vision result from the corresponding Mech-Vision project. The sub-node it takes depends on the status code it received.

After the execution of this component is complete, the vision result returned from Mech-Vision will be stored in the global variable g_mm_socket_recv_array as a string array (string[]). You can process the data in the variable according to specific requirements.
Sub-Nodes and the Corresponding Status Codes:
Get Planned Path (Receive Viz)
This component obtains the path planned by the Mech-Viz project as a series of waypoints.

After the execution of this component is complete, the planned path returned from Mech-Viz will be stored in the global variable g_mm_socket_recv_array as a string array (string[]). You can process the data in the variable according to specific requirements.
The poses of waypoints are stored in the global variable g_mm_total_point in the form of a string array (string[]). The first 6 elements of the array represent the pose of the first waypoint, the 7th to 12th elements represent the pose of the second waypoint, and so on.
In addition, this component also provides an integer variable g_mm_recv_viz_time, which is used to record the number of times the component has been executed. This variable starts counting from 0 and corresponds to the execution of the Receive Viz component once. If the Receive Viz component is executed twice, the value of the variable will be 1.