YASKAWA Standard Interface Jobs

You are currently viewing the documentation for version 1.8.1. To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

■ To use the latest version, visit the Mech-Mind Download Center to download it.

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

When writing your own program, pay attention to the following:

  • Multiple parameters should be separated by semi-colons.

  • The input and output parameters in a job are string constants by default. The value of the output parameter corresponds to a global variable in the background.

  • For Mech-Vision and Mech-Viz prior to version 1.6.1, every Standard Interface job encapsulates codes that initialize the communication and disconnect the communication.

  • For version 1.6.1 or above of Mech-Vision and Mech-Viz, the following changes have been made:

    • To facilitate testing, only MM_INIT_SOCKET keeps codes used for communication establishment and disconnection. The MM_INIT_SOCKET job only needs to be called once and the set IP address will be valid globally.

    • Codes used for communication establishment and disconnection are divided into two individual jobs, which are MM_OPEN_SOCKET and MM_CLOSE_SOCKET. The communication 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 reconnection of communication between the robot and the vision system can be avoided.

The following is the instruction in standard interface jobs.

Initialize Communication

This job sets the host IP address, port number, and wait time for TCP/IP communication.

Job

MM_INIT_SOCKET("IP_Address;Server_Port;Time_Out")

Parameters

Name Description

Input parameters

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.

Example

CALL JOB:MM_INIT_SOCKET("192.168.1.1;50000;5")

This example sets the IP address and port number of the IPC to 192.168.1.1:50000 and wait time to 5 minutes.

Start TCP 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.

Job

MM_OPEN_SOCKET

Parameters

No parameters.

Example

CALL JOB:MM_OPEN_SOCKET

Close TCP Socket

This job ends the communication between the robot and the vision system. User can end communication with the vision system by calling this job after the communication is finished.

Job

MM_CLOSE_SOCKET

Parameters

No parameters.

Example

CALL JOB:MM_CLOSE_SOCKET

Start Mech-Vision Project

This job is used for applications that use Mech-Vision. It runs the corresponding project to acquire and process data. It applies for applications that use Mech-Vision but not Mech-Viz.

Job

MM_START_VIS("job;pos_num_need;sendpos_type;prNum")

Parameters

Name Description

Input parameters

job

Mech-Vision project ID, which can be viewed before the project name in the Project List panel in Mech-Vision.

pos_num_need

The expected number of vision points for Mech-Vision to send. The value range is 0 to 20, in which 0 indicates that all vision points will be received.

sendpos_type

The type of the robot pose to send to Mech-Vision. Value range: 0 to 3.

  • 0: No robot poses need to be sent to the vision system. If the camera is mounted in the Eye To Hand mode, the image capturing process is independent of the robot pose, and therefore the robot pose is not needed.

  • 1: The robot pose in the current joint positions together with the current flange pose will be sent to the vision system. It is recommended to set this value when the camera is mounted in the Eye In Hand mode. When this parameter is set to this value, the “Path Planning” Step in the Mech-Vision project will use the joint positions sent by the robot. If the flange pose data are all 0, the vision system ignores the flange pose data.

  • 2: The robot pose in the current flange pose will be sent to the vision system. It is recommended to set this value when the camera is mounted in the Eye In Hand mode or in other scenarios where only the flange pose data is available (such as truss robots).

  • 3: The robot pose in the joint positions defined by the user will be sent to the vision system. It is recommended to set this value when the camera is mounted in the Eye To Hand mode. When the Mech-Vision project contains the “Path Planning” Step, the joint positions sent by the robot will be used as the start pose.

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 error message “MM:PVAR_SET_ERROR” will be raised.

Example

CALL JOB:MM_START_VIS("1;1;1")

This example triggers Mech-Vision project No.1 to run, and asks the Mech-Vision project to send over one vision point. The robot sends its current joint positions and flange pose when this job is called as the image-capturing pose.

Obtain Vision Targets

This job is for applications that use Mech-Vision but not Mech-Viz. It obtains the vision result from the corresponding Mech-Vision project.

Job

MM_GET_VISDATA("Job;Pose_Num;MM_Status")

Parameters

Name Description

Input parameters

Job

Mech-Vision project ID, which can be viewed before the project name in the Project List panel in Mech-Vision.

Output parameters

Pose_Num

