EtherNet/IP–Allen‑Bradley PLC Functions

You are currently viewing the documentation for version 1.7.4. 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.

Start Mech-Vision Project

This function starts the Mech-Vision project that executes image capturing and performs vision recognition. This function is for applications that use only Mech-Vision but not Mech-Viz.

Unnamed image

Parameters

Input Parameters:

  • Vision_Proj_Num: Mech-Vision project ID, which is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to auto-loaded, or else the project ID will not be displayed.

  • Req_Pose_Num: The number of vision points that Mech-Vision is requested to send, from 0 to 20, where 0 indicates “send all”.

  • Robot_Pose_Type: The type of robot pose to input to Mech-Vision. The value range is 0–3.

  • Robot_Pose_JPS: Current joint positions of the robot. The data type is one-dimensional Array[0..5] of DInt.

  • Robot_Pose_TCP: Current flange pose of the robot. The data type is one-dimensional Array[0..5] of DInt.

The following table explains the relationship between Robot_Pose_Type and Robot_Pose_JPS/Robot_Pose_TCP.

Robot_Pose_Type Robot_Pose_JPS Robot_Pose_TCP Description Applicable Scenarios

0

0, 0, 0, 0, 0, 0

0, 0, 0, 0, 0, 0

No need to input robot pose to Mech-Vision

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

1

Current joint positions of the robot

Current flange pose of the robot

Robot joint positions and flange pose must be input to Mech-Vision

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

2

0, 0, 0, 0, 0, 0

Current flange pose of the robot

Robot flange pose must be input to Mech-Vision

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 the start point of the planned path

0, 0, 0, 0, 0, 0

The joint positions of the path start point must be input to Mech-Vision

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.

Before assigning to the Robot_Pose_JPS or Robot_Pose_TCP array, multiply the floating-point numbers that represent joint positions or the robot flange pose by 10000 to convert the data to 32-bit signed integers.
  • Start_Vision: Triggers Mech-Vision project to run at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the vision system is triggered successfully by the Command_Trigger signal. 1 indicates that the vision system is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Vision_Proj_Num_O: Mech-Vision project ID.

  • Req_Pose_Num_O: The number of vision points output from Mech-Vision. 0 indicates that all vision points will be obtained.

  • Robot_Pose_Type_O: Robot pose type.

  • Robot_Pose_JPS_O: Robot joint positions.

  • Robot_Pose_TCP_O: Robot flange pose.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 1102 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Start_Vis is at the rising edge, the PLC triggers and runs Mech-Vision project No. 1, asks the project to send over 1 vision point, and sends the current joint positions and flange pose of the robot to Mech-Vision.

Unnamed image

Get Vision Target(s)

This function is called after Start Mech-Vision Project to obtain the vision points output by Mech-Vision and automatically transform the vision points into vision targets.

The transformation process, in which the pose of the vision point is transformed into the robot TCP, is as follows.

  • Rotate the poses around their X axes by 180 degrees.

  • Determine whether the definition of the reference frame used by the robot model involves robot base height, and add a vertical offset accordingly.

Unnamed image
By default, this function can only fetch at most 20 TCPs at a time. Therefore, the function may need to be repeatedly executed until all TCPs required are obtained.

Parameters

Input Parameters:

  • Vision_Proj_Num: Mech-Vision project ID, which is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to auto-loaded, or else the project ID will not be displayed.

  • Get_VisData: Obtains the vision target at the rising edge.

  • Data_Ready: Indicates the pose data is readable when receiving multiple sets of robot pose data.

  • Send_Pose_Num: The number of obtained vision targets, from 1 to 20.

  • Target_Pose: TCP of a single vision target. The data type is Array[0..5] of DInt.

  • Target_Label: Label of a single vision target. If the labels in the Mech-Vision project are strings, please use the “Label Mapping” Step before the “Procedure Out” Step to map the labels to integers. If there are no labels in the project, the default value of this parameter is 0.

  • DataAck: Indicates whether the data returned by the function has been read and cached. The data type is Boolean.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Vision_Proj_Num_O: Mech-Vision project ID.

  • Target_Pose_O: TCP of the vision target. The data type is Array[0..19, 0..5] of DInt. This array should be divided by 10000 before being used.

  • Target_Label_O: Label of the vision target. The data type is Array[0..19] of UDInt.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 1100 will be returned. Otherwise, the corresponding error code will be returned.

  • FromCamera.SEND_POSE_TYPE: The returned pose type can only be 2 (TCP).

