a1tQ2000008U7gzIAC

Course: AI LAB- Level 1
Pick and Place Routines - Blockly

  • 6-12 grade
  • Beginner

Lesson Description:

Robotic arms are excellent for pick-and-place operations—from placing tiny electronic parts on circuit boards to stacking large boxes on pallets. In this activity you’ll program the Dobot Magician Lite with a soft-gripper end effector to pick a cube at letter “E” and place it at letter “B”. A reliable pick-and-place routine always moves to a point above the pick or place position first, then descends straight down so there’s no friction or collision with the work surface.

Key Vocabulary
• Relative positions
• Palletizing
• Pick and Place
• Home
• Linear movements
• Joint movements
• End effector
• End-of-Arm Tooling (EoAT)

Equipment & Supplies
• Dobot Magician Lite
• Dobot Lite work-mat / field diagram
• Soft-gripper EoAT + air hose
• Small cubes (payload)
• DobotLab software

image description

Lesson Modules


Teaching Tips:

Caution: NEVER wire anything to the Dobot Magician while it has power on. ALWAYS turn it off before making connections or damage to the robot could occur. Be sure to ask your instructor if you have any questions.

Typical Start Up Procedure

  • Disconnect any existing END of ARM TOOLING (EoAT).
  • Carefully disconnect any existing vacuum tubes.
  • Press and hold the release button on the bottom of the arm and pull off the EoAT.

1. Attach the Suction Cup EoAT

  • STEP 1 – Push the suction cup in until it snaps in place.
  • STEP 2 – Attach the hose to the air nozzle.

The suction cup works by creating a vacuum against a flat smooth surface.

2. Set up the Magician Lite Work Mat or print a field diagram

The bottom of the suction cup is rubber and acts like a spring. When picking up an object, lower the Z value just until the suction cup has started to compress. Try to centre the suction cup on the object. Do NOT force the suction cup down too far!

3. Power on the Robot

Once ALL wiring is done (sensors connected and robot arm connected), power ON the robot. WATCH and WAIT for the robot to completely power on (GREEN INDICATOR).

4. Open DobotBlock Lab and connect

Open up DobotBlock Lab in the software and connect to the robot.

5. Select the connect icon

Select the connect icon to establish control from the software to the robot. A connection window should pop up.

6. Select Connect

Select Connect from the pop-up window. A new window should appear showing the robot is Connected.

NOTE: If the Magician is not on the device list, scroll down to choose a device. If no robot is found, the prompt will show “Searching Devices”. Re-connect the robot and select Refresh.

7. Home the robot

Once the robot is connected, we need to home the robot to set its home position.

Before HOMING the robot, make sure the robot’s WORK ENVELOPE is clear.

Select the HOME icon to start the robot’s homing process. Homing the robot will return and set the robot to its initial HOME position.

8. Choose the Suction Cup as the EoAT

Next, choose the Suction Cup as the Dobot’s END EFFECTOR or EoAT. You may need to scroll down to see the EoAT selections.


Teaching Tips:

9. XYZ & Joint Motion

As with industrial robots, DobotBlock Lab provides two methods for driving the robot manually:

  • JOINT MOTION – configure one joint at a time by DEGREES. Practise with this type of movement.
  • XYZ MOTION – moves on multiple axes at one time by ABSOLUTE COORDINATES. Practise with this type as well.

LINEAR MOTION / JOINT MOTION table:

  • X – In and Out  J1 – Waist
  • Y – Side to Side  J2 – Shoulder
  • Z – Up and Down  J3 – Elbow
  •        J4 – Wrist (only available when gripper or suction cup servo is attached)

The position data can be collected from either method depending on the coordinate motion style used when developing a program.

Shown below is the main menu for the Blockly programming section of DobotBlock Lab. On the left are categories and tools that each block of code is sorted into. On the right are controls for zooming around the program as you develop it. The scroll wheel on the mouse can also be used to scroll up and down. The scroll wheel or the left mouse button can also be pressed and held to pan throughout the program workspace.

The Crosshair Icon can be used to reset the zoom level back to default and centre your code in the middle of the field.

Categories used in this activity

Control • Events • Settings • Motion (found in the left menu)

13. Add setup code

Each program will typically start with some setup code (EoAT, motion velocity, inputs, outputs…).

Drag over the Set end effector tool from the SETTINGS category. Change the EoAT to the Suction Cup.

14. Drag over multiple “Go to XYZR” blocks

From the MOTION category, drag over eight Go to XYZR blocks, one for each movement of a pick-and-place routine.

You can also right-click an existing block and choose Duplicate or Duplicate Single.

15. Add names/comments to each step

Right-click on a block and select Add Comment. Type the name of the step (example diagram). Collapse the comment when done. Repeat for all eight movement steps.

16. Have your instructor identify your start and end positions.

17. Find the XYZ R coordinates for each position

Press and hold the lock button on the arm to manually move, then release to regain control. Move to a HOME position first, then use Fill Coordinates to populate each block. Touch up (round) coordinates as needed.

XYZR
Home
Above Pick
At Pick
Above Pick
Above Place
At Place
Above Place
Home

18. Dry-run the positions

Perform a dry-run (movements only) to ensure positions work. Drag the WHEN GO IS CLICKED event (green flag) from the EVENTS category to the top of the program.

20. Add suction-cup open/close steps

From the MOTION category, drag the Gripper tool. Insert a close action after At Pick and an open action after At Place.

Right-click each step and Execute to test. The suction cup will automatically enable when an open/close step is executed.

21. Add pauses

Add a 1-second wait block after turning the suction cup on and off to ensure full vacuum and release.

Test the program again to verify it works as expected.

When dragging blocks of code: selecting the top block drags that block and all connected below; selecting in the middle detaches that block and those beneath.

If your setup did not work the first time, what did you have to do to make it work?


Teaching Tips:

CONCLUSION

  1. What are the five necessary positions for a pick and place operation?
  2. Explain in your own words why it was necessary to add delay times into the program.
  3. What is the purpose of the safe positions programmed above the object before it is picked up?

GOING BEYOND

Finished early? Try some of the actions below. When finished, show your instructor and have them initial on the line.

  • Reverse the process so that at the end the robot puts the cube/cylinder back in its original position.
  • Try picking and placing the object on locations that are not directly in front of the robot. What does this change? Can this be corrected in Blockly as it was in Teach and Playback? How?
  • For the sake of accuracy, change the speed of the arm as it moves from ABPICK to ATPICK, and ABDROP to ATDROP, to slow it down by half. (The codes needed to control speed are in the SETTINGS toolbox.)

________ Instructor Initial 1  ________ Initial 2  ________ Initial 3