I variable for storing the number of received poses.

MM_Status

I variable for storing status code. Please see Mech-Mind Status Codes and Troubleshooting.

Example

CALL JOB:MM_GET_VISDATA("1;51;52")

This example obtains the vision result from the Mech-Vision project whose ID is 1. The number of returned vision points is stored in I51, and the status code is stored in I52.

Start Mech-Viz Project

This job is for applications that use both Mech-Vision and Mech-Viz. It runs the 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.

Job

MM_START_VIZ("sendpos_type;prNum")

Parameters

Name Description

Input parameters

sendpos_type

Robot pose type. Value range: 0 to 2.

  • 0: No robot poses need to be sent to Mech-Viz. The simulated robot in Mech-Viz will start from joint positions [0,0,0,0,0,0] and move to the first waypoint.

  • 1: The current joint positions and flange pose of the real robot need to be sent to Mech-Viz. The simulated robot in Mech-Viz will start from the current joint positions of the real robot and move to the first waypoint.

  • 2: Joint positions of a specific start point will be sent to Mech-Viz. This setting is recommended for projects in the Eye-To-Hand mode. The simulated robot in Mech-Viz moves from the predefined joint positions to the first waypoint.

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 error message “MM:PVAR_SET_ERROR” will be raised.

Example

CALL JOB:MM_START_VIZ("1")

This example runs the corresponding Mech-Viz project, and send the current joint positions and flange pose of the robot to Mech-Viz.

Get Planned Path from Mech-Viz

This job obtains the path planned by a Mech-Viz project.

Job

MM_GET_VIZDATA("GetPos_Type;Pos_Num;VisPos_Num;MM_Status")

Parameters

Name Description

Input parameters

GetPos_Type

Pose type of the waypoints to be obtained.
1: The pose type returned by Mech-Viz is joint positions.
2: The pose type returned by Mech-Viz is the TCP.

Output parameters

Pose_Num

I variable for storing the number of received poses.

VisPos_Num

I variable for storing the position of the first Vision Move waypoint in the entire path. For example, in the workflow “Fixed-Point Move 1, Fixed-Point Move 2, Vision Move 1, Fixed-Point Move 3”, the position of the first Vision Move waypoint is 3. If the path does not contain Vision Move waypoint, the returned value is 0.

MM_Status

I variable for storing status code. Please see Status Codes and Troubleshooting for detailed information.

Example

CALL JOB:MM_GET_VIZDATA("2;51;52;53")

This example obtains the planned path from Mech-Viz in the form of TCPs. 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.

Obtain Vision Point Pose

This job stores a vision pose returned by Mech-Vision or a waypoint pose returned by Mech-Viz in the specified variable.

Job

MM_GET_POSE("Index;Robtarget;Label;Pose_Speed")

Parameters

Name Description

Input parameters

Index

Specify the index of the pose to be stored.

Output parameters

Robtarget

P variable for storing the specified pose.

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 positions.

Example

CALL JOB:MM_GET_POSE("1;60;61;62")

This example stores the first received pose to P60, the corresponding label to I61, and the corresponding velocity to I62.

Obtain Joint Positions (Available when Mech-Viz is used)

This job stores the joint positions of a waypoint on the planned path returned by Mech-Viz in the specified variable.

Job

MM_GET_JPS("Index;Jointtarget;Label;Pose_Speed")

Parameters

Name Description

Input parameters

Index

Specify the index of the pose to be stored.

Output parameters

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 positions.

Example

CALL JOB:MM_GET_JPS("1;60;61;62")

This example stores the first set of received joint positions to P60, the corresponding label to I61, and the corresponding velocity to I62.

Switch Mech-Vision Recipe

This job specifies which parameter recipe of the Mech-Vision project to use. This job must be called BEFORE MM_START_VIS.

Job

MM_SET_MODEL("Job;Model_number")

Parameters

Name Description

Input parameters

Job

Mech-Vision project ID, which can be viewed before the project name in the Project List panel in Mech-Vision.

Model_number

The ID of a parameter recipe in the Mech-Vision project. Value range: 1 to 99.

Example

CALL JOB:MM_SET_MODEL("1;1")

This example switches the parameter recipe used by project No.1 of Mech-Vision to recipe No.1.

Select Mech-Viz Branch

