DENSO Standard Interface Commands
This section describes standard interface commands used in TCP communications between a DENSO robot and Mech-Mind Vision System. The robot (the client) sends commands to Mech-Mind Vision System (the server), and Mech-Mind Vision System returns the processed data to the robot.
Before you call the commands, take note of the following items:
-
Unit of data:
-
The unit of joint positions is degree (°).
-
A robot’s flange pose or TCP consists of the position and pose. The position is represented in XYZ coordinates and is measured in millimeters (mm); the pose is represented in Euler angles and is measured in degrees (°).
-
-
Vision point and waypoint:
-
Vision point: An object recognized by Mech-Vision. A vision point has information including the object pose, label, velocity, dimensions, and custom port output data.
-
Waypoint: Each point that the robot reaches when moving along the planned path. A waypoint has information including the robot pose, label, motion type, and velocity. Waypoints can be divided into two categories:
-
Vision Move waypoints, which refer to the waypoints corresponding to the Vision Move Step.
-
Non-Vision Move waypoints, which refer to the waypoints corresponding to Move-type Steps other than the Vision Move Step.
-
-
Close TCP Communication
This command closes the TCP communication between the robot and the vision system.
Calling Sequence
After you receive the result of the Mech-Vision or Mech-Viz project, you can call this command to close the communication and store the result in variables. If the communication is not closed for a long time, an error that indicates that communication was abnormally closed may be returned for robot programs.
Run Mech-Vision Project
Command
This command triggers the Mech-Vision project to run. When the Mech-Vision project is running, the vision system triggers the camera to capture images and then process the returned images with algorithms to produce a series of vision points or waypoints.
|
Calling Sequence
-
Vision system gets vision points and waypoints only when a Mech-Vision project is running. Therefore, call Switch Mech-Vision parameter recipe before calling Run Mech-Vision Project.
-
Vision system gets vision points and waypoints only when a Mech-Vision project is running. Therefore, call Run Mech-Vision Project before calling Get Vision Result, Get Planned Path in Mech-Vision, or Get Mech-Vision Custom Output Data.
Command Format
MM_Start_Vis job,pos_num_need,send_pos_type,JrNum
Input Parameters
job
This parameter specifies the Mech-Vision project ID. You can view the project ID of a Mech-Vision project in the Project List section of Mech-Vision. The project ID is the number before the project name.
pos_num_need
This parameter specifies the expected number of vision points or waypoints to be obtained from the Mech-Vision project. Value range: 0 to the largest positive integer.
If the Mech-Vision project has a Path Planning Step, this parameter specifies the expected number of waypoints. Otherwise, it specifies the expected number of vision points. |
-
0: Obtain all vision points or waypoints from the Mech-Vision project.
-
A positive integer: Obtain the specific number of vision points or waypoints from the Mech-Vision project.
-
If the total amount of vision points or waypoints output by the Mech-Vision project is smaller than the parameter value, this command will obtain the number of all vision points or waypoints.
-
If the total amount of vision points or waypoints output by the Mech-Vision project is larger than or equal to the parameter value, this command will obtain the number of vision points or waypoints as specified by this parameter.
-
|
send_pos_type
This parameter specifies the way in which the real robot pose is sent to the Mech-Vision project. Valid values: 0, 1, 2, and 3. The following table describes the details.
send_pos_type | Description | Applicable scenario |
---|---|---|
0 |
The command does not send the robot pose data to the Mech-Vision project. |
This setting is recommended when the camera is mounted in the Eye To Hand method. If the Path Planning Step is used in the Mech-Vision project, the starting point of the planned path will be the Home point set in the path planning tool. |
1 |
The robot joint positions and flange pose must be input to the Mech-Vision project. |
This setting is recommended when the camera is mounted in the Eye In Hand method. Applicable for most robot types except gantry robots. |
2 |
The robot flange pose must be input to the Mech-Vision project. |
This setting is recommended when the camera is mounted in the Eye In Hand method. The robot has the flange pose but no joint positions, such as a gantry robot. |
3 |
This command sends custom joint positions to the Mech-Vision project. |
This setting is recommended when the camera is mounted in the Eye To Hand method, and the Mech-Vision project contains the Path Planning Step, whose starting point needs to be set at the robot side. |
JrNum
This parameter specifies the ID of the variable J. The variable J that corresponds to the ID stores custom joint position data.
-
If send_pos_type is set to 3, the custom joint position data is sent to the Path Planning Step of the Mech-Vision project as the first waypoint.
-
If send_pos_type is set to a parameter value other than 3, the joint position data is of no practical use but the J variable ID must be set.
Get Vision Result
Command
This command obtains vision result, namely, a series of vision points, from Mech-Vision. The object pose of the vision point (namely, the output of the poses port of the Procedure Out Step) will be automatically converted to the robot’s TCP by the vision system. The process is as follows.
-
Convert the object pose from a quaternion to Euler angles.
-
Rotate the object’s pose around the X-axis by 180° to orient its Z-axis downward.
-
Add the vertical offset to fit the base point defined by the robot manufacturer.
Calling Sequence
This command should be called after Run Mech-Vision Project. After you call this command, call Store vision result or planned path (TCP-typed pose data) to access pose data.
Command Format
MM_Get_VisData Job,IrPosNum,IrStatus
Input Parameters
Job
This parameter specifies the Mech-Vision project ID. You can view the project ID of a Mech-Vision project in the Project List section of Mech-Vision. The project ID is the number before the project name.
Output Parameters
IrPosNum
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the number of vision points returned by Mech-Vision.
IrStatus
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the status code of this command. Status code 1100 is returned for a successful command execution. If a command fails to be called, a specific error code is returned. For details, see Status Codes and Troubleshooting.
By default, after the robot sends this command, the vision system returns the result in 10 seconds. If the vision system fails to return any result in 10 seconds, a timeout error code is returned. To modify the default timeout period as needed, go to in the toolbar of Mech-Vision. |
Store vision result or planned path (TCP-typed pose data)
Command
This command stores the TCP data, label, and velocity of the vision point or waypoint in the variables.
Command Format
MM_Get_Pose Serial,PrNum,IrLabel,IrSpeed
Input Parameters
Serial
This parameter specifies the index of the vision point or waypoint. The TCP data, label, and velocity of the vision point or waypoint that corresponds to the index are stored in the variables. Indexes start with 1.
Output Parameters
PrNum
The parameter specifies the ID of the variable P. The variable P that corresponds to the ID stores the TCP data of the vision point or waypoint that corresponds to the index.
IrLabel
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the label of the vision point or waypoint that corresponds to the index.
IrSpeed
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the velocity of the vision point or waypoint that corresponds to the index.
Store Planned Path (joint position-typed pose data)
Command
This command stores the joint positions, label, and velocity of the waypoint in the variables.
Command Format
MM_Get_Jps Serial,JrNum,IrLabel,Pose_Speed
Input Parameters
Serial
This parameter specifies the index of the waypoint. The joint positions, label, and velocity of the waypoint that corresponds to the index are stored in the variables. Indexes start with 1.
Output Parameters
JrNum
This parameter specifies the ID of the variable J. The variable J that corresponds to the ID stores the joint positions of the waypoint that corresponds to the index.
IrLabel
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the label of the waypoint that corresponds to the index.
Pose_Speed
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the velocity of the waypoint that corresponds to the index.
Switch Mech-Vision parameter recipe
Command
This command triggers Mech-Vision to switch the parameter recipe used by the project. The image below shows how to manually switch the parameter recipe for a Mech-Vision project. For details, see the parameter recipe guide.
Calling Sequence
This command should be called before Run Mech-Vision Project.
Command Format
MM_Set_Model Job,ModelIndex
Input Parameters
Job
This parameter specifies the Mech-Vision project ID. You can view the project ID of a Mech-Vision project in the Project List section of Mech-Vision. The project ID is the number before the project name.
ModelIndex
This parameter specifies the parameter recipe ID in the Mech-Vision project. For information about how to view the parameter recipe ID, see View the Parameter Recipe ID.
Get Planned Path in Mech-Vision
Command
This command obtains the path planned by the Mech-Vision project as a series of waypoints. The path is planned by the path planning tool, which you may enter by clicking Open the editor as shown in the image below. For details, see Path Planning.
Set the Port Type parameter of the Procedure Out Step in Mech-Vision to Predefined (robot path). |
Calling Sequence
This command should be called after Run Mech-Vision Project. After you call this command, call Store vision result or planned path (TCP-typed pose data) or Store Planned Path (joint position-typed pose data) to access pose data.
Command Format
MM_Get_VisPath Job,Jps_Pos,IrPosNum,IrVisPos_Num,IrStatus
Input Parameters
Job
This parameter specifies the Mech-Vision project ID. You can view the project ID of a Mech-Vision project in the Project List section of Mech-Vision. The project ID is the number before the project name.
Jps_Pos
This parameter specifies the type of waypoint poses to be obtained. The parameter value can be set to 1 or 2.
-
1: Joint positions. After you call this command, call Store Planned Path (joint position-typed pose data) to access joint position data.
-
2: TCP. After you call this command, call Store vision result or planned path (TCP-typed pose data) to access TCP data.
Output Parameters
IrPosNum
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the number of waypoints returned by the vision system. By default, the vision system can send 20 waypoints at most. As such, the maximum default value of this parameter is 20. To modify the default maximum number of poses to obtain each time as needed, go to
in the toolbar of Mech-Vision. The upper limit is 30.Before you call Get Planned Path in Mech-Vision, set pos_num_need of Run Mech-Vision Project to 0 to reduce the number of Get Planned Path in Mech-Vision calls. If pos_num_need of Run Mech-Vision Project is set to 1, only one waypoint is obtained each time you call Get Planned Path in Mech-Vision. You need to call Command 105 for several times to obtain all waypoints. |
IrVisPos_Num
This parameter specifies the ID of the variable I. The variable I corresponding to the ID stores the position ID of the Vision Move waypoint that corresponds to the Vision Move step of the path planning tool in the path. If the waypoint does not exist in the path, the petameter value is 0.
If the planned path consists of the following waypoints in sequence: Fixed-Point Move_1, Fixed-Point Move_2, Vision Move, and Fixed-Point Move_3, the position ID of the Vision Move waypoint is 3.
IrStatus
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the status code of this command. If the command is successfully executed, the 1103 status code is returned. If a command fails to be called, a specific error code is returned. For details, see Status Codes and Troubleshooting.
By default, after the robot sends this command, the vision system returns the result in 10 seconds. If the vision system fails to return any result in 10 seconds, a timeout error code is returned. To modify the default timeout period as needed, go to in the toolbar of Mech-Vision. |
Example
MM_Get_VisPath 2,2,51,52,53
In the preceding example, the planned path of the 2 Mech-Vision project is returned, the waypoints of the path are stored in the TCP format, the number of waypoints is stored in I51, the position IDs of Vision Move waypoints in the planned path are stored in I52, and the command execution status code is stored in I53.
Get Mech-Vision Custom Output Data
Command
This command obtains data from the custom port(s) of the Procedure Out Step in Mech-Vision. One command call saves all port data of the Procedure Out Step to robot memory.
Select the Procedure Out step, set Port Type to Custom, and then click Open the editor to go to the custom port configuration window. The Customized Keys section of the window displays custom port names, such as customeData1 and customeData2 as shown in the following figure.
|
Calling Sequence
This command should be called after Run Mech-Vision Project. After you call this command, call Store Mech-Vision custom output data to access custom output data.
Command Format
MM_Get_Dydata Job,IrPosNum,IrStatus
Input Parameters
Job
This parameter specifies the Mech-Vision project ID. You can view the project ID of a Mech-Vision project in the Project List section of Mech-Vision. The project ID is the number before the project name.
Output Parameters
IrPosNum
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the number of vision points returned by Mech-Vision.
IrStatus
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the status code of this command. If the command is successfully executed, the status code is 1100. If a command fails to be called, a specific error code is returned. For details, see Status Codes and Troubleshooting.
Store Mech-Vision custom output data
Calling Sequence
This command should be called after Get Mech-Vision Custom Output Data.
Command Format
MM_Get_DyPose Serial,PrNum,IrLabel,FrNum
Input Parameters
Serial
This parameter specifies the index of the vision point. The custom output data of the vision point that corresponds to the index is stored in the variable. Indexes start with 1.
Output Parameters
PrNum
The parameter specifies the ID of the variable P. The variable P that corresponds to the ID stores the TCP data of the vision point or waypoint that corresponds to the index.
IrLabel
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the label of the vision point that corresponds to the index. If no label ports are specified in Mech-Vision, 0 is used.
FrNum
This parameter specifies the starting ID of variable Fs. Variable Fs starting with the one with this ID sequentially store custom output data of the vision points that correspond to the specified indexes. When you set this parameter, take note of the number of custom output elements to make sure that enough variable Fs can be used to store the custom output data.
Get Gripper DO List
Command
This command obtains the control signal list for the multi-section vacuum gripper from the Mech-Viz project. This command returns 64 DO signals. The valid DO signal is a non-negative integer, ranging from 0 to 999. -1 is an invalid DO signal that serves as a placeholder. The robot applies the DO signals obtained by Set Gripper DO List as the tool.
For example, valid DO signals in the table below are 1, 3, 5, and 6, which means that the robot will set the values of these DO signals to ON.
1st |
2nd |
3rd |
4th |
5th |
6th |
7th |
8th |
… |
63rd |
64th |
1 |
3 |
5 |
6 |
-1 |
-1 |
-1 |
-1 |
… |
-1 |
-1 |
You should configure DO signals before calling this command.
-
Configure DO signals and the Set DO Step in the Mech-Viz project
-
In Mech-Viz, double-click the tool name, select Depalletizing vacuum gripper for Tool type, click Configure depalletizing vacuum gripper, and then configure the DO signal values according to needs.
-
Configure the Set DO Step
-
The Set DO Step should be after the Vision Move Step.
-
Select Standard Interface for Receiver.
-
In the Operation Mode area, select Visual Move for the Source parameter, and select the Vision Move Step that the Set DO Step is connected to for the Select Vision Move parameter. In the image below, Vision Move_1 is selected.
-
-
Calling Sequence
-
This command must be called before the Get Planned Path in Mech-Vision, Get Planned Path in Mech-Viz, or Get Vision Move Output Data or Custom Output Data command. This means that the robot must obtain the motion path and then obtain gripper DO signals of the Vision Move waypoints.
-
This command should be called before Set Gripper DO List.
Set Gripper DO List
Command
This command sets obtained DO signals to general-purpose output signals. In addition, the I/O signals of the robot must be set to the general-purpose output type (UOUT type) starting from IO24.
Calling Sequence
This command should be called after Get Gripper DO List.
Run Mech-Viz project
Command
This command triggers the Mech-Viz project to run. Mech-Viz plans the robot’s motion path based on the vision result output by Mech-Vision.
Right-click the project name in the project resource panel in Mech-Viz and select Autoload Project. |
Command Format
MM_Start_Viz Send_Pos_Type,JrNum
Input Parameters
Send_Pos_Type
This parameter specifies the way in which the real robot pose is sent to the Mech-Viz project. Valid values: 0, 1, and 2. The following table describes the details.
Robot pose type | Description | Applicable scenario |
---|---|---|
0 |
The command does not need to send the robot pose to the Mech-Viz project. The simulated robot in Mech-Viz moves from the initial pose (joint positions = [0, 0, 0, 0, 0, 0]) to the first waypoint. |
This setting is recommended when the camera is mounted in the Eye To Hand method. |
1 |
In this command, the robot sends its current joint positions and flange pose 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 the Eye In Hand method. |
2 |
In this command, the robot sends the joint positions of a teaching point (the custom joint positions), instead of the current joint positions, to the Mech-Viz project. The Mech-Viz project uses the joint positions 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 joint positions to the first waypoint. |
This setting is recommended when the camera is mounted in the Eye To Hand method. |
Why robot pose type 2 is recommended when the camera is mounted in the Eye To Hand method?
In the Eye To Hand method, the camera can perform image capturing for the next round of path planning before the robot returns to the image capture region and picking region, thus shortening the cycle time. The image below demonstrates how a robot works in the placing region.
If Send_Pos_Type is set to 1, the robot will send the current pose to Mech-Viz. It is possible that the real robot moves to other positions before reaching the first waypoint. However, the simulated robot moves directly to the first waypoint of the Mech-Viz project from the pose sent by the robot. Consequently, there may be a mismatch between the paths of the real robot and simulated robot. This mismatch can potentially lead to unpredicted safety hazards, especially if collision is detected in the path of the simulated robot.
On the other hand, if Send_Pos_Type is set to 2, the robot will send the image-capturing pose set by teaching to Mech-Viz. Thus, the real robot can trigger the next round of path planning in Mech-Viz when the real robot is in the image-capturing region and the cycle time can be shortened.
In conclusion, robot pose type should be set to 2 for projects in the Eye To Hand method.
JrNum
This parameter specifies the ID of the variable J. The variable J that corresponds to the ID stores custom joint position data.
-
If Send_Pos_Type is set to 2, the custom joint position data represented by the J variable is sent to the Mech-Viz project as the starting waypoint for planning.
-
If Send_Pos_Type is set to a parameter value other than 2, the joint position data is of no practical use but the J variable ID must be set.
Set Exit Port for Branch by Msg Step in Mech-Viz
Command
This command sets the exit port for the Branch by Msg Step. When the next Step is a Branch by Msg Step, the Mech-Viz project will wait for this command to specify the exit port.
Calling Sequence
This command should be called after Run Mech-Viz project.
Command Format
MM_Set_Branch Branch_Num,Export_Num
Input Parameters
Branch_Num
This parameter specifies the Step ID of the Branch by Msg Step. The value is a positive integer. The Step ID is displayed in the Step parameter panel. For example, the Step ID of the Step in the image above is 1.
Export_Num
This parameter specifies the exit port ID of the Branch by Msg Step. The value is a positive integer. When the parameter value is set to N, the Mech-Viz project exits from the port with an ID of N-1 of the Branch by Msg Step.
Set Current Index in Mech-Viz
Command
This command sets the value of the Current Index parameter of index-type Steps. Steps that include the Index section include Move by Grid, Move by List, Custom Pallet Pattern, and Predefined Pallet Pattern.
Calling Sequence
Index-type Steps are often preceded by a Branch by Msg Step. The robot should call commands in this order: Run Mech-Viz project, Set Current Index in Mech-Viz, and Set Exit Port for Branch by Msg Step in Mech-Viz. This is to ensure that Mech-Viz has enough time to set the Current Index value.
Command Format
MM_Set_Index Skill_Num,Index_Num
Input Parameters
Skill_Num
This parameter specifies the Step ID of the Index-type Step. The value is a positive integer. The Step ID is displayed in the Step parameter panel. For example, the Step ID of the Step in the image above is 3.
Index_Num
This parameter specifies the current index for a Index-type Step. The value is a positive integer. When this parameter value is set to N, the current index of the corresponding Step is N-1.
Get Planned Path in Mech-Viz
Command
This command obtains the path planned by the Mech-Viz project as a series of waypoints.
Waypoint: Each point that the robot reaches when moving along the planned path. A waypoint has information including the robot pose, label, motion type, and velocity. Waypoints can be divided into two categories:
|
Calling Sequence
This command should be called after Run Mech-Viz project. After you call this command, call Store vision result or planned path (TCP-typed pose data) or Store Planned Path (joint position-typed pose data) to access pose data.
Command Format
MM_Get_VizData Jps_Pos,IrPosNum,IrVisPos_Num,IrStatus
Input Parameters
Jps_Pos
This parameter specifies the type of waypoint poses to be obtained. The parameter value can be set to 1 or 2.
-
1: Joint positions. After you call this command, call Store Planned Path (joint position-typed pose data) to access joint position data.
-
2: TCP. After you call this command, call Store vision result or planned path (TCP-typed pose data) to access TCP data.
Output Parameters
IrPosNum
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the number of waypoints returned by the vision system. By default, the vision system sends no more than 20 waypoints at a time. Therefore, the maximum default value of this parameter is 20. To modify the default maximum number of poses to obtain each time as needed, go to
in the toolbar of Mech-Vision. The upper limit is 30.IrVisPos_Num
This parameter specifies the ID of the variable I. The variable I corresponding to the ID stores the position ID of the Vision Move waypoint that corresponds to the Vision Move step of the Mech-Viz project in the path. If the waypoint does not exist in the path, the petameter value is 0.
If the planned path consists of the following waypoints in sequence: Fixed-Point Move_1, Fixed-Point Move_2, Vision Move, and Fixed-Point Move_3, the position ID of the Vision Move waypoint is 3.
IrStatus
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the status code of the command. If the command is successfully executed, the status code is 2100. If a command fails to be called, a specific error code is returned. For details, see Status Codes and Troubleshooting.
By default, after the robot sends this command, the vision system returns the result in 10 seconds. If the vision system fails to return any result in 10 seconds, a timeout error code is returned. To modify the default timeout period as needed, go to in the toolbar of Mech-Vision. |
Example
MM_Get_VizData 2,51,52,53
In the preceding example, the planned path of the Mech-Viz project is obtained, the pose type of the waypoints is TCP, the number of waypoints is stored in I51, the position IDs of Vision Move waypoints in the planned path are stored in I52, and the status code of the command are stored in I53.
Get Vision Move Output Data or Custom Output Data
Command
This command obtains data output by the Vision Move Step or the custom port(s) of the “Procedure Out” Step from the Mech-Viz project. One command call stores all data in robot memory.
-
Vision Move data refers to data output by the Vision Move Step in Mech-Viz, including the labels of picked workobjects, number of picked workobjects, number of workobjects to be picked this time, edge or corner ID of vacuum gripper, TCP offset, orientation of workobject group, orientation of workobject, and dimensions of workobject group.
-
Custom output data refers to data output by the custom port(s) of the Procedure Out Step in Mech-Vision and then forwarded by Mech-Viz. Select the Procedure Out step, set Port Type to Custom, and then click Open the editor to go to the custom port configuration window. The Customized Keys section of the window displays custom port names, such as customeData1 and customeData2 as shown in the following figure.
|
Calling Sequence
This command should be called after Run Mech-Viz project.
Command Format
MM_Get_Plandata Jps_Pos,IrPosNum,IrVisPos_Num,IrStatus
Input Parameters
Jps_Pos
This parameter specifies the expected format of the returned data. The value range is 1 to 4. See the following content for details.
Parameter value of Jps_Pos | Description of expected returned data (Each field is explained below. If the Mech-Vision project does not have a custom port, no elements of custom output data are returned.) |
---|---|
1 |
Pose (joint positions), motion type, tool ID, velocity, element 1 in custom output data, … element N in custom output data |
2 |
Pose (TCP), motion type, tool ID, velocity, element 1 in custom output data, … element N in custom output data |
3 |
Pose (joint positions), motion type, tool ID, velocity, Mech-Viz Vision Move data, element 1 in custom output data, … element N in custom output data |
4 |
Pose (TCP), motion type, tool ID, velocity, Mech-Viz Vision Move data, element 1 in custom output data, … element N in custom output data |
Pose
The pose of a waypoint can be joint positions (measured in degrees) or TCP (measured in millimeters for three-dimensional coordinates and in degrees for Euler angles) of the robot.
Motion type
The motion type of the robot. Valid values: 1 and 2.
-
1: Joint motion (MOVEJ)
-
2: Linear motion (MOVEL)
Tool ID
The ID of the tool to be used at this waypoint. A value of -1 means that no tool is used at this waypoint.
Velocity
The parameter value, represented in percentage, equals the velocity set for the move-type Steps multiplied by the global velocity set in Mech-Viz.
Vision Move data
Data output by the Vision Move Step in Mech-Viz, including labels of picked workobjects, number of picked workobjects, number of workobjects to be picked this time, edge or corner ID of vacuum gripper, TCP offset, orientation of workobject group, orientation of workobject, and dimensions of workobject group.
Name | Description | Number of Elements |
---|---|---|
Labels of picked workobjects |
A label consists of 10 integers. The default value is ten 0s. |
10 |
Number of picked workobjects |
The total number of picked workobjects. |
1 |
Number of workobjects to be picked this time |
The number of workobjects to be picked this time. |
1 |
Edge or corner ID of vacuum gripper |
The ID of the edge or corner used to pick workobjects this time. |
1 |
TCP offset |
The XYZ offset between the center of the workobject group and the tool pose center. |
3 |
Orientation of workobject group |
The relative position between the workobject group and the length of the vacuum gripper. The value is 0 or 1, where 0 stands for parallel and 1 for vertical. |
1 |
Orientation of workobject |
The relative position between the length of a workobject and that of the vacuum gripper. The value is 0 or 1, where 0 stands for parallel and 1 for vertical. |
1 |
Dimensions of workobject group |
The length, width, and height of the workobject group to be picked this time. |
3 |
Elements in custom output data
The data of all custom ports of a single vision point. For example, data output from ports of the Procedure Out Step is presented in the following table. The elements in custom output data of the first vision point are [0, 0, 1] and [0, 0]; and the elements in custom output data of the second vision point are [1, 0, 0] and [1, 1].
Port name |
poses |
labels |
customData1 |
customData2 |
Output data |
[ [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0] ] |
[ "0", "1" ] |
[ [0, 0, 1], [1, 0, 0] ] |
[ [0, 0], [1, 1] ] |
First vision point |
[0, 0, 0, 1, 0, 0, 0] |
0 |
[0, 0, 1] |
[0, 0] |
Second vision point |
[0, 0, 0, 1, 0, 0, 0] |
1 |
[1, 0, 0] |
[1, 1] |
Output Parameters
IrPosNum
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the number of waypoints that are returned by the vision system.
IrVisPos_Num
This parameter specifies the ID of the variable I. The variable I corresponding to the ID stores the position ID of the Vision Move waypoint that corresponds to the Vision Move step of the Mech-Viz project in the path. If the waypoint does not exist in the path, the petameter value is 0.
If the planned path consists of the following waypoints in sequence: Fixed-Point Move_1, Fixed-Point Move_2, Vision Move, and Fixed-Point Move_3, the position ID of the Vision Move waypoint is 3.
IrStatus
This parameter specifies the ID of the variable I. The variable I that corresponds to the ID stores the status code of the command. If the command successfully obtained Vision Move output data of the Mech-Vision project, the status code is 1103. If the command successfully obtained the Vision Move output data or custom output data from the Mech-Viz project, the status code is 2100. If a command fails to be called, a specific error code is returned. For details, see Status Codes and Troubleshooting.
Example
MM_Get_Plandata 4,60,61,62
In the preceding example, the Vision Move output data or custom output data is obtained from the Mech-Viz project. The number of waypoints is stored in I60, the position IDs of Vision Move waypoints in the path are stored in I61, and the status codes of the command are stored in I62.
Store Vision Move Output Data or Custom Output Data
Command
This command stores data output by the Vision Move Step or the custom port(s) of the Procedure Out Step in the variables.
Calling Sequence
This command should be called after Get Vision Move Output Data or Custom Output Data.
Command Format
MM_Get_PlanPoseJps Serial,PJrNum,IrLabel,FrNum
Input Parameters
Serial
This parameter specifies the index the waypoint. The Vision Move output data or custom output data of the waypoint that corresponds to the index is stored in the variables. Indexes start with 1.
Output Parameters
PJrNum
The parameter specifies the ID of the variable P or J. The variable that corresponds to the ID stores the pose data of the waypoint that corresponds to the specified index.
-
If Jps_Pos is set to 1 or 3 in MM_Get_Plandata, this parameter specifies the ID of variable J.
-
If Jps_Pos is set to 2 or 4 in MM_Get_Plandata, this parameter specifies the ID of variable P.
IrLabel
This parameter specifies the starting ID of variable Is. Variable Is starting with the one with this ID sequentially store the motion types, tool IDs, velocities of the waypoints that correspond to the indexes. When you set this parameter, make sure that the first three variables that labeled with consecutive starting IDs are not affected by other factors.
FrNum
This parameter specifies the starting ID of variable Fs. The variable Fs starting with the one with this ID sequentially store Vision Move output data and custom output data of the waypoints that corresponds to the specified indexes.
Skip this parameter for non-Vision Move waypoints. In addition, when you set this parameter, take note of the total number of variables to make sure that enough variable Fs can be used to store data. Vision Move output data takes up 21 variables, and custom output data takes up condition-specific number of variables.
The following table details Vision Move output data.
Value | Description | Number of occupied variables |
---|---|---|
Labels of picked workobjects |
A label consists of 10 integers. The default value is ten 0s. |
10 |
Number of picked workobjects |
The total number of picked workobjects. |
1 |
Number of workobjects to be picked this time |
The number of workobjects to be picked this time. |
1 |
Edge or corner ID of vacuum gripper |
The ID of the edge or corner used to pick workobjects this time. |
1 |
TCP offset |
The XYZ offset between the center of the workobject group and the tool pose center. |
3 |
Orientation of workobject group |
The relative position between the workobject group and the length of the vacuum gripper. The value is 0 or 1, where 0 stands for parallel and 1 for vertical. |
1 |
Orientation of workobject |
The relative position between the length of a workobject and that of the vacuum gripper. The value is 0 or 1, where 0 stands for parallel and 1 for vertical. |
1 |
Dimensions of workobject group |
The length, width, and height of the workobject group to be picked this time. |
3 |
Example
MM_Get_PlanPoseJps 2,60,60,60
In the preceding example, the pose data, motion type, tool ID, and velocity of the second waypoint are stored in P[60], I[60], I[61], and I[62] respectively. If the waypoint is not a Vision Move waypoint, no Vision Move data is returned; if the waypoint is a Vision Move waypoint, the corresponding Vision Move output data and custom output data are stored in the numeric registers starting from F[60].
Calibration
Command
This command is used for hand-eye calibration. This command must be used together with the Camera Calibration (Standard) setting to complete automatic calibration. You can find Camera Calibration (Standard) in the toolbar of Mech-Vision. For more information, see DENSO Automatic Calibration.
Command Format
Calibration MoveType,PosJps,WaitTime,AxisNum,AxisVal,Pr_serial
Input Parameters
MoveType
This parameter specifies the motion type of the robot. Valid values: 1 and 2.
-
1: Linear motion (MOVEL)
-
2: Joint motion (MOVEJ)
PosJps
This parameter specifies the type of calibration point poses to be obtained. Valid values: 1 and 2.
-
1: TCP
-
2: Joint positions
WaitTime
This parameter specifies the time the robot waits to avoid shaking after it moves to the calibration point. The default value is 2 (s).
AxisNum
This parameter specifies the number of the robot axes.
AxisVal
This parameter specifies the external axis data. Unit: millimeters. If a 7th axis exists and is controlled by the robot on site, this parameter must be set to the specific external exist data. Otherwise, this parameter must be set to 0.
Pr_serial
The parameter specifies the ID of the variable P. The P variable that corresponds to the ID stores the pose data of the calibration point. The default value is 4, which indicates that the pose data of the P[4] calibration point is used.
Example
Calibration 2,1,2,6,0,4
In the preceding example, the pose data of the calibration point is represented in TCP. The robot moves to the calibration point based on the joint positions of the robot and then waits for 2 seconds. No external axes exist. The pose data of the calibration point is stored in P[4].