FANUC Standard Interface Commands

The FANUC Standard Interface provides the following procedures:

When programming the FANUC robot, please pay attention to the following:

  • Multiple parameters should be separated by commas.

  • All parameters should be defined as local variables in the program file.

  • Parameters can be defined as Input or Output parameters.

This Standard Interface is over the TCP/IP protocol.

Initialize Communication

MM_INIT_SKT (C_Tag,Ip_Addr,Svr_Port,Time_Out)

This procedure is used to set the host IP address, port number, and wait time for TCP/IP communication.

Parameters

  • Input Parameters

    Name

    Description

    C_Tag

    Client port number, i.e. the port number string of the robot, select from ports 1 to 8.

    Ip_Addr

    The IP address of the IPC

    Svr_Port

    Server port number; the default port number is 50000

    Time_Out

    Wait time in minutes before stopping connection attempt

Example

CALL MM_INIT_SKT ('1', '192.168.1.20', 50000, 5);

When running the example, the specified client port number is 1, the host IP address should be set to 192.168.1.20, the port number should be set to 50000, and the wait time is 5 minutes.

Start Mech-Vision Project

MM_START_VIS (Job,Pos_Num_Need,SendPos_Type,Pr_Num)

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

Parameters

  • Input Parameters

    Name

    Description

    Job

    Mech-Vision Project ID, from 1 to 99

    Can check and adjust in Mech-Vision

    Pos_Num_Need

    Number of vision points for Mech-Vision to send, from 0 to 20, where 0 means “send all”

    SendPos_Type

    Set the robot pose to send to Mech-Vision, from 0 to 3

    See the following table for explanations of the 4 values

    Pr_Num

    Position Register for storing the joint positions of the start point when SendPose_Type = 3

    If using, change the data type of the register to joint positions

SendPos_Type value

Pose sent to Mech-Vision

Applicable scenario

0

No robot pose sent to Mech-Vision

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

1

Current joint positions and flange pose of the robot as image-capturing pose

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

2

Current flange pose of the robot as image-capturing pose

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

3

Joint positions of a specific start point

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

Example

CALL MM_START_VIS (1,1,1,60)

This example triggers Mech-Vision No. 1 project to run; the Mech-Vision No. 1 project is expected to send back 1 vision point; and the robot will send its current joint positions and flange pose as the image-capturing pose to Mech-Vision.

Get Vision Target(s)

MM_GET_VIS (Job,Reg_Lst_Data,Reg_Pos_Num,Reg_Status)

This procedure 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_DY_DT to obtain the vision result instead.

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

    Reg_Lst_Data

    Data Register, 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

    Reg_Pos_Num

    Data Register for storing the number of received vision points, from 1 to 20

    Reg_Status

    Data Register for storing status code. Please see Status Codes and Troubleshooting.

Example

CALL MM_GET_VIS (1,50,51,52)

This example obtains the vision result from Mech-Vision project No.1. Whether all vision points have been sent is stored in register R[50], the number of vision points received is stored in register R[51], and the status code is stored in register R[52].

Start Mech-Viz Project

MM_START_VIZ (SendPos_Type,Pr_Num)

This procedure 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.

Parameter

  • Input Parameters

    Name

    Description

    SendPos_Type

    Set the initial pose for the simulated robot in Mech-Viz, from 0 to 2

    See the following table for explanations of the 3 values

    Pr_Num

    Position Register for storing the joint positions of the start point when SendPose_Type = 3

    If using, change the data type of the register to joint positions

SendPos_Type value

Pose sent to Mech-Viz

Applicable scenario

0

No robot pose sent to Mech-Viz

Project is in the eye-to-hand mode. The simulated robot in Mech-Viz moves from joint positions = [0, 0, 0, 0, 0, 0] to the first waypoint.

1

Current joint positions and flange pose of the robot

This setting is recommended for projects in the eye-in-hand mode. The simulated robot in Mech-Viz moves from the input joint positions to the first waypoint.

2

Joint positions of a specific start point

This setting is recommended for projects in the eye-to-hand mode. The simulated robot in Mech-Viz moves from the input joint positions to the first waypoint.

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.

Example

CALL MM_START_VIZ (1,60)

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.

Get Planned Path

MM_GET_VIZ (Jps_Pos,Reg_Lst_Data,Reg_Pos_Num,Reg_VPos_Num,Reg_Status)

This procedure obtains the planned path from Mech-Viz.

Note

Only the poses and their corresponding labels and velocities are obtained by this subprogram. If any other type of data are needed, such as custom outputs from Mech-Vision project or depalletizing planning data, use MM_GET_PLNDT to obtain the planned path instead.