This job selects 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. MM_START_VIZ should be called BEFORE this job. When executing the “Branch by Msg” Step, Mech-Viz waits for the exit port No. sent by Command 203.

Job

MM_SET_BRANCH("Branch_Num;Exit_Num")

Parameters

Name Description

Input parameters

Branch_Num

Step ID of the “Branch by Msg” Step. Its value is an integer. The Step ID is displayed in the parameters panel of the Step.

Exit_Num

The number of the exit port to take plus 1. For example, to select exit port 0 in Mech-Viz, set the value of this parameter to 1. The value range is 1 to 99. This parameter value should be 1 plus the exit port number displayed in the Step. For example, to select exit port 0, you should set the value of this parameter to 1.

Example

CALL JOB:MM_SET_BRANCH("1;3")

This example tells Mech-Viz to take exit port 3 for the “Branch by Msg” Step whose Step ID is 1.

Set Move Index

This job sets the value for the Current Index parameter of a mote-type Step. Move-type Steps include Move by List, Move by Grid, Custom Pallet Pattern, and Predefined Pallet Pattern. mm_start_viz must be called BEFORE this job.

Job

MM_SET_INDEX("Skill_Num;Index_Num")

Parameters

Name Description

Input parameters

Skill_Num

ID of the Step, an integer. The Step ID is displayed in the parameters panel of the Step.

Index_Num

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

When this job 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 job, the Current Index value in Mech-Viz will be increased by 1 to become the parameter’s value.

Example

CALL JOB:MM_SET_INDEX("2;10")

This example sets the Current Index value to 9 for Step 2 of the Mech-Viz project. When the Step is executed, the Current Index value will be added 1 and become 10.

Get Software Status

This job is currently capable of checking whether Mech-Vision 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.

Job

MM_GET_STATUS("Status")

Parameters

Name Description

Output parameters

Status

I variable for storing status code. Please see Status Codes and Troubleshooting for detailed information.

Example

CALL JOB:MM_GET_STATUS("70")

This example obtains the status code and stores it in I70.

Input Object Dimensions to Mech-Vision

This job inputs object dimensions to the Mech-Vision project. This job must be called BEFORE MM_START_VIS.

Job

MM_SET_BOXSIZE("Job;Length;Width;Height")

Parameters

Name Description

Input parameters

Job

Mech-Vision project ID, which can be viewed before the project name in the Project List panel in Mech-Vision.

Length

Length of object in mm.

Width

Width of object in mm.

Height

Height of object in mm.

Example

CALL JOB:MM_SET_BOXSIZE("1;500;300;200")

This example sets the object dimensions in the Read Object Dimensions Step in the Mech-Vision project No.1 to 500×300×200 mm.

Get Gripper DO List

This job obtains the gripper DO list planned by Mech-Vision or Mech-Viz. To apply the DO signals to the gripper, call the MM_SET_DOLIST job.

Job

MM_GET_DOLIST("Resource")

Parameters

Name Description

Input parameters

Resource

This parameter specifies the source of the gripper DO list.

  • 0: Get the gripper DO list from Mech-Viz.

  • Positive integer: Get the gripper DO list from Mech-Vision. The positive integer is the Mech-Vision project ID.

Example

CALL JOB:MM_GET_DOLIST("0")

This example obtains the DO signal list planned by Mech-Viz and writes the values in setdo[]. Valid data starts from setdo[0] and ends with setdo[io_index-1].

Set Gripper DO List

This job writes the DO signal values on the list returned by Mech-Vision or Mech-Viz to the general-purpose output signals.

MM_GET_DOLIST must be called BEFORE this job.

Job

MM_SET_DOLIST

Example

CALL JOB:MM_GET_DOLIST("0")
CALL JOB:MM_SET_DOLIST

This example obtains the DO signal list planned by Mech-Viz and writes the values of signals 0 to 63 in general-purpose output signals OT1 to OT64.

Calibration

This job is used for hand-eye calibration (camera extrinsic parameter calibration). This job can be used in the MM_Calibration() program. It automates the calibration process in conjunction with Camera Calibration in Mech-Vision. For detailed instructions, see YASKAWA Calibration Program.

Job

MM_CALIB("Move_Type;Pos_Jps;Wait_Time;Rnum;Ext;Pos")

Parameters

Name Description

Input parameters

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. The value is P99 by default.