Example

When Camera_User.Get_VisData is at the rising edge, this example obtains the vision result from Mech-Vision project No. 1.

Unnamed image

Switch Mech-Vision Recipe

This function the parameter recipe used by the Mech-Vision project. It should be executed before Start Mech-Vision Project.

Unnamed image

Parameters

Input Parameters:

  • Vision_Proj_Num: Mech-Vision project ID, which is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to auto-loaded, or else the project ID will not be displayed.

  • Vision_Recipe_Num: The ID of a parameter recipe in the Mech-Vision project.

  • Switch_Recipe: Trigger to switch the parameter recipe at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Vision_Proj_Num_O: Mech-Vision project ID.

  • Vision_Recipe_Num_O: The ID of a parameter recipe in the Mech-Vision project.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 1107 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Switch_Recipe is at the rising edge, this example switches the parameter recipe used to No. 2 inMech-Vision project No. 1.

Unnamed image

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

After executing Start Mech-Vision Project, this function gets the collision-free planned path output by the “Path Planning” Step in Mech-Vision.

When using this function, set the Port Type parameter of the “Procedure Out” Step in the Mech-Vision project to “Predefined (robot path)”.

Before executing the function, please set Req_Pose_Num of Start Mech-Vision Project to 0 to reduce the times of execution of the function. If Req_Pose_Num of Start Mech-Vision Project is set to 1, then every time the function is executed, only 1 waypoint can be returned, and the function must be executed multiple times to obtain all the waypoints.
Unnamed image

Parameters

Input Parameters:

  • Vision_Proj_Num: Mech-Vision project ID, which is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to auto-loaded, or else the project ID will not be displayed.

  • Request_Pose_Type: Specify the type of waypoint pose returned by the “Path Planning” Step.

    • 1: The waypoint poses are returned in the form of joint positions (JPs).

    • 2: The waypoint poses are returned in the form of tool center point (TCP).

  • Get_VisData: Obtains the planned path from the “Path Planning” Step in Mech-Vision at the rising edge.

  • Data_Ready: Indicates the pose data is readable when receiving multiple sets of robot pose data.

  • Send_Pose_Num: The number of waypoints output by the “Path Planning” Step in Mech-Vision, from 1 to 20.

  • Target_Pose: TCP of a single waypoint. The data type is Array[0..5] of DInt. This array should be divided by 10000 before being used.

  • Target_Label: Label of a single waypoint. If the labels in the Mech-Vision project are strings, please use the “Label Mapping” Step before the “Procedure Out” Step to map the labels to integers. If there are no labels in the project, the default value of this parameter is 0.

  • Target_Speed: The speed set in the path planning tool.

  • DataAck: Indicates whether the data returned by the function has been read and cached. The data type is Boolean.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Vision_Proj_Num_O: Mech-Vision project ID.

  • Request_Pose_Type_O: The pose type of the waypoint returned by the “Path Planning” Step. 1 indicates JPs, while 2 indicates TCP.

  • Target_Pose_O: TCP of the waypoint. The data type is Array[0..19, 0..5] of DInt. This array should be divided by 10000 before being used.

  • Target_Label_O: Label of the vision target. The data type is Array[0..19] of UDInt.

  • Target_Speed_O: The simulation speed in percentage set in the path planning tool, from 1 to 100.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 1103 will be returned. Otherwise, the corresponding error code will be returned.

  • FromCamera.SEND_POSE_TYPE: The pose type of the waypoint, which is consistent with that of the Request_Pose_Type input parameter. 1 indicates JPs, while 2 indicates TCP.

  • FromCamera.VISUAL_POINT_INDEX: The position of the Vision Move Step in the entire robot motion path. For example, if the path is composed of Steps Fixed-Point Move_1, Fixed-Point Move_2, Vision Move sequentially, the position of Vision Move is 3.

Example

When Camera_User.Get_VisData is at the rising edge, this example obtains the planned path from Mech-Vision No.1 in the form of joint positions.

Unnamed image

Start Mech-Viz Project

In scenarios where both Mech-Vision and Mech-Viz are used, this function starts the Mech-Viz project that triggers the corresponding Mech-Vision project, and therefore the Mech-Viz project can plan the robot path based on the vision points received from Mech-Vision.

Unnamed image