Parameters

  • Input Parameter

    Name

    Description

    Jps_Pos

    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

    Reg_Lst_Data

    Data Register, 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

    Reg_Pos_Num

    Data Register for storing the number of received waypoints which range from 1-20

    Reg_VPos_Num

    Data Register for storing the position of the first Vision 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.

    Reg_Status

    Data Register for storing status code. Please see Status Codes and Troubleshooting.

Example

CALL MM_GET_VIZ (2,50,51,52,53)

This example obtains the planned path from Mech-Viz in the form of TCPs. Whether all waypoints have been sent is stored in register R[50], the number of waypoints received is stored in register R[51], the position of the Vision Move waypoint is stored in register R[52], and the status code is stored in register R[53].

Obtain Pose

MM_GET_POS (Serial,Pr_Num,Reg_Label,Reg_Speed)

This procedure stores a vision pose returned by Mech-Vision or a waypoint pose (as TCP) returned by Mech-Viz in the specified Position Register.

Parameters

  • Input Parameter

    Name

    Description

    Serial

    Specify the index of the pose to be stored

  • Output Parameters

    Name

    Description

    Pr_Num

    Position Register for storing the specified pose

    Label

    Data Register for storing the label corresponding to the specified pose

    Pose_Speed

    Data Register for storing the velocity corresponding to the specified pose

Example

CALL MM_GET_POS (1,60,61,62)

This example stores the first received pose to register PR[60], the corresponding label to register R[61], and the corresponding velocity to register R[62].

Obtain Joint Positions

MM_GET_JPS (Serial,Pr_Num,Reg_Label,Reg_Speed)

This procedure stores a set of joint positions returned by Mech-Viz in the specified Position Registers.

Note

As Mech-Vision does not output joint position data, this subprogram can only be used with Mech-Viz.

Parameters

  • Input Parameter

    Name

    Description

    Serial

    Specify the index of the set of joint positions to be stored

  • Output Parameters

    Name

    Description

    Pr_Num

    Position Register for storing the specified set of joint positions

    Reg_Label

    Data Register for storing the label corresponding to the specified set of joint positions

    Reg_Speed

    Data Register for storing the velocity corresponding to the specified set of joint positions

Example

CALL MM_GET_JPS (1,60,61,62)

This example stores the first set of received joint positions to PR[60], the corresponding label to register R[61], and the corresponding velocity to register R[62].

Switch Mech-Vision Recipe

MM_SET_MOD (Job,Model_Num)

This procedure specifies which parameter recipe of the Mech-Vision project to use. For more information on parameter recipe, please see Parameter Recipe.

Note

  • This procedure must be called BEFORE MM_START_VIZ.

Parameters

  • Input Parameters:

    Name

    Description

    Job

    Mech-Vision Project ID, from 1 to 99

    Can check and adjust in Mech-Vision

    Model_Num

    The ID of a parameter recipe in the Mech-Vision project, from 1 to 99

Example

CALL MM_SET_MOD (2,2)

This example switches the parameter recipe used to No. 2 in Mech-Vision project No. 2.

Select Mech-Viz Branch

MM_SET_BCH (Branch_Num,Export_Num)

This procedure 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 subprogram specifies which exit port such Step(s) should take.

Note

  • MM_START_VIZ must be called BEFORE this procedure.

  • When the next Step to be executed in Mech-Viz is a Branch by Msg Step, Mech-Viz will wait for this procedure to send the exit port number it should take.

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.

Example

CALL MM_SET_BCH (1,3)

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

Set Move Index

MM_SET_IDX (Skill_Num,Index_Num)

This procedure sets the value for the Current Index parameter of Mech-Viz Steps. Steps that have this parameter include Move by List, Move by Grid, Custom Pallet Pattern, and Smart Pallet Pattern.

Note

  • MM_START_VIZ must be called BEFORE this procedure.

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

Example

CALL MM_SET_IDX (2,10)

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.

Get Software Status

MM_GET_STAT (MM_Status)

This procedure is currently capable of checking whether Mech-Vision is ready to run projects. In the future, this procedure can be used for obtaining the execution status of Mech-Vision, Mech-Viz, and Mech-Center.

Parameter

  • Output Parameter

    Name

    Description

    MM_Status

    Variable for storing status code

    Status code 1101 indicates that Mech-Vision is ready to run projects. For other status codes, please see Status Codes and Troubleshooting.

Example

CALL MM_GET_STAT (70)

This example obtains the status code and stores it in register R[70].

Input Object Dimensions to Mech-Vision

MM_SET_BS (Job,Lenght,Width,Height)

This procedure inputs object dimensions to the Mech-Vision project.

Note

  • This procedure must be called BEFORE MM_START_VIS.

  • The corresponding Mech-Vision project must contain the “Read Object Dimensions” Step, and the Read Sizes from Properties parameter of this step must be checked.

