ABB Standard Interface Commands¶
The ABB Standard Interface provides the following procedures:
When programming the ABB 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.
Arguments in the program: the input arguments can be constants, global variables or local variables, and the output arguments can be global variables or local variables.
This Standard Interface is over the TCP/IP protocol.
Initialize Communication¶
MM_Init_Socket "IP_Address",Server_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
IP_Address
the IP address of the host
Server_Port
TCP/IP port number; the default port number is 50000
Time_Out
Wait time in seconds before stopping connection attempt
Example¶
MM_Init_Socket "192.168.1.20",50000,60;
When running the example, 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 60 seconds.
Start Mech-Vision Project¶
MM_Start_Vis Job,Pos_Num_Need,SendPos_Type;
This procedure is 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
Please go to
to check and adjust the number.Pos_Num_Need
Number of poses for Mech-Vision to send, from 0 to 20, where 0 means “send all”.
SendPos_Type
Set the image capturing pose for the robot to send, from 0 to 2
0: Do not send image capturing pose (for Eye To Hand) 1: Send image capturing pose as joint positions 2: Send image capturing pose as robot flange pose
Example¶
MM_Start_Vis 1,1,1;
This example triggers Mech-Vision No. 1 project to run; the Mech-Vision No. 1 project is expected to send back 1 pose; and the robot will send image capturing pose as joint to Mech-Center.
Get Vision Result¶
MM_Get_VisData Job,Last_Data,Pos_Num,MM_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.
Parameters¶
Input Parameter
Name
Description
Job
Mech-Vision Project ID, from 1 to 99
Please go to
to check and adjust the number.Output Parameters
Name
Description
Last_Data
Variable, indicating whether all vision result has been sent, 0 or 1
0: NOT all vision result has been sent (more on the way) 1: All vision result has been sent
Pos_Num
Variable for storing the number of received poses
MM_Status
Variable for storing status code, refer to the Status Codes
Example¶
MM_Get_VisData 1,LastData,PoseNum,MMStatus;
This example obtains the vision result from Mech-Vision project No.1. Whether all vision result has been sent is stored in LastData, the number of poses received is stored in PoseNum, and the status code is stored in MMStatus.
Start Mech-Viz Project¶
MM_Start_Viz SendPos_Type;
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 Parameter
Name
Description
SendPos_Type
The initial joint positions for the simulated robot in Mech-Viz, 0 or 1
0: Set the initial joint positions of the simulated robot to [0,0,0,0,0,0] 1: Set the initial joint positions of the simulated robot to the current joint positions of the real robot
Note
When the scene contains object models that obstruct the robot to move from [0,0,0,0,0,0] to the first target point, this parameter must be set to 1.
Example¶
MM_Start_Viz 1;
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_VizData GetPos_Type,Last_Data,Pos_Num,VisPos_Num,MM_Status;
This procedure obtains the planned path from Mech-Viz.
Parameters¶
Input Parameter
Name
Description
GetPos_Type
Whether Mech-Viz should send target points as joint positions or TCPs, 1 or 2
1: Mech-Viz sends joint positions 2: Mech-Viz sends TCPs
Output Parameters
Name
Description
Last_Data
Variable, indicating whether all target points have been sent, 0 or 1
0: NOT all target points have been sent (more on the way) 1: All target points have been sent
Pos_Num
Variable for storing the number of received target points
VisPos_Num
Variable for storing the position of the first visual_move target point in the path
Example path: move-1, move-2, visual_move-3, move-3, visual_move-2 In this path, the position of the first visual_move target point is 3. If the path does not contain visual_move target point, the return value is 0.
MM_Status
Variable for storing status code, refer to the Status Codes
Example¶
MM_Get_VizData 2,Last,Pose_Num,Vis_Index,StatusCode;
This example obtains the planned path from Mech-Viz in the form of TCPs. Whether all target points have been sent is stored in Last, the number of target points received is stored in Pose_Num, the position of the visual_move target point is stored in Vis_Index, and the status code is stored in StatusCode.
Obtain Pose¶
MM_Get_Pose Index,P90,Label,Pose_Speed;
This procedure stores a pose returned by Mech-Vision or a target point (as TCP) returned by Mech-Viz in the specified variable.
Parameters¶
Input Parameter
Name
Description
Index
Specify the index of the pose to be stored
Output Parameters
Name
Description
P90
Variable for storing the specified pose
Label
Variable for storing the label corresponding to the specified pose
Pose_Speed
Variable for storing the speed corresponding to the specified pose
Example¶
MM_Get_Pose 1,P90,Label,PoseSpeed1;
This example stores the first received pose to P90, the corresponding label to Label, and the corresponding speed to PoseSpeed1.
Obtain Joint Positions¶
MM_Get_Jps Index,Jointtarget,Label,Pose_Speed;
This procedure stores a set of joint positions returned by Mech-Viz in the specified variable.
Note
As Mech-Vision does not output joint position data, this procedure can only be used with Mech-Viz.
Parameters¶
Input Parameter
Name
Description
Index
Specify the index of the set of joint positions to be stored
Output Parameters
Name
Description
Jointtarget
Variable for storing the specified set of joint positions
Label
Variable for storing the label corresponding to the specified set of joint positions
Pose_Speed
Variable for storing the speed corresponding to the specified set of joint positions
Example¶
MM_Get_Jps 1,jpose1,Label1,PoseSpeed1;
This example stores the first set of received joint positions to jpose1, the corresponding label to Label1, and the corresponding speed to PoseSpeed1.
Switch Mech-Vision Recipe¶
MM_Switch_Model Job,Model_Number;
This procedure specifies which parameter recipe of the Mech-Vision project to use. For more information on parameter recipe, please see Parameter Recipe Configuration.
Note
This procedure must be called BEFORE MM_Start_Vis.
Parameters¶
Input Parameters:
Name
Description
Job
Mech-Vision Project ID, from 1 to 99
Can check and adjust in
Model_Number
The number of a parameter recipe in the Mech-Vision project, from 1 to 99
Example¶
MM_Switch_Model 1,1;
This example switches the parameter recipe used to No. 1 in Mech-Vision project No. 1.
Select Mech-Viz Branch¶
MM_Set_Branch Branch_Num,Exit_Num;
This procedure is used to select along which branch the Mech-Viz project should proceed. Such branching is achieved by adding branch_by_service_message Task(s) to the project. This procedure specifies which out port such Task(s) should take.
Note
MM_Start_Viz must be called BEFORE this procedure.
When the next Task to be executed in Mech-Viz is a branch_by_service_message Task, Mech-Viz will wait for this procedure to send the out port number it should take.
The name of all branch_by_service_message Tasks in the Mech-Viz project must be changed to numbers between 1 and 99, and the names should be unique among all tasks in the project.
Parameters¶
Input Parameters
Name
Description
Branch_Num
Name of the branch_by_service_message Task, from 1 to 99
Exit_Num
The number of the out port to take, from 1 to 99
Example¶
MM_Set_Branch 1,3;
This example tells Mech-Viz to take out port 3 for the branch_by_service_message Task named 1.
Set Move Index¶
MM_Set_Index Skill_Num,Index_Num;
This procedure sets the value for the Current Index parameter of Mech-Viz Tasks. Tasks that have this parameter include move_list, move_grid, custom_pallet_pattern, and smart_pallet_pattern.
Note
MM_Start_Viz must be called BEFORE this procedure.
The name of all Tasks with index parameters in the Mech-Viz project must be changed to numbers between 1 and 99, and the names should be unique among all tasks in the project.
Parameters¶
Input Parameters
Name
Description
Skill_Num
Name of the Task, from 1 to 99
Index_Num
Value for the Current Index parameter when the Task is executed
Example¶
MM_Set_Index (2,10);
This example sets the Current Index value to 9 for the Task named 2. When the Task is executed, the Current Index value will be added 1 and become 10.
Get Software Status¶
MM_Get_Status 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 the status code, refer to the Status Codes
Example¶
MM_Get_Status StatusCode;
This example obtains the status code and stores it in StatusCode.
Input Object Dimensions to Mech-Vision¶
MM_Set_BoxSize Job,Lenght,Width,Height;
This procedure inputs object dimensions to the Mech-Vision project.
Note
This procedure must be called BEFORE MM_Start_Vis.
Parameters¶
Input Parameters
Name
Description
Job
Mech-Vision Project ID, from 1 to 99
Can check and adjust in
Lenght
Length of object in mm
Width
Width of object in mm
Height
Height of object in mm
Example¶
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 DO Signal List¶
MM_Get_DoList Status;
This procedure obtains the planned DO Signal list for controlling multiple sections of a sectioned vacuum gripper.
Note
MM_Get_VizData must be called BEFORE this procedure.
Please deploy the Mech-Viz project based on the template project in Mech-Center/tool/viz_project/suction_zone, and set the suction cup configuration file in the Mech-Viz project.
Set the current robot model as the Received Name in Mech-Viz.
Parameter¶
Output Parameter
Name
Description
Status
Variable for storing the status code, refer to the Status Codes
Set DO Signal List¶
MM_Set_DoList Serial,GO16;
This procedure sets the DoList sent by Mech-Viz to go signals. It supports 4 groups of 16-bit go signals in maximum. If you need to set multiple groups of go signal, please run this procedure for several times.
Note
MM_Get_DoList must be called BEFORE this procedure.
Parameters¶
Input Parameters
Name
Description
Serial
Variable for storing the status code
GO16
Group output for setting DO signals
Example¶
| MM_Set_DoList 1,GO16;
| MM_Set_DoList 2,GO32;
The first example sets the 0-15 values in the DoList calculated by Mech-Viz to corresponding GO16 signals, and the second example sets the 16-32 values in DoList to corresponding GO32 signals.
Input TCP to Mech-Viz¶
MM_Set_Pos Pos;
This procedure inputs TCP data to the outer_move Task.
Note
This procedure must be called BEFORE MM_Start_Viz.
Please deploy the Mech-Viz project based on the template project in Mech-Centertoolviz_projectouter_move, and put the outer_move Task at a proper position in the workflow.
Parameter¶
Input Parameter
Name
Description
Pos
Variable for storing the TCP data to be sent to Mech-Viz
Example¶
MM_Set_Pos P10;
This example sends the TCP data stored in P10 to the outer_move task in the Mech-Viz project.
Calibration¶
MM_Calib Move_Type,Pos_Jps,Wait_time,\\num Ext;
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 ABB Calibration Program.
Parameters¶
Input Parameters
Name
Description
Move_Type
Motion type, 1 or 2
1: MoveL 2: MoveJ
Pos_Jps
Pose as flange pose or joint positions, 1 or 2
1: flange pose 2: Joint positions
Wait_Time
Wait time between poses in seconds
Ext
Data of the external 7th axis in mm (Optional)
Examples¶
Example 1
MM_Calib 2,1,300;
This example moves the robot in MoveJ type, receives pose data in the form of flange pose, and sets the wait time between two poses to 300 seconds. In addtion, this robot does not have an external axis installed.
Example 1
MM_Calib 2,1,300,\\EXT:=Axis7;
This example moves the robot in MoveJ type, receives pose data in the form of flange pose, and sets the wait time between two poses to 300 seconds. Moreover, the 7th axis value of this robot is Axis7.