a1tQ2000009220XIAQ

Course: AI LAB- Level 1
4. Using Jumps and Loops - TP

  • 6-12 grade
  • Beginner

Lesson Description:

A PICK AND PLACE style of moving objects around are staples of industrial robots. Another reason to use robots in industry and automation is because of human safety. Robots can work in adverse environments that are dangerous to humans; especially when dealing with chemicals and other toxic substances.

Sometimes the best way to pick up an object is with a suction cup or VACUUM GRIPPER. This works especially well with very small objects and provides a less expensive alternative to a MECHANICAL GRIPPER or a SOFT GRIPPER.

In this activity, you will perform an anodizing operation (which can use harmful chemicals) with a robot arm using the air pump kit and a vacuum gripper.

Do not drop the object in the tanks… wait for the 2 second dip to complete and move on.

Dip Tank Set Up Use the printed field diagram with the dip tank locations for this activity. 3D printed dip tanks can be added for a more realistic activity. And a Dobot field diagram. In this diagram four tanks are used.

Remember: We always go to a position above the pick or place point first so that the robot places the object straight down, with no friction or interference. This will increase accuracy!


KEY VOCABULARY

  • TCP
  • Loop
  • Touch up
  • Teach
  • Suction
  • Vacuum
  • Linear movement
  • Joint movement

All blockly commands and robotics terms have been put into a separate glossary that can be found in the Resources chapter of this curriculum.


EQUIPMENT & SUPPLIES

  • Dobot Magician Lite
  • Dobot Dipping Field Diagram
  • Small Cubes & Pallets
  • Suction Cup Gripper
  • DobotLab software
  • Optional: 3D printed dip tanks (1” PVC Caps or small plastic cups work well)

image description

Lesson Modules


Teaching Tips:

PROCEDURE

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.

1. Attach the Suction Cup to the robot as shown below.

Attach Suction Cup

2. Set up the Dobot dip tank field diagram as shown below.

Dobot dip tank field diagram
Dip Tank Closeup 1 Dip Tank Closeup 2

3. Open DobotLab software, open the Teach and Playback Lab, connect and home the robot, and be sure the Suction Cup is chosen as the END OF ARM TOOLING (EoAT) in both the ARM CONTROL PANEL and the COMMAND CONTROL PANEL.

Arm Control Panel
Arm Control Panel
Command Control Panel
Command Control Panel

4. Once the robot is setup, create the rough sequence to perform the following actions:

  • a. Go home
  • b. Pick up the cube from the pallet
  • c. Dip it in Tank 1 for 2 seconds
  • d. Jump the object and dip it in Tank 2 for 2 seconds
  • e. Jump the object and dip it in Tank 3 for 2 seconds
  • f. Jump the object and dip it in Tank 4 for 2 seconds
  • g. Move the part back to the pallet.
  • h. Go home
Sequence example
Side Image 1 Side Image 2

5. Be sure to turn on/off the Suction Cup when necessary.

Suction Cup On/Off

6. Hit the Play button to run your program and see what happens. Did it work the first time? If not, what did you have to change to make it work?

Play button

7. When recording points using the lock button, it is not always very accurate. When you look at all the Z values of all the above tank positions, they are probably very different.

We can make them all the same by clicking on the values and typing in a value that works well; this is called TEACHING. When fixing points like this it is also called TOUCHING UP points.

Touch up icon You can even use this method to touch up the x and y values of the tanks to make sure they are in a straight line.

If you are using cubes, change all of the Roll Angles to zero as we did in Activity 2.

Roll Angle Example
Values buttons

8. How many lines of code did it take to write the program using what you have learned before? How many points did you have to teach it?


9. Now we are going to use the JUMP command to make the program even easier, and much more accurate. Open a new program.

Jump icon

What is a JUMP? A JUMP movement combines three steps into one. It combines the raise up, over, and back down to the same Z level at new location. This type of movement simplifies repetitive movements such as a dipping operation or soldering operation. The Z Height is defined in the JUMP parameters in the settings menu.

Jump Parameters Example

A JUMP movement does not replace the initial ABOVE position or the initial AT position or ABOVE the final position. It is only used to RAISE UP / MOVE TO A DIFFERENT POSITION / RETURN TO Z FROM LAST POSITION.

EXAMPLE:

  • HOME
  • ABPick
  • ATPick
  • JUMP to ATPlace (Blue)
  • ABPlace
  • HOME

10. This time, only record the following points:

  • Home
  • Above Pick and At Pick
  • At Tank 1
  • At Tank 2
  • At Tank 3
  • Above Tank 4 and At Tank 4
  • Home

Do not record any above points except for Above Pick and Above Tank 4. Jumps will replace these points.

Jump Parameters Example

11. Now change the MotionStyle of the Tank 1, Tank 2, Tank 3, and Tank 4 to JUMP. Double click on the MotionStyle box for each point and change it from MOVJ to JUMP.

Now play the program. What does this change do to the program?

Jump Parameter Settings Jump Height Example

12. Adjusting Jump Height

To change the Z height for JUMP, open Jump Parameter Settings and edit the value. This lets you clear the tank safely.

Compare the first dipping program to the second with JUMPS—how is it more efficient?

Jump Parameter Settings Jump Height Example

13. Now add the missing steps to finish the sequence:

  • Move Linear Movements (MoveL)
  • Pause for Time
  • Suction Cup On and Off

14. Next, add the ability to make the robot repeat the operation five times. Do this with a process called LOOP. LOOPS will make something happen multiple times so that our program is shorter and more efficient. In the TEACH AND PLAYBACK LAB, the loop function will loop the entire program from start to finish. We do not have the ability to control how much of the program will loop or even if it should loop (a conditional loop).

15. To make your program LOOP multiple times, just add the number of times you want it to repeat in the loop window.

Loop window example

16. Be sure to save your work when done.


Teaching Tips:

CONCLUSION

  1. Describe a MOVL move using the Dobot.
  2. Describe a MOVJ move when using a Dobot.
  3. What makes a Jump command more efficient to code than a MOVJ or MOVL?
  4. What kind of manufacturing process is dipping? Explain your answer.
  5. Anodizing is a manufacturing process. Explain how it works and why we do it.

GOING BEYOND

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

  • Take away the first tank and change the program to fix the operation using the software.
  • Add another tank and change the program to fix the operation using the software.
  • Raise the tanks using a block of wood provided by your instructor and fix the operation using the software. What is the most efficient way to do this?
  • Randomize the tank patterns for the dipping process. Random Tank Pattern Example