Parameters

Input Parameters:

  • Robot_Pose_Type: The type of robot pose to input to Mech-Viz. The value range is 0–2.

  • Robot_Pose_JPS: Current joint positions of the robot. The data type is one-dimensional Array[0..5] of DInt.

  • Robot_Pose_TCP: Current flange pose of the robot. The data type is one-dimensional Array[0..5] of DInt.

The following table explains the relationship between Robot_Pose_Type and Robot_Pose_JPS/Robot_Pose_TCP.

Robot_Pose_Type Robot_Pose_JPS Robot_Pose_TCP Description Applicable Scenarios

0

0, 0, 0, 0, 0, 0

0, 0, 0, 0, 0, 0

No need to input robot pose to Mech-Viz. The simulated robot in Mech-Viz moves from JPs = [0, 0, 0, 0, 0, 0] to the first waypoint.

Project is in the eye-to-hand mode. This setting is not recommended.

1

Current joint positions of the robot

Current flange pose of the robot

Robot JPs and flange pose must be input to Mech-Viz. The simulated robot in Mech-Viz moves from the input JPs to the first waypoint.

This setting is recommended for projects in the eye-in-hand mode.

2

Specific JPs of the robot

0, 0, 0, 0, 0, 0

The robot JPs of a point determined by teaching must be input to Mech-Viz. The input JPs are used to trigger Mech-Viz to plan the next path in advance while the robot is not in the camera capture region, as shown below. The simulated robot in Mech-Viz moves from the input JPs to the first waypoint.

This setting is recommended for projects in the eye-to-hand mode.

The reason for setting robot pose type to 2 when the project is in the eye-to-hand mode: In the eye-to-hand mode, the camera can perform image capturing for the next round of path planning before the robot returns to the camera capture region and picking region, shortening the cycle time. If Robot_Pose_Type is set to 1, the robot’s current pose is sent to Mech-Viz. The simulated robot will move from the input pose to the first waypoint in the planned path, while the real robot might move to another point first, and then move to the first waypoint. Therefore, the path of the real robot may contain unpredicted collisions, leading to safety hazards. In conclusion, robot pose type should be set to 2 for projects in the eye-to-hand mode.

Unnamed image
Before assigning to the Robot_Pose array, multiply the floating-point numbers that represent joint positions or the robot flange pose by 10000 to convert the data to 32-bit signed integers.
  • Start_Viz: Triggers Mech-Viz project to run at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Robot_Pose_Type_O: Robot pose type.

  • Robot_Pose_JPS_O: Robot joint positions.

  • Robot_Pose_TCP_O: Robot flange pose.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2103 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Start_Viz is at the rising edge, 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.

Unnamed image

StopMech-Viz Project

This function stops the execution of the Mech-Viz Project. This function is only needed if the Mech-Viz project falls into an infinite loop or cannot be stopped normally.

Unnamed image

Parameters

Input Parameters:

  • Stop_Viz: Stops the execution of the Mech-Viz project at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2104 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Stop_Viz is at the rising edge, this example stops the execution of the Mech-Viz project.

Unnamed image

Select Mech-Viz Branch

This function 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. Start Mech-Viz Project must be called BEFORE this function. This function specifies which exit port such Step(s) should take.

Unnamed image

Parameters

Input Parameters:

  • Branch_Name: The Step ID (integer) of the Branch by Msg Step.

  • Branch_Exit_Port: The exit port of the specified Step, i.e., the branch, the project should run along. The value should be an integer. NOTE:

    • An exit port number is the 1-based index of the specified exit port on the Step. For example, if the specified exit port is the second exit port of the Step from left to right, the exit port number is 2.

    • Branch_Name, Branch_Exit_Port, and Index_Name and Index_Counter in the function MM_Set_Index correspond to the same VIZ_TASK_NAME and VIZ_TASK_VALUE tags in the ToCamera struct respectively. If the set values are different, they cannot take effect at the same time.

  • Set_Branch: Sets the branch to take at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Branch_Name_O: Step ID of the Branch by Msg Step.

  • Branch_Exit_Port_O: The number of the exit port to take.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2105 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Set_Branch is at the rising edge, this example tells Mech-Viz to take exit port 1 for the Branch by Msg Step whose Step ID is 1.

Unnamed image

Set Move Index