Example

CALL JOB:MM_CALIB("2;1;2;6;0;99")

This example moves the robot in the MOVJ mothed based on TCPs, 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.

Get Custom Output Data from Mech-Vision

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. The output ports can be customized if the Port Type parameter of the Step is set to “Custom”.

Calling this job once will store all the obtained data to the robot.

Job

MM_GET_DYDATA("job;regPosNum;regStatus")

Parameters

Name Description

Input parameters

job

Mech-Vision project ID, which can be viewed before the project name in the Project List panel in Mech-Vision.

Output parameters

regPosNum

I variable for storing the number of received vision points.

regStatus

I variable for storing status code.

Example

CALL JOB:MM_GET_DYDATA("2;60;61")

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.

Save Custom Output data to Specified Variables

This job stores the custom output data returned by Mech-Vision in the specified variables. This job is called AFTER MM_GET_DYDATA.

Job

MM_GET_DYPOSE("serial;prNum;regLabel;rrNum")

Parameters

Name Description

Input parameters

serial

Specify the index of the vision point to be stored.

Output parameters

prNum

P variable for storing the pose in the specified vision point.

regLabel

I variable for storing the label in the specified vision point.

rrNum

The first R variable for storing the custom port outputs in the specified vision point. Data are stored in R variables consecutive to the input one. Reserve enough R variables.

Example

CALL JOB:MM_GET_DYPOSE("2;60;60;60")

This example stores the pose in the second received vision point to P60 (in the format of Euler angles converted from quaternions), the corresponding label to I60, and the corresponding custom port outputs to R60-RN.

Get Vision Move Data or Custom Output Data

This function obtains Vision Move output from the Mech-Vision project, or the Vision Move output or custom output from the Mech-Viz project.MM_GET_PLANPOSE assigns the obtained data to variables.

Job

MM_GET_PLANDATA("Resource;jpsPos;regPosNum;visPosNum;regStatus")

Parameters

Name Description

Input parameters

Resource

This parameter specifies the source of the Vision Move data.

  • 0: Get Vision Move data from Mech-Viz.

  • Positive integer: Get Vision Move data from Mech-Vision. The positive integer is the Mech-Vision project ID.

jpsPos

This parameter specifies the returned data format. Details are provided below.

Output parameters

regPosNum

I variable for storing the number of received waypoints.

visPosNum

I variable for storing the position of the first Vision Move waypoint in the entire path.

regStatus

I variable for storing status code.

  • When the value of Resource is 0, the valid value range of jpsPos is 1 to 4. Details are provided below.

    Value of jpsPos Format of returned data (Explained below)

    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

  • When the value of Resource is a positive integer, the valid value range of jpsPos is 1 to 2. Details are provided below.

    Value of jpsPos Format of returned data (Explained below)

    1

    Pose (joint positions), motion type, tool ID, velocity, Mech-Vision Vision Move data

    2

    Pose (TCP), motion type, tool ID, velocity, Mech-Vision Vision Move data

Pose

The pose of the waypoint can be in the form of joint positions (in degree) or TCP, which is composed of Cartesian coordinates (XYZ in mm) and Euler angles (ABC in degree).

Motion type

  • 1: Joint motion (MOVEJ)

  • 2: Linear motion (MOVEL)

Tool ID

The ID of the tool to be used at this waypoint. The value “-1” means that no tool will be used at this waypoint.

Velocity

The velocity at this waypoint.

Vision Move data

Vision Move data: Refers to data output by the “Vision Move” Step in Mech-Vision or Mech-Viz, including labels of picked workobjects, number of picked workobjects, number of workobjects to be picked this time, edge/corner ID of vacuum gripper, TCP offset, orientation of workobject group, orientation of workobject, dimensions of workobject group.

Element in custom output data

“Custom output data” refers to the data output by ports other than poses and labels of the “Procedure Out” Step in the Mech-Vision project. The output ports can be customized if the “Port Type” parameter of the Step is set to “Custom”. The custom port outputs are arranged in alphabetical order of the custom port names.

Example

CALL JOB:MM_GET_PLANDATA("0;4;60;61;62")

This example obtains all data output by the Mech-Viz project and stores the data to the robot memory. 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.

Save Waypoint to Specified Variables

This job is called AFTER Get Vision Move Data or Custom Output Data to store the obtained data in variables.