Parameters

  • Input Parameters

    Name

    Description

    Job

    Mech-Vision Project ID, from 1 to 99

    Can check and adjust in Mech-Vision

    Lenght

    Length of object in mm

    Width

    Width of object in mm

    Height

    Height of object in mm

Example

CALL MM_SET_BS (1,11.0,12.0,13.0)

This example sets the object dimensions in the Read Object Dimensions Step in the Mech-Vision project No. 1 to 11*12*13 mm.

Get DO Signal List/ Set DO Signal List

  • Get DO Signal List

    MM_GET_DL
    
  • Set DO Signal List

    MM_SET_DL
    

These two procedures obtain the planned DO Signal list for controlling multiple sections of a sectioned vacuum gripper and set the DOs accordingly.

Note

  • MM_GET_VIZ must be called BEFORE this procedure.

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

Parameters

No parameters.

Example

CALL MM_GET_DL
CALL MM_SET_DL

These two examples obtain the DO signal list planned by Mech-Viz, store it in Do_Port[i], and input the values to the corresponding digital outputs.

Input TCP to Mech-Viz

MM_SET_POS (X,Y,Z,W,P,R)

This procedure inputs TCP data to the External Move Step.

Note

  • This procedure 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 External Move Step at a proper position in the workflow.

Parameter

  • Input parameter

Name

Description

X

Variable 1 of the pose (mm)

Y

Variable 2 of the pose (mm)

Z

Variable 3 of the pose (mm)

W

Variable 4 of the pose (arc degree)

P

Variable 5 of the pose (arc degree)

R

Variable 6 of the pose (arc degree)

Example

CALL MM_SET_POS (100.1,200.2,300.3,90.0,180.0,0.0)

This example sends the pose of TCP (100.1,200.2,300.3,90.0,180.0,0.0) to the External Move Step in the Mech-Viz project.

Calibration

MM_CALIB (Move_Type,PosJps,WaitTime,AxisNum,AxisVal,Reg_CalibPos)

This procedure is used for hand-eye calibration (camera extrinsic parameter calibration). It automates the calibration process in conjunction with the Camera Calibration function in Mech-Vision. For detailed instructions, see FANUC Calibration Program.

Parameters

  • Input Parameters

    Name

    Description

    Move_Type

    Motion type, 1 or 2

    1: Linear motion 2: Joint moton

    PosJps

    Pose as flange pose or joint positions, 1 or 2

    1: flange pose 2: Joint positions

    WaitTime

    The time the robot waits to avoid shaking after it moves to the calibration point; the default value is 2 (s)

    AxisNum

    The axis number of the robot

    AxisVal

    Data of the external 7th axis in mm (Optional; input 0 when there is no external axis)

    Reg_CalibPos

    The Position Register used in MM_AUTO_CALIB; PR[100] by default

Example

CALL MM_CALIB (2,1,2,6,0,100)

This example moves a 6-axis robot in Joint motion type, 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. Moreover, the robot does not have an external 7th axis. The register PR[100] is used to store the received pose data.

Get Notification from Mech-Vision

MM_RCV_NTFY(MM_NotifyMsg)

This procedure is used to obtain the message output by the “Notify” Step in the corresponding Mech-Vision project.

Note

  • MM_START_VIS or MM_START_VIZ must be called BEFORE this procedure.

  • The Service Name and Message parameters of the “Notify” Step must be set according to the following requirements:

    • Service Name must be set to Standard Interface Notify.

    • Message must be a positive integer that represents a predetermined message.

Parameter

  • Output parameter

    Name

    Description

    MM_NotifyMsg

    Data Register for storing the message

Example

CALL MM_START_VIS(1,20,2)
CALL MM_RCV_NTFY(60)

This example obtains the message output by the “Notify” Step in Mech-Vision project No. 1 and stores it in register R[60].

Get Vision Result from Mech-Vision

MM_GET_DY_DT (Job,Reg_Pos_Num,Reg_Status)

This procedure 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 procedure.

  • If only poses and labels are needed (no custom output ports defined), use MM_GET_VIS to obtain the vision result instead.

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

    Reg_Pos_Num

    Data Register for storing the number of received vision points

    Reg_Status

    Data Register for storing status code. Please see Status Codes and Troubleshooting.

Example

CALL MM_GET_DY_DT (1,50,51)

This example obtains the vision result that includes custom port outputs from Mech-Vision project No. 1. The number of vision points received is stored in register R[50], and the status code is stored in register R[51].

Save Vision Point to Specified Registers

MM_GET_DYPOS (Serial,Pr_Num,Reg_Label,Reg_UserData)

This procedure stores the data in a vision point returned by Mech-Vision in the specified registers.

Note

This procedure is called AFTER MM_GET_DY_DT.

