mm_viz_pick_and_place

This example program triggers the Mech-Viz project to plan a robot path and move the robot to the first waypoint.

Please make sure that the Lua script is running in the background. Otherwise, the communication between the robot and the Software Suite cannot be established.

Program Logic

NOP
WAIT B099 = 0
SET B109 1
//run viz pose type
SET B099 4
//start viz
WAIT B099 = 0
// SET B110 1
// //set branch id
// SET B111 1
// //set branch out port
// SET B099 5
// //set branch
// WAIT B099 = 0
// SET B112 2
// //set index id
// SET B113 1
// //set index out port
// SET B099 6
// //set index
// WAIT B099 = 0
SET B114 2
// receive viz pose type
SET B099 7
// receive from viz
WAIT B099 = 0
SET B099 9
// set viz to v101-v120 p101-p120
WAIT B099 = 0
// MOVL V100 V=100MM/S CR=0.000MM
END
  • Line 3: Set the type of pose to send to Mech-Viz (2 means to send the current joint positions and flange pose).

  • Line 5: Send the command for triggering the Mech-Viz project to run.

  • Line 8: Set the Step ID of the Branch by Msg Step for which branch selection is required.

  • Line 10: Set the exit port to take for the above Step.

  • Line 12: Send the command for selecting the branch along which the Mech-Viz project should proceed.

  • Line 15: Set the Step ID of the Step with the Current Index parameter.

  • Line 17: Set the value of the Current Index parameter in the above step.

  • Line 19: Send the command for setting the Current Index parameter.

  • Line 22: Set the type of waypoint pose to be obtained from Mech-Viz (2 means to obtain waypoint poses as TCPs).

  • Line 24: Send the command for obtaining the planned path.

  • Line 27: Send the command for storing the obtained waypoint poses from Mech-Viz to variables V101-V120 (If obtained waypoint poses are joint positions, they are stored in variables P101 to P120).

  • Line 30: Move the robot to the obtained waypoint pose. Modify the command and/or add more robot motion commands according to actual needs.

Run the mm_viz_pick_and_place program

Open Needed Variables

As the waypoint poses received from Mech-Viz will be stored in variables V101 to V120 (if TCP) or P101 to P120 (if joint positions), please open these 40 variables first according to the following steps.

  1. On the teach pendant, select Monitor  Global variables  Var_V.

    elite example1

    If the dot in the Status column is red, the variable is not opened. Select a closed variable, and select Open in the lower left to open it.

    elite example2
  2. Similarly, select Monitor  Global variables  Var_P and open all the P101 to P120 variables.

    elite example3
  3. Select Quit to return to the home page.

Select Program

On the home page, select the mm_viz_pick_and_place program, and select Open.

elite example viz

Run the Program

  1. Move the cursor to the first line of the program, and turn the key to PLAY.

  2. Press the yellow button in the lower right of the teach pendant to start the servo motors, and then press the green button to run the program automatically.

    elite example4
  3. If the program is run successfully, The received waypoint poses will be stored in the variables starting from V101 or P101, depending on the type of waypoint poses obtained.

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.