Yaskawa
Yaskawa
Yaskawa
Mech-Mind
i
Mech-Mind User’s Manual
CONTENTS 1
CHAPTER
ONE
This topic introduces the process of setting up the Standard Interface communication with a YASKAWA
robot.
The process consists of the following steps:
Note: A USB 2.0 flash drive is recommended. Otherwise, the robot controller may not recognize the flash
drive.
• Option function requirements: must have the MotoPlus and Ethernet functions enabled.
Note: The following instructions are based on YRC1000 controller. Details may differ for DX200 controller.
2
Mech-Mind User’s Manual
Note:
• LAN1 port on YRC1000 and CN105 port on DX200 are for connecting the teach pendant
only.
• If LAN2 port is occupied, please use LAN3 (CN107) instead.
1.2.2 IP Configuration
To allow communication between the IPC and the robot controller, both must have an IP address in the
same subnet. This means that the first three numbers of the IP addresses should be the same. For
example, 192.168.100.1 and 192.168.100.2 are in the same subnet.
1. Press MAIN MENU when powering on the controller to enter the maintenance mode.
Note: If the robot is already powered on, please shut it off and power it on again while pressing
MAIN MENU.
3. Enter the password (the default password is sixteen 9 ‘s), and then press on Enter.
5. In IP ADDRESS SETTING(LAN2), select MANUAL SETTING, and then set the IP ADDRESS to one in
the same subnet as the IPC, and the SUBNET MASK to 255.255.255.0.
6. Press the ENTER key, and then press on YES in the pop-up message.
Attention: Before you start loading the program files to the robot, please perform file backup as
needed. For detailed instructions, please refer to the operator’s manual of the YASKAWA controller.
The program files are stored in the installation directory of Mech-Mind Software Suite.
Navigate to xxx\Mech-Mind Software Suite-x.x.x\Mech-Center\Robot_Interface\YASKAWA, and copy the
following files to your flash drive。
• JBI folder
• mm_module_yrc1000.out if you are using a YRC1000 controller
• mm_module_dx200.out if you are using a DX200 controller
Note: Copy the file to the root directory of the flash drive. Do not put it in another folder or rename it.
1. Insert the flash drive into the USB port on the back of the teach pendant.
2. Under maintenance mode, select MotoPlus APL. → DEVICE.
6. After loading completes, go to MotoPlus APL. → FILE LIST, and you should see
mm_module_yrc1000.out (mm_module_dx200.out) displayed.
1. Restart the controller without pressing the MAIN MENU key, and select SYSTEM INFO → SECURITY
→ MANAGEMENT MODE.
2. Enter the password (the default password is sixteen 9 ‘s), and then press on Enter.
3. Press on the right arrow button, and select SETUP → TEACHING COND.
5. Select EX. MEMORY → DEVICE, and then select USB:Pendant for DEVICE.
6. Select EX. MEMORY → FOLDER, and then select JBI from the list.
Note: Make sure you are IN the JBI folder (JBI is displayed after TARGET FOLDER).
8. Select EDIT → SELECT ALL, and then press ENTER. Select YES in the pop-up message to start loading
the programs.
9. After loading completes, go to JOB → SELECT JOB, and you should see all the job files displayed.
2. Select MM_AUTO_CALIB in the JOB LIST, and then press the SELECT key.
3. Change the IP address and port number in line 0001 to the actual ones of the IPC:
1. Move the cursor to the instruction side of line 0001, and press SELECT. a text box will show on
the bottom.
2. In the text box, move the cursor to the IP address and port number, and press ENTER.
3. Change the IP address and port number, and then press on Enter.
4. Insert a PAUSE command after line 0001: make sure the cursor is on line 0001, and press INFORM
LIST. Select CONTROL → PAUSE in the pop-up menu, and press INSERT and then ENTER.
5. Turn the mode switch to TEACH mode, press the SERVO ON READY key, and then hold down the
enable switch on the back while moving the cursor back to line 0000.
6. Press the INTERLOCK key and TEST START key at the same time; the job will start running and should
be paused after line 0001.
7. The robot can be connected successfully if the Console tab of Mech-Vision Log panel displays mes-
sages indicating the client is connected.
Note: Delete PAUSE after testing the connection to avoid pausing the robot by mistake during calibration.
TWO
This topic introduces the process of automatic hand-eye calibration when a YASKAWA robot communi-
cates with Mech-Mind Vision System through Standard Interface.
The process consists of the following steps:
19
Mech-Mind User’s Manual
2. Select MM_AUTO_CALIB in the JOB LIST, and then press the SELECT key.
3. Change the value of P099 to the current pose of the robot: press SERVO ON READY key, and then
press MODIFY and then ENTER while holding down the enable switch on the back. Make sure the
value for TOOL is 00.
1. Move the cursor back to line 0000, and turn the mode switch to PLAY mode, and press the SERVO
ON READY key.
2. To move the robot at low speed, go to UTILITY → SETUP SPECIAL RUN, and change SPEED LIMIT
to VALID.
3. Press the START button. The program starts to run when the button lights up.
4. Proceed to the next section when the following message is displayed in the Console tab of Mech-
Vision Log panel:
Entering the calibration process, please start the calibration in Mech-Vision
Note: If the robot does not reach the next calibration point within 60 seconds, Mech-Vision will report
a timeout error and stop the calibration process. In such cases, please select calibration in the program
directory and run this program again, and restart the calibration process in Mech-Vision.
THREE
NOP
'*****************************
'FUNCTION:simple pick and place
'with Mech-Vision
'mechmind, 2022-5-27
'*****************************
'clear I50 to I69
CLEAR I050 20
'Initialize p variables
CNVRT PX070 PX070 RF
CNVRT PX071 PX071 RF TL#(1)
SUB P070 P070
SUB P071 P071
'set 200mm to Z
SETE P070 (3) 200000
'move to the home position
MOVJ C00000 VJ=80.00
'move to the camera position
MOVJ C00001 VJ=80.00 PL=0
'set ip address of IPC
CALL JOB:MM_INIT_SOCKET ARGF"192.168.170.22;50000;1"
TIMER T=0.20
CALL JOB:MM_OPEN_SOCKET
'set vision recipe
CALL JOB:MM_SET_MODEL ARGF"1;1"
TIMER T=0.20
'Run vision project
CALL JOB:MM_START_VIS ARGF"1;2;2"
TIMER T=1.00
'get result from Vis
CALL JOB:MM_GET_VISDATA ARGF"1;50;51;52"
TIMER T=0.20
PAUSE IF I052<>1100
'set the first pos to P071;
'set lables to I61;
'set speed to I62;
CALL JOB:MM_GET_POSE ARGF"1;71;61;62"
PAUSE IF I061<>1
(continues on next page)
24
Mech-Mind User’s Manual
Change TL#(1) to the tool number to which the actual TCP is saved.
Z-offset indicates the distance relative to the tool frame from the picking pose. It is used to ensure that
collision doesn’t occur when the robot is approaching or departing the picking pose.
Adjust the following commands according to your actual needs.
• SFTON P070: the Z-offset when approaching the picking pose is stored in P070 (200 mm). Robot
will move to 200 mm above P071, which is the picking pose.
Intermediate points are between the picking pose and placing pose and are used to ensure that the robot
doesn’t collide with the surrounding when moving between the picking and placing poses.
Record the intermediate point to C00002. You can add more intermediate points if needed.
Modify DOUT OT#(1) ON to the actual logic for controlling the tool action when picking the object.
Modify DOUT OT#(1) OFF to the actual logic for controlling the tool action when placing the object.
'*****************************
'FUNCTION:simple pick and place
'with Mech-Viz
'mechmind, 2022-5-27
'*****************************
'clear I50 to I69
CLEAR I050 20
'Initialize p variables
CNVRT PX070 PX070 RF
CNVRT PX071 PX071 RF TL#(1)
SUB P070 P070
SUB P071 P071
'set 200mm to Z
SETE P070 (3) 200000
'move to the home position
MOVJ C00004 VJ=80.00
'move to the camera position
MOVJ C00005 VJ=80.00 PL=0
'set ip address of IPC
CALL JOB:MM_INIT_SOCKET ARGF"192.168.170.22;50000;1"
TIMER T=0.20
CALL JOB:MM_OPEN_SOCKET
'set vision recipe
CALL JOB:MM_SET_MODEL ARGF"1;1"
TIMER T=0.20
'Run Viz project
CALL JOB:MM_START_VIZ ARGF"1"
TIMER T=0.20
CALL JOB:MM_SET_BRANCH ARGF"1;1"
'get result from Viz
TIMER T=1.00
CALL JOB:MM_GET_VIZDATA ARGF"2;50;51;52;53"
TIMER T=0.20
PAUSE IF I053<>2100
'set the first pos to P071;
'set lables to I61;
'set speed to I62;
CALL JOB:MM_GET_POSE ARGF"1;71;61;62"
PAUSE IF I061<>1
SFTON P070
MOVJ P071 VJ=50.00
SFTOF
MOVL P071 V=80.0 PL=0
'enable girpper
DOUT OT#(1) ON
SFTON P070
MOVJ P071 VJ=50.00
SFTOF
MOVJ C00006 VJ=80.00
'drop point
MOVJ C00007 VJ=80.00 PL=0
'release gripper
DOUT OT#(1) OFF
(continues on next page)
Change TL#(1) to the tool number to which the actual TCP is saved.
Z-offset indicates the distance relative to the tool frame from the picking pose. It is used to ensure that
collision doesn’t occur when the robot is approaching or departing the picking pose.
Adjust the following commands according to your actual needs.
• SFTON P070: the Z-offset when approaching the picking pose is stored in P070 (200 mm). Robot
will move to 200 mm above P071, which is the picking pose.
Intermediate points are between the picking pose and placing pose and are used to ensure that the robot
doesn’t collide with the surrounding when moving between the picking and placing poses.
Record the intermediate point to C00006. You can add more intermediate points if needed.
Modify DOUT OT#(1) ON to the actual logic for controlling the tool action when picking the object.
Modify DOUT OT#(1) OFF to the actual logic for controlling the tool action when placing the object.
'*****************************
'FUNCTION:105_GET_VISPATH
'with Mech-Vision
'mechmind, 2023-1-9
'*****************************
'clear I50 to I69
CLEAR I050 20
'Initialize p variables
CNVRT PX070 PX070 RF TL#(1)
CNVRT PX071 PX071 RF TL#(1)
CNVRT PX072 PX072 RF TL#(1)
SUB P070 P070
SUB P071 P071
SUB P072 P072
(continues on next page)
Change TL#(1) to the tool number to which the actual TCP is saved.
Intermediate points are between the picking pose and placing pose and are used to ensure that the robot
doesn’t collide with the surrounding when moving between the picking and placing poses.
Record the intermediate point to C00010. You can add more intermediate points if needed.
Modify DOUT OT#(1) ON to the actual logic for controlling the tool action when picking the object.
Modify DOUT OT#(1) OFF to the actual logic for controlling the tool action when placing the object.
FOUR
• Initialize Communication
• Start TCP Socket
• Close TCP Socket
• Start Mech-Vision Project
• Get Vision Target(s)
• Start Mech-Viz Project
• Get Planned Path
• Obtain Pose
• Obtain Joint Positions
• Switch Mech-Vision Recipe
• Select Mech-Viz Branch
• Set Move Index
• Get Software Status
• Input Object Dimensions to Mech-Vision
• Get DO Signal List
• Input TCP to Mech-Viz
• Calibration
• Get Vision Result from Mech-Vision
• Save Vision Point to Specified Variables
• Get Waypoint from Mech-Viz
• Save Waypoint to Specified Variables
• Get Result of Step “Path Planning” in Mech-Vision
33
Mech-Mind User’s Manual
• When calling jobs: input parameter is a string by default; output parameter is a string by default,
each element in the string corresponding to a global variable in the background.
Attention:
• For Mech-Mind Software Suite prior to version 1.6.1, every Standard Interface job encapsulates
codes that initialize the communication and disconnect the communication.
• For Mech-Mind Software Suite 1.6.1 and above, the following changes have been made:
– To facilitate testing, only MM_INIT_SOCKET keeps codes used for communication estab-
lishment and disconnection. The MM_INIT_SOCKET job only needs to be called once be-
cause the set IP address will be valid globally from then on.
– Codes used for communication establishment and disconnection are divided into two
individual jobs, which are MM_OPEN_SOCKET and MM_CLOSE_SOCKET. The com-
munication is established when MM_OPEN_SOCKET is called and remains alive until
MM_CLOSE_SOCKET is called to disconnect it. With these two jobs, frequent reconnec-
tion of communication between the robot and the vision system can be avoided.
MM_INIT_SOCKET ("IP_Address;Server_Port;Time_Out")
This job sets the IP address and port number of the IPC and wait time before the program stops trying to
establish the communication.
4.1.1 Parameters
• Input parameters
Name Description
IP_Address IP address of the IPC
Server_Port Port number of the IPC, the default is 50000
Time_Out Wait time in minutes before stopping connection attempt
4.1.2 Example
This example sets the IP address and port number of the IPC to 192.168.1.1:50000 and wait time to 5
minutes.
MM_OPEN_SOCKET
This job begins the communication between the robot and the vision system. The MM_INIT_SOCKET job
should be called before this job to set the IP address and port number of the IPC correctly.
4.2.1 Parameters
No parameters.
4.2.2 Example
CALL JOB:MM_OPEN_SOCKET
MM_CLOSE_SOCKET
This job shuts down the TCP/IP socket and therefore ends the the communication between the robot and
the vision system. You can call this job after all the vision tasks are completed.
4.3.1 Parameters
No parameters.
4.3.2 Example
CALL JOB:MM_CLOSE_SOCKET
MM_START_VIS ("Job;Pos_Num_Need;SendPos_Type;prNum")
This job is for applications that use Mech-Vision but not Mech-Viz. It runs the corresponding Mech-Vision
project to acquire and process data.
4.4.1 Parameters
• Input parameters
Name Description
Job Mech-Vision Project ID, from 1 to 99
Can check and adjust in Mech-Vision
Pos_Num_NeedNumber of vision points for Mech-Vision to send, from 0 to 20, where 0 means
“send all”
SendPos_TypeSet the robot pose to send to Mech-Vision, from 0 to 2
See the following table for explanations of the 4 values
prNum P variable for storing the joint positions of the start point when SendPos_Type = 3
The data type of the P variable should be set to PULSE, otherwise the
“MM:PVAR_SET_ERROR” will be raised
4.4.2 Example
This example runs Mech-Vision project No. 1, and asks the project to send over 1 vision point, and the
robot sends its current joint positions and flange pose when this job is called as the image-capturing pose.
MM_GET_VISDATA ("Job;Last_Data;Pos_Num;MM_Status")
This job is for applications that use Mech-Vision but not Mech-Viz. It obtains the vision result from the
corresponding Mech-Vision project.
Note: If custom outputs are defined in the “procedure_out” Step in the Mech-Vision project, use
MM_GET_DYDATA to obtain the vision result instead.
4.5.1 Parameters
• Input parameter
Name Description
Job Mech-Vision Project ID, from 1 to 99
Can check and adjust in Mech-Vision
• Output parameters
Name Description
Last_Data I variable, indicating whether all vision points have been sent, 0 or 1
0: NOT all vision points have been sent (more on the way) 1: All vision points have been
sent If 0, call this JOB again until all are sent
Pos_Num I variable for storing the number of received vision points
MM_StatusIvariable for storing status code. Please see standard_interface_status_codes.
4.5.2 Example
This example obtains the vision result from Mech-Vision project No. 1. Whether all vision points have
been sent is stored in I50, the number of vision points received is stored in I51, and the status code is
stored in I52.
MM_START_VIZ ("SendPos_Type;prNum")
This job is for applications that use both Mech-Vision and Mech-Viz. It runs the corresponding Mech-Viz
project (which triggers the corresponding Mech-Vision project to run), and sets the initial joint positions
of the simulated robot in Mech-Viz.
Note: Only the poses and their corresponding labels and velocities are obtained by this job. If any other
type of data are needed, such as custom outputs from Mech-Vision project or depalletizing planning data,
use MM_GET_PLANDATA to obtain the planned path instead.
4.6.1 Parameter
• Input parameter
Name Description
SendPos_TypeSet the initial pose for the simulated robot in Mech-Viz, from 0 to 2
See the following table for explanations of the 3 values
prNum P variable for storing the joint positions of the start point when SendPos_Type = 2
The data type of the P variable should be set to PULSE, otherwise the
“MM:PVAR_SET_ERROR” will be raised
Note: When the scene contains objects that obstruct the robot to move from [0,0,0,0,0,0] to the first
waypoint, this parameter should not be set to 1.
4.6.2 Example
This example runs the corresponding Mech-Viz project, and sets the initial joint positions of the simulated
robot to the current joint positions of the real robot.
MM_GET_VIZDATA ("GetPos_Type;Last_Data;Pos_Num;VisPos_Num;MM_Status")
4.7.1 Parameters
• Input parameter
Name Description
GetPos_Type Whether Mech-Viz should send waypoint poses as joint positions or TCPs, 1 or 2
1: Mech-Viz sends joint positions 2: Mech-Viz sends TCPs
• Output parameters
Name Description
Last_Data
I variable, indicating whether all waypoints have been sent, 0 or 1
0: NOT all waypoints have been sent (more on the way) 1: All waypoints have been sent
If 0, call this JOB again until all are sent
Pos_NumI variable for storing the number of received waypoints
VisPos_Num
I variable for storing the position of the first visual_move waypoint in the path
Example path: Move_1, Move_2, Vision Move_3, Move_3, Vision Move_2 In this path, the
position of the first Vision Move waypoint is 3. If the path does not contain Vision Move
waypoint, the return value is 0.
MM_Status
I variable for storing status code. Please see standard_interface_status_codes.
4.7.2 Example
This example obtains the planned path from Mech-Viz in the form of TCPs. Whether all waypoints have
been sent is stored in I50, the number of waypoints received is stored in I51, the position of the visual_move
waypoint is stored in I52, and the status code is stored in I53.
MM_GET_POSE ("Index;PosTarget;Label;Pose_Speed")
This job stores a vision pose returned by Mech-Vision or a waypoint pose (as TCP) returned by Mech-Viz
in the specified variable.
4.8.1 Parameters
• Input parameter
Name Description
Index Specify the index of the pose to be stored
• Output parameters
Name Description
PosTarget P variable for storing the specified pose
Label I variable for storing the label corresponding to the specified pose
Pose_Speed I variable for storing the velocity corresponding to the specified pose
4.8.2 Example
This example stores the first received pose to P60, the corresponding label to I61, and the corresponding
velocity to I62.
MM_GET_JPS ("Index;JointTarget;Label;Pose_Speed")
This job stores a set of joint positions returned by Mech-Viz in the specified variable.
Note: As Mech-Vision does not output joint position data, this job can only be used with Mech-Viz.
4.9.1 Parameters
• Input parameter
Name Description
Index Specify the index of the set of joint positions to be stored
• Output parameters
Name Description
JointTarget P variable for storing the specified set of joint positions
Label I variable for storing the label corresponding to the specified set of joint positions
Pose_Speed I variable for storing the velocity corresponding to the specified set of joint posi-
tions
4.9.2 Example
This example stores the first set of received joint positions to P60, the corresponding label to I61, and the
corresponding velocity to I62.
MM_SET_MODEL ("Job;Model_Number")
This job specifies which parameter recipe of the Mech-Vision project to use. For more information on
parameter recipe, please see parameter_recipe_configuration.
Note:
• This job must be called BEFORE MM_START_VIS.
• The corresponding Mech-Vision project must have parameter recipes already configured and saved.
4.10.1 Parameters
• Input parameters
Name Description
Job Mech-Vision Project ID, from 1 to 99
Can check and adjust in Mech-Vision
Model_Number The number of a parameter recipe in the Mech-Vision project, from 1 to 99
4.10.2 Example
This example switches the parameter recipe used to No. 1 in Mech-Vision project No. 1.
MM_SET_BRANCH ("Branch_Num;Exit_Num")
This job 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 job specifies which exit port such Step(s)
should take.
Note:
• MM_START_VIZ must be called BEFORE this job.
• When the next Step to be executed in Mech-Viz is a branch_by_msg Step, Mech-Viz will wait for this
job to send the exit port number it should take.
4.11.1 Parameters
• Input parameters
Name Description
Branch_Num Step ID of the “branch_by_msg” Step, can be viewed in Mech-Viz
Exit_Num The number of the exit port to take + 1, from 1 to 99
Example: To select exit port 0 in Mech-Viz, set the value of this parameter to 1.
4.11.2 Example
This example tells Mech-Viz to take exit port 3 for the “branch_by_msg” Step whose Step ID is 1.
MM_SET_INDEX ("Skill_Num;Index_Num")
This job sets the value for the Current Index parameter of Mech-Viz Steps. Steps that have this parameter
include move_list, move_grid, custom_pallet_pattern, and smart_pallet_pattern.
Note:
• mm_start_viz must be called BEFORE this job.
4.12.1 Parameters
• Input parameters
Name Description
Skill_Num Step ID of the Step, can be viewed in Mech-Viz
Index_Num Value for the Current Index parameter when the Step is executed
4.12.2 Example
This example sets the Current Index value to 9 for the Step whose Step ID is 2. When the Step is executed,
the Current Index value will be added 1 and become 10.
MM_GET_STATUS ("Status")
This job is currently capable of checking whether Mech-Vision is ready to run projects. In the future, this
job can be used for obtaining the execution status of Mech-Vision, Mech-Viz and Mech-Center.
4.13.1 Parameter
• Output parameter
Name Description
Status Variable for storing status code
Status code 1101 indicates that Mech-Vision is ready to run projects. For other status
codes, please see standard_interface_status_codes.
4.13.2 Example
MM_SET_BOXSIZE("Job;Length;Width;Height")
Note:
• This job must be called BEFORE MM_START_VIS.
4.14.1 Parameters
• Input parameters
Name Description
Job Mech-Vision Project ID, from 1 to 99
Can check and adjust in Mech-Vision
Length Length of object in mm
Width Width of object in mm
Height Height of object in mm
4.14.2 Example
This example sets the object dimensions in the read_object_dimensions Step in the Mech-Vision project
No. 1 to 500*300*200 mm.
MM_GET_DOLIST
This job obtains the planned DO Signal list for controlling multiple sections of a sectioned vacuum gripper.
Note:
• MM_GET_VIZDATA must be called BEFORE this job.
• Please deploy the Mech-Viz project based on the template project in xxx\Mech-Mind Software Suite-
x.x.x\Mech-Center\tool\viz_project\suction_zone, and set the suction cup configuration file in the
Mech-Viz project.
4.15.1 Parameters
No parameters.
4.15.2 Example
CALL JOB:MM_GET_DOLIST
This example obtains the DO signal list planned by Mech-Viz and writes the values in OT1 – OT16.
MM_SET_POSE ("Pos")
Note:
• This job must be called BEFORE MM_START_VIZ.
• Please deploy the Mech-Viz project based on the template project in xxx\Mech-Mind Software Suite-
x.x.x\Mech-Center\tool\viz_project\outer_move, and put the outer_move Step at a proper position in
the workflow.
4.16.1 Parameter
• Input parameter
Name Description
Pos P variable for storing the TCP data to be sent to Mech-Viz
4.16.2 Example
This example sends the TCP data stored in P10 to the outer_move task in the Mech-Viz project.
4.17 Calibration
MM_CALIB ("Move_Type;Pos_Jps;Wait_Time;Rnum;Ext;Pos")
This job is used for hand-eye calibration (camera extrinsic parameter calibration). It automates the calibra-
tion process in conjunction with the Camera Calibration function in Mech-Vision. For detailed instructions,
see kuka_standard_interface_calibration.
4.17.1 Parameters
• Input parameters
Name Description
Move_Type Motion type, 1 or 2
1: MOVL 2: MOVJ
Pos_Jps Pose as flange pose or joint positions, 1 or 2
1: flange pose 2: Joint positions
Wait_Time The time the robot waits to avoid shaking after it moves to the calibration point; the
default value is 2 (s)
Rnum Number of robot axes
Ext Data of the external 7th axis in mm, optional
Pos Start point for the calibration, P99 by default
4.17.2 Example
This example moves the robot with MOVJ, receives pose data in the form of flange pose, and sets the wait
time to 2 seconds to avoid the robot from shaking after it moves to the calibration point. This robot has 6
axes and does not have an external axis installed. The start point for the calibration is stored in P99.
4.17. Calibration 45
Mech-Mind User’s Manual
MM_GET_DYDATA ("Job;Pos_Num;MM_Status")
This job is used for obtaining the vision result that includes custom port outputs from the corresponding
Mech-Vision project. “Custom port outputs” refers to data output by ports other than poses and labels of
the “procedure_out” Step in Mech-Vision. The output ports can be customized if the Port Type parameter
of the Step is set to “Custom”.
Note:
• MM_START_VIS must be called BEFORE this job.
• If only poses and labels are needed (no custom output ports defined), use MM_GET_VIZDATA to
obtain the vision result instead.
4.18.1 Parameters
• Input parameter
Name Description
Job Mech-Vision Project ID, from 1 to 99
Can check and adjust in the Project List panel in Mech-Vision
• Output parameters
Name Description
Pos_Num I variable for storing the number of received vision points
MM_Status I variable for storing status code. Please see standard_interface_status_codes.
4.18.2 Example
This example obtains the vision result that includes custom port outputs from Mech-Vision project No. 2.
The number of vision points received is stored in I60, and the status code is stored in I61.
MM_GET_DYPOSE ("Serial;PosTarget;Label;UserData")
This job stores the data in a vision point returned by Mech-Vision in the specified variables.
4.19.1 Parameters
• Input parameter
Name Description
Serial Specify the index of the vision point to be stored
• Output parameters
Name Description
PosTar- P variable for storing the pose in the specified vision point
get
Label I variable for storing the label in the specified vision point
UserData The first R variable for storing the custom port outputs in the specificed vision point
Data are stored in R variables consecutive to the input one. Reserve enough R vari-
ables.
4.19.2 Example
This example stores the pose in the second received vision point to P60, the corresponding label to I60,
and the corresponding custom port outputs to R60 and consecutive R variables.
MM_GET_PLANDATA ("Jps_Pos;Pos_Num;VisPos_Num;MM_Status")
This job is used for obtaining the planned path from Mech-Viz. This job can obtain all data output by
Mech-Viz, including motion type, tool number, custom port outputs from Mech-Vision and depalletizing
planning data.
“Custom port output” refers to data output by ports other than poses and labels of the “procedure_out”
Step in Mech-Vision. The output ports can be customized if the Port Type parameter of the Step is set to
“Custom”.
“Depalletizing planning data” is explained below.
Note:
• MM_START_VIZ must be called BEFORE this job.
• If only poses, labels and velocities are needed, use MM_GET_VIZDATA to obtain the planned path
instead.
4.20.1 Parameters
• Input parameters
Name Description
Jps_Pos Expected format of the returned data, see the following table for explanations
The relationship between the value of Jps_Pos and the format of the returned data is summarized
below.
Pose
The pose of the waypoint, as joint positions (in degree) or TCP, which is composed of
Cartesian coordinates (XYZ in mm) and Euler angles (ABC in degree).
Motion type
– Value is 1: joint motion
– Value is 2: linear motion
Tool number
The index number of the tool to be used at this waypoint. -1 means no tool is used.
Velocity
Velocity percentage of the waypoint, equals to the velocity setting in the corresponding
move-type Step × the global velocity setting in Mech-Viz.
Depalletizing planning data:
Data used in planning multi-pick depalletizing tasks. These data are part of the waypoint
of the “visual_move” Step. The following data are included:
– Label: composed of 10 integers, if fewer than 10 labels are obtained, the rest of the
digits are filled with 0.
– Number of picked workobjects
– Number of workobjects to be picked this time
– Edge-corner ID of vacuum gripper: can be checked by double-clicking the correspond-
ing tool in Resources in Mech-Viz and then selecting Configure control logic.
– TCP offset: The offset between the tool pose at the center of the to-pick workobjects
and the actual tool pose.
– Workobject orientation: whether the X-axis of the workobject reference frame is
aligned with the X-axis of the tool reference frame (value: 0 or 1).
– Dimensions of the workobjects combined
Number of custom ports
The number of output keys excluding poses and labels when the Port Type parameter of
the “procedure_out” Step in the Mech-Vision project is set to “Custom”.
Custom port outputs
The outputs excluding poses and labels when the Port Type parameter of the “proce-
dure_out” Step in the Mech-Vision project is set to “Custom”. These data are part of the
waypoint of the “visual_move” Step.
The custom port outputs are arranged in alphabetical order of the custom port names.
Waypoints in a planned path can be divided into two types: those of the “visual_move” Step and those of
other move-type Steps.
• All waypoints contain the following data: pose, motion type, tool number and velocity.
• The waypoints of the “visual_move” Step also contain depalletizing planning data.
• If custom ports are defined for the “procedure_out” Step in Mech-Vision, then the waypoints of the
“visual_move” Step also contain custom port outputs.
To obtain the depalletizing planning data, set Jps_Pos to 3 or 4; if the depalletizing planning data are not
needed, set Jps_Pos to 1 or 2.
• Output parameters
Name Description
Pos_Num | I variable for storing the number of received waypoints
VisPos_NumI variable for storing the position of the first visual_move waypoint in the path
Example path: Move_1, Move_2, Vision Move_3, Move_3, Vision Move_2 In this path,
the position of the first Vision Move waypoint is 3. If the path does not contain Vision
Move waypoint, the return value is 0.
MM_StatusI variable for storing status code. Please see standard_interface_status_codes.
4.20.2 Example
This example obtains the planned path that includes custom port outputs from Mech-Viz, and the poses
obtained are in the form of TCPs. The number of waypoints received is stored in I60, the position of the
Vision Move waypoint is stored in I61, and the status code is stored in I62.
MM_GET_PLANPOSE("Serial;Target;Pose_Info;Plan_Result")
This job stores the data in a waypoint returned by Mech-Viz in the specified variables.
• Input parameter
Name Description
Serial Specify the index of the waypoint to be stored
• Output parameters
Name Description
Target P variable for storing the poses in the specified waypoint
If Jps_Pos in MM_GET_PLANDATA is 1 or 3: set the data type of the P variable to PULSE
If Jps_Pos in MM_GET_PLANDATA is 2 or 4: set the data type of the P variable to ROBOT
Pose_Info
The first B variable for storing the motion type, tool number and velocity in the specified
waypoint
Make sure the next two B variables are free for storing the above data.
Plan_Result
The first R variable for storing the depalletizing planning data and custom port outputs in
the specificed waypoint
Omit for waypoints not of the visual_move Step Data are stored in R variables consecutive
to the input one. Reserve enough R variables. The depalletizing planning data occupies
20 variables. The custom port outputs depend on settings in Mech-Vision.
4.21.1 Examples
This example stores the TCP in the first received waypoint to P60, the corresponding motion type, tool
number and velocity to B60, B61 and B62, the corresponding custom port outputs to R60 and consecutive
R variables.
MM_GET_VISPATH("Job;GetPos_Type;Last_Data;Pos_Num;VisPos_Num;MM_Status")
This job is for applications that use Mech-Vision but not Mech-Viz. It obtains the collision-free path planned
by the “path_planning” Step from the corresponding Mech-Vision project.
Note:
• MM_START_VIS must be called BEFORE this job.
• The Port Type parameter of the “procedure_out” Step in the Mech-Vision project must be set to
“Predefined (robot path)”.
• Input parameters
Name Description
Job Mech-Vision Project ID, from 1 to 99
Can check and adjust in the Project List panel in Mech-Vision
GetPos_Type Whether Mech-Vision should send poses as joint positions or TCPs, 1 or 2
1: Mech-Vision sends joint positions 2: Mech-Vision sends TCPs
• Output parameters
Name Description
Last_Data
I variable, indicating whether all waypoints have been sent, 0 or 1
0: NOT all waypoints have been sent (more on the way) 1: All waypoints have been sent
Pos_NumI variable for storing the number of received waypoints
VisPos_Num
I variable for storing the position of the first visual_move waypoint in the path
Example path: Move_1, Move_2, Vision Move_3, Move_3, Vision Move_2 In this path, the
position of the first Vision Move waypoint is 3. If the path does not contain Vision Move
waypoint, the return value is 0.
MM_Status
I variable for storing status code. Please see standard_interface_status_codes.
4.22.1 Example
This example obtains the planned path from Mech-Vision project No. 1 in the form of TCPs. Whether all
waypoints have been sent is stored in I50, the number of waypoints received is stored in I51, the position
of the Vision Move waypoint is stored in I52, and the status code is stored in I53.
FIVE
The following errors may occur while running the Standard Interface program on the robot.
5.1 MM:Robot_Internal_Error
Error occurred while the MotoPlus application attempts to call the MotoPlus API.
5.1.1 Example
When the MotoPlus application attempts to obtain the current pose of the robot, ret = -1.
5.1.2 Troubleshooting
Please refer to Programmer’s Manual for New Language Environment MotoPlus and check the application.
5.2 MM:Robot_Socket_Closed
Error occurred when the MotoPlus application called the mpSocket and mpConnect functions, and the
robot is disconnected from Mech-Mind Software Suite.
52
Mech-Mind User’s Manual
5.2.1 Troubleshooting
5.3 MM:Robot_Argument_Error
When calling a Mech-Mind Standard Interface job, arguments provided are not sufficient.
5.3.1 Example
When calling MM_START_VIS, 3 arguments should be provided. If only 1 argument is provided, this error
is reported.
• Correct:
• Incorrect:
5.3.2 Troubleshooting
Please refer to YASKAWA Standard Interface Commands and input the correct arguments accordingly.
5.4 MM:Robot_CMD_Error
5.3. MM:Robot_Argument_Error 53
Mech-Mind User’s Manual
5.4.1 Troubleshooting
• Please refer to the Standard Interface Development Manual and make sure the command code sent
by the job is correct.
• The sequence of command sending and receiving is problematic. Please contact Mech-Mind Tech-
nical Support for further assistance.
5.5 MM:IPC_Return_Error
Returned status code is an error code. Please check the messages in the Console tab of Mech-Vision Log
panel.
5.5.1 Troubleshooting
5.5. MM:IPC_Return_Error 54