Parameters

  • Input parameter

    Name

    Description

    Serial

    Specify the index of the vision point to be stored

  • Output parameters

    Name

    Description

    Pr_Num

    Position Register for storing the pose in the specified vision point

    Reg_Label

    Data Register for storing the label in the specified vision point

    Reg_UserData

    The first Data Register for storing the custom port outputs in a specified vision point

    Outputs are stored in registers consecutive to the input one. Reserve enough registers.

Example

CALL MM_GET_DYPOS (1,60,61,62)

This example stores the pose in the first received vision point to register PR[60], the corresponding label to register R[61], and the corresponding custom port outputs to register R[62] and consecutive.

Get Waypoint from Mech-Viz

MM_GET_PLNDT (Jps_Pos,Reg_Pos_Num,Reg_VPos_Num,Reg_Status)

This procedure is used for obtaining the planned path from Mech-Viz. This procedure 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 procedure.

  • If only poses, labels and velocities are needed, use MM_START_VIZ to obtain the planned path instead.

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.

    Jps_Pos value

    Format of returned data (Explained below)

    1

    Pose (joint positions), motion type, tool number, velocity, number of custom ports, custom port output, custom port output, … custom port output

    2

    Pose (TCP), motion type, tool number, velocity, number of custom ports, custom port output, custom port output, … custom port output

    3

    Pose (joint positions), motion type, tool number, velocity, depalletizing planning data, number of custom ports, custom port output, custom port output, … custom port output

    4

    Pose (TCP), motion type, tool number, velocity, depalletizing planning data, number of custom ports, custom port output, custom port output, … custom port output

    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 “Vision 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 corresponding 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 “Procedure Out” Step in the Mech-Vision project is set to “Custom”. These data are part of the waypoint of the “Vision 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 “Vision 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 “Vision 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 “Vision 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

    Reg_Pos_Num

    Data Register for storing the number of received waypoints

    Reg_VPos_Num

    Data Register for storing the position of the first Vision 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.

    Reg_Status

    Data Register for storing status code. Please see Status Codes and Troubleshooting.

Example

CALL MM_GET_PLNDT (3,50,51,52);

This example obtains the planned path that includes depalletizing planning data and custom port outputs from Mech-Viz, and the poses obtained are in the form of joint positions. The number of waypoints received is stored in register R[50], the position of the Vision Move waypoint is stored in register R[51], and the status code is stored in register R[52].

Save Waypoint to Specified Registers

MM_GET_PLJOP (Serial,Jps_Pos,Pr_Num,Reg_MoveType,Reg_ToolNum,Reg_Speed,Reg_UserData,Reg_PlanRes)

This procedure stores the data in a waypoint returned by Mech-Viz in the specified registers.

Note

This procedure is called AFTER MM_GET_PLNDT.

  • Input parameters

    Name

    Description

    Serial

    Specify the index of the waypoint to be stored

    Jps_Pos

    Expected format of the returned data, must be the same value as in MM_GET_PLNDT

  • Output parameters

    Name

    Description

    Pr_Num

    Position Register for storing the pose in the specified waypoint

    Reg_MoveType

    Data Register for storing the motion type in the specified waypoint

    1: joint motion 2: linear motion

    Reg_ToolNum

    Data Register for storing the tool number in the specified waypoint, -1 means no tool is used

    Reg_Speed

    Data Register for storing the velocity in the specified waypoint

    Reg_UserData

    The first Data Register for storing the custom port outputs in the specified waypoint

    Data are stored in registers consecutive to the input one. Reserve enough registers.

    Reg_PlanRes

    The first Data Register for storing the depalletizing planning data in the specified waypoint

    Data are stored in registers consecutive to the input one. Reserve enough registers.

Examples

CALL MM_GET_PLJOP (1,3,60,61,62,63,81,131)

This example stores the joint positions in the first received waypoint to register PR[60], the corresponding motion type to register R[61], the corresponding tool number to register R[62], the corresponding velocity to register R[63], the corresponding custom port outputs to registers R[81] and consecutive, and the corresponding depalletizing planning data to registers R[131] and consecutive.

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

MM_GET_VISP (Job,Jps_Pos,Reg_Lst_Data,Reg_Pos_Num,Reg_VPos_Num,Reg_Status)

This procedure 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 procedure.

  • 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

    Jps_Pos

    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

    Reg_Lst_Data

    Data Register, 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

    Reg_Pos_Num

    Data Register for storing the number of received waypoints

    Reg_VPos_Num

    Data Register for storing the position of the first Vision 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.

    Reg_Status

    Data Register for storing status code. Please see Status Codes and Troubleshooting.

Example

CALL MM_GET_VISP (1,1,50,51,52,53)

This example obtains the planned path from Mech-Vision project No. 1 in the form of joint positions. Whether all waypoints have been sent is stored in register R[50], the number of waypoints received is stored in register R[51], the position of the Vision Move waypoint is stored in register R[52], and the status code is stored in register R[53].