This function is for setting the index parameter of a Step that involves sequential or separate motions or operations. Steps with index parameters include Move by List, Move by Grid, Custom Pallet Pattern, smart_pallet_pattern, etc.

Start Mech-Viz Project must be called BEFORE this function.

Unnamed image

Parameters

Input Parameters:

  • Index_Name: Step ID of the Step with the index parameter.

  • Index_Counter: The index value that should be set the next time this Step is executed. When this function 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 function, the current index value in Mech-Viz will be increased by 1 to become the parameter’s value.

  • Set_Index: Set the current index of the Step at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Index_Name_O: Step ID of the Step with the index parameter.

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

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2106 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Set_Index is at the rising edge, this example sets the Current Index value to 3 for the Step whose Step ID is 5. When the Step is executed, the Current Index value will be added 1 and become 4.

Unnamed image

Get Mech-Viz Planned Path

This function obtains the planned path from Mech-Viz.

Unnamed image

Parameters

Input Parameters:

  • Request_Pose_Type: Specify the type of waypoint pose returned.

    • 1: The waypoint poses are returned in the form of joint positions (JPs).

    • 2: The waypoint poses are returned in the form of tool center point (TCP).

  • Get_VisData: Obtains the planned path from Mech-Viz at the rising edge.

  • Data_Ready: Indicates the pose data is readable when receiving multiple sets of robot pose data.

  • Send_Pose_Num: The number of waypoints output by Mech-Viz, from 1 to 20. If the planned path contains more than 20 waypoints, please repeat executing this function.

  • Target_Pose: TCP of a single waypoint. The data type is Array[0..5] of DInt. This array should be divided by 10000 before being used.

  • Target_Label: Label of a single waypoint. If the labels in the Mech-Vision project are strings, please use the “Label Mapping” Step before the “Procedure Out” Step to map the labels to integers. If there are no labels in the project, the default value of this parameter is 0.

  • Target_Speed: The speed in percentage set in move-type Step parameters.

  • DataAck: Indicates whether the data returned by the function has been read and cached. The data type is Boolean.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Request_Pose_Type_O: The pose type of the waypoint returned from Mech-Viz. 1 indicates JPs, while 2 indicates TCP.

  • Target_Pose_O: TCP of the waypoint. The data type is Array[0..19, 0..5] of DInt. This array should be divided by 10000 before being used.

  • Target_Label_O: Label of the vision target. The data type is Array[0..19] of UDInt.

  • Target_Speed_O: The speed in percentage set in move-type Step parameters, from 1 to 100.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2100 will be returned. Otherwise, the corresponding error code will be returned.

  • FromCamera.SEND_POSE_TYPE: The pose type of the waypoint, which is consistent with that of the Request_Pose_Type input parameter. 1 indicates JPs, while 2 indicates TCP.

  • FromCamera.VISUAL_POINT_INDEX: The position of the Vision Move Step in the entire robot motion path. For example, if the path is composed of Steps Fixed-Point Move_1, Fixed-Point Move_2, Vision Move sequentially, the position of Vision Move is 3.

Example

When Camera_User.Get_VizData is at the rising edge, this example obtains the planned path from Mech-Viz in the form of TCPs.

Unnamed image

Get DO List

This function gets the planned DO signal list. The DO signal list is used to control multiple grippers or multiple suction cup sections. Before executing this function, Get Planned Path needs to be executed to obtain the planned motion path from Mech-Viz.

Unnamed image

Please deploy the Mech-Viz project based on the example project and set the corresponding suction cup configuration file. The example project is stored in the Mech-Mind Software Suite installation directory (in the Mech-Center\tool\viz_project*suction_zone* folder).

In the parameters of the Set DO List Step:

  • Select “Standard Interface” under “Receiver”.

  • Select “Get DO List from ‘Vision Move’”.

  • Select a Vision Move Step that needs the DO signal list in the drop-down list of the “Select ‘Vision Move’” parameter.

Parameters

Input Parameters:

  • Get_DoList: Obtains the planned DO signal list at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2102 will be returned. Otherwise, the corresponding error code will be returned.

  • FromCamera.DO_LIST: Mech-Viz returns 64 DO port numbers. The valid port numbers are integers, while the value -1 is used as a placeholder.

Example

When Camera_User.Get_DoList is at the rising edge, this example obtains the planned DO signal list from Mech-Viz and stores it in the DO array.

Unnamed image

Input Object Dimensions to Mech-Vision

This function is used for dynamically inputting object dimensions into the Mech-Vision project. Please confirm the actual object dimensions before running the Mech-Vision project.

The Mech-Vision project should contain the “Read Object Dimensions” Step, and the Read Sizes from Properties checkbox of this Step should be selected.

Unnamed image

Parameters

Input Parameters:

  • Vision_Proj_Num: Mech-Vision project ID, which is the number before the project name in the Project List panel in Mech-Vision. Please ensure that the project has been set to auto-loaded, or else the project ID will not be displayed.

  • External_Input_Box_Dimension: Input the object’s length, width, and height (in mm) to Mech-Vision project. Multiply dimension values by 10000 and then assign them External_Input_Box_Dimension[0-2].

    External_Input_Box_Dimension here and External_Input_Pose in the function MM_Set_Pose correspond to the same EXT_INPUT_DATA tag of the ToCamera struct. If the set values are different, they cannot take effect at the same time.

  • Set_Box_Dimension: Inputs the object dimensions in the Mech-Vision project dynamically at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Vision_Proj_Num_O: Mech-Vision project ID.

  • External_Input_Box_Dimension_O: Length, width, and height value of the object.

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 1108 will be returned. Otherwise, the corresponding error code will be returned.

Example

In this example, when the parameter Camera_User.Set_Box_Dimension has a rising edge, the dimensions read by Step Read Object Dimensions in Mech-Vision will be set to the value of External_Input_Box_Dimension[0–2].

Unnamed image

Input TCP to Mech-Viz

This function is used for dynamically inputting robot TCP into the Mech-Viz project after Start Mech-Viz Project is executed. The Step that receives the robot TCP is outer_move.

Please deploy the Mech-Viz project based on the template project. The template project is stored in the Mech-Mind Software Suite installation directory (in the tool\viz_project\outer_move folder). Please place the outer_move Step in the appropriate position of the workflow.

Unnamed image

Parameters

Input Parameters:

  • External_Input_Pose: TCP of the robot in mm. Multiply the pose data by 10000 and then assign them Ext_Input_Data[0-5].

    External_Input_Pose here and External_Input_Box_Dimension in the function MM_Set_Box_Dimension correspond to the same EXT_INPUT_DATA tag of the ToCamera struct. If the set values are different, they cannot take effect at the same time.

  • Set_Input_Pose: Input the TCP data to Mech-Viz project at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: If there is no error, status code 2107 will be returned. Otherwise, the corresponding error code will be returned.

Example

When Camera_User.Set_Pose is at the rising edge, this example sends the TCP data stored in External_Input_Pose[0–5] to the External Move Step in the Mech-Viz project.

Unnamed image

Get Software Status

This function is designed for obtaining the execution status of Mech-Vision, Mech-Viz, and Mech-Center. The function is currently capable of checking whether Mech-Vision is ready to run projects.

Unnamed image

Parameters

Input Parameters:

  • Get_Status: Checks whether Mech-Vision is ready to run projects at the rising edge.

  • Command_Trigger_ACK: Used to determine whether the Command_Trigger signal is triggered successfully. 1 indicates that the signal is triggered successfully, while 0 indicates that the Command_Trigger signal has not been received.

Output Parameters:

  • Command: The code whose value is assigned by the FB automatically.

  • Command_Trigger: The function switch that is triggered by the FB automatically.

Returned Data from the FromCamera Global Tag:

  • FromCamera.STATUS_CODE: Software status. Status code 1101 indicates that Mech-Vision is ready to run projects. Other status codes indicate that Mech-Vision is not ready.

Example

When Camera_User.Get_Status is at the rising edge, this example checks the status code and stores it in FromCamera.STATUS_CODE.

Unnamed image

Clear Target Data

This function clears the obtained data stored in Target_Pose, Target_Label, and Speed_Percentage.

Unnamed image

Parameters

Input Parameters:

  • Start_Empty: Clear the data stored in Target_Pose, Target_Label, and Speed_Percentage at the rising edge.

  • Target_Pose: Obtained pose data.

  • Target_Label: Obtained label.

  • Speed_Percentage: Obtained speed in percentage.

Example

When Camera_User.Start_Empty is at the rising edge, the data stored in Target_Pose, Target_Label, and Speed_Percentage are cleared.

Unnamed image

Appendix

Description of the Status Codes

Please refer to Status Codes and Troubleshooting for detailed information.

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.