Job

MM_GET_PLANPOSE("serial;prNum;brNum;rrNum")

Parameters

Name Description

Input parameters

serial

Specify the index of the waypoint to be stored.

Output parameters

prNum

P variable for storing the poses in the specified waypoint.

  • If jpsPos in MM_GET_PLANDATA is 1 or 3, set the data type of the P variable to PULSE. The program will turn the joint positions to pulse for the robot.

  • If jpsPos in MM_GET_PLANDATA is 2 or 4, set the data type of the P variable to ROBOT.

brNum

The first B variable for storing the motion type, tool ID and velocity in the specified waypoint. Make sure the next two B variables are free for storing the above data.

rrNum

The first R variable for storing the Vision Move data and custom port outputs in the specified waypoint. Skip this parameter for non-Vision Move waypoints. Data are stored in R variables consecutive to the input one. Reserve enough R variables. The Vision Move data occupies 21 variables.

Details on Vision Move data are in the table below.

Value Description Number of occupied variables

Labels of picked workobjects

Consists of 10 integers. By default, its value is ten 0s.

10

Number of picked workobjects

The total number of workobjects that have been picked.

1

Number of workobjects to be picked this time

Number of workobjects to be picked this time

1

Edge/corner ID of vacuum gripper

The ID of the edge/corner used to pick workobjects this time.

1

TCP offset

The XYZ offset between the center of the workobject group and the tool center point.

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

CALL JOB:MM_GET_PLANPOSE("2;60;60;60")

This example stores the TCP in the second received waypoint to P60, and stores the corresponding motion type, tool ID and velocity to B60, B61 and B62. Waypoints that are not vision move points will be neglected. Waypoint that are vision move points will be stored in R60-RN in the data receiving format as the description in MM_GET_PLANDATA.

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

This job obtains the collision-free path planned by the “Path Planning” Step from the corresponding Mech-Vision project.

The Port Type parameter of the “Procedure Out” Step in the Mech-Vision project must be set to “Predefined (robot path)”.

Job

MM_GET_VISPATH("job;GetPos_Type;Pos_Num;VisPos_Num;MM_Status")

Parameters

Name Description

Input parameters

job

Mech-Vision project ID, which can be viewed before the project name in the Project List panel in Mech-Vision.

GetPos_Type

This parameter specifies the type of waypoint pose returned by the “Path Planning” Step.
1: The waypoint poses are returned in the form of joint positions. 2: The waypoint poses will be returned in the form of TCPs.

Output parameters

Pos_Num

I variable for storing the number of returned waypoints.

VisPos_Num

I variable for storing the position of the Vision Move waypoint set in path planning tool in the entire path. For example, if the path is composed of Steps Fixed-Point Move_1, Fixed-Point Move_2, Vision Move and Fixed-Point Move_3 sequentially, the position of Vision Move is 3. If the path does not contain “Vision Move”, the value of this parameter is 0.

MM_Status

I variable for storing the status code.

Example

CALL JOB:MM_GET_VISPATH("1;2;51;52;53")

This example obtains the planned path from project No.1 of Mech-Vision in the form of TCPs.The number of waypoints is stored in I51, the position of the Vision Move waypoint is stored in I52, and the status code is stored in I53.

Read Mech-Viz Step Parameter

This job reads the parameter value of a specific Step in the Mech-Viz project.

Job

MM_GET_PROPERTY("Read_id;Status;Viz_Prop")

Parameters

Name Description

Input parameters

Read_id

This parameter corresponds to the Config ID field defined in the property_config file.

Output parameters

Status

I Variable for storing the status code.

Viz_Prop

I variable for storing the returned parameter value of the specified Step. Only INT is supported by now.

From the toolbar of Mech-Vision, go to Robot Communication Configuration  Next  Advanced Settings. Click Property Configuration to open the property_config file.

get property config

Before calling this function, users should define a Config ID and its corresponding Step ID and parameter key name in the following format in the property_config file.

read, Config ID, Step ID, parameter key name

read

Indicates that this line is used to read the parameter value of a Step.

Config ID

Specifies a unique ID, which in a positive integer. One Config ID corresponds to only one parameter value of a Step. To read multiple parameter values, you should set different Config IDs.

Step ID

The Step ID of the Step whose parameter is to be read.

Parameter key name

Specifies the key name of the parameter whose value the robot requires to read.

  • User can check the parameter key name in the Key Query Tool. From the menu bar of Mech-Viz, go to Tools  Key Query Tool. Click a Step icon, and all key names of the Step will be displayed in the middle column. Each key name corresponds to a Step parameter name displayed in the parameter panel. You can also click a key name and check its corresponding parameter name in the “Details” panel.

    parameter key name
  • In the property_config file, lines starting with “#” are comments, which will not be executed by the program.

  • Remember to save the file after editing, and then restart the interface service on the toolbar of Mech-Vision.

The property_config file can have multiple read commands. The Config ID in these commands must be different.

Example

In the line below, “5” is the Config ID; “3” is the Step ID; and “xCount” is the parameter key name. Add this line to the property_config file. Add this line to the property_config file.

read, 5, 3, xCount

When the robot calls the job below, it receives the value of the parameter whose key name is “xCount”.

CALL JOB:MM_GET_PROPERTY("5;10;11")

This example stores the value of the parameter whose key name is xCount of Step 3 in the Mech-Viz project in register I11, and stores the status code in register I10.

Set Mech-Viz Step Parameter

This job sets the parameter value of a specific Step in the Mech-Viz project.

Job

MM_SET_PROPERTY("Write_id;Status")

Parameters

Name Description

Input parameters

Write_id

This parameter corresponds to the Config ID field defined in the property_config file.

Output parameters

Status

I Variable for storing the status code.

From the toolbar of Mech-Vision, go to Robot Communication Configuration  Next  Advanced Settings. Click Property Configuration to open the property_config file.

get property config

Before sending this command, users should define a Config ID and its corresponding Step ID, parameter key name and parameter value in the following format in the property_config file.

write, Config ID, Step ID, parameter key name, parameter value

write

Indicates that this line is used to set the parameter value of a Step.

Config ID

Specifies an ID, which is a positive integer and can be used repeatedly.

Step ID

Specifies the Step whose parameter value the robot requires to read.

Parameter key name

Specifies the key name of the parameter whose value the robot requires to set.

Parameter value

Specifies the value that the robot sets for the parameter.

  • The property_config file can contain more than one “write” command, and these commands can use a Config ID repeatedly. That is, one Config ID can be used to set values for multiple parameters.

  • User can check the parameter key name in the Key Query Tool. From the menu bar of Mech-Viz, go to Tools  Key Query Tool. Click a Step icon, and all key names of the Step will be displayed in the middle column. Each key name corresponds to a Step parameter name displayed in the parameter panel. You can also click a key name and check its corresponding parameter name in the “Details” panel.

    parameter key name
  • In the property_config file, lines starting with “#” are comments, which will not be executed by the program.

  • Remember to save the file after editing, and then restart the interface service on the toolbar of Mech-Vision.

Example

In the line below, “1” is the Config ID, and “3” is the Step ID. “xOffset”, “yOffset” and “zOffset” are parameter key names; and “10”, “20” and “30” are their respective values. Add this line to the property_config file.

write, 1, 3, xOffset, 10
write, 1, 3, yOffset, 20
write, 1, 3, zOffset, 30

When the robot calls the job below, Mech-Viz sets the values of the parameters whose key names are “xOffset”, “yOffset” and “zOffset” respectively to “10”, “20” and “30”.

CALL JOB:MM_SET_PROPERTY("1;10")

This example sets the values of the parameters whose key names are “xOffset”, “yOffset” and “zOffset” respectively to “10”, “20” and “30”, and stores the received status code in the register I10.

Get Message from Notify Step

After the Mech-Vision or Mech-Viz project is triggered, this job can be called to get message from the “Notify” Step.

Job

MM_GET_NOTIFY("NotifyMsg")

Parameters

Name Description

Output parameters

NotifyMsg

I variable for storing the message from the “Notify” Step. Only integers are supported by now.

Example

CALL JOB:MM_GET_NOTIFY("60")

In this example, the message from the “Notify” Step is stored in the variable I60.

Stop Mech-Viz Project

This job stops the Mech-Viz project.

Job

MM_Stop_Viz

Example

CALL JOB:MM_Stop_Viz

In this example, the robot programs calls the job to stop the Mech-Viz project.

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.