a1tQ20000095aP4IAI

Course: AI LAB- Level 1
7. Dobot to Dobot Internal Handshaking

  • 6-12 grade
  • Beginner

Lesson Description:

Robotic arms need to communicate with other robots in a work cell, or factory. This is called HANDSHAKING and can be done between different machines, devices, and robots. It is a very simple form of communication and is done with simple ones and zeros; or “ons” and “offs”.

DobotBlock Lab software can create internal robot to robot communcation/handshaking.

With DobotBlock Lab, we can safely have the robots communicate with no external wiring or other hardware!

Two or more robots will still be communicating with YES and NO signals called messages, this time it will be internally controlled by the computer and software. This too is an industry standard for equipment to be able to communicate at the lowest level (1s and 0s).


KEY VOCABULARY

  • Input
  • Output
  • Signal
  • Network Handshaking


EQUIPMENT & SUPPLIES

  • 2 Magician Lite Robots
  • 2 Magician Lite Work Mats
  • Small cubes & pallets
  • DobotLab software
  • Or printed templates from the resource section

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.

SECTION 1 – SETUP BOTH ROBOTS

Step 1 – 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.
Removing previous EoAT
Snapping suction cup

Step 2 – Attach the Suction Cup

Attach the Suction Cup as the END EFFECTOR or END of ARM TOOLING (EoAT) on both robots.

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

Step 3 – Included Robot Mats / Printed Templates

Line the edges up along the red dotted line. Overlap the mats where the grey arcs intersect. Line up the work-area page with the other two pages. Tape them together. Tape them to the table if needed.

Work-mat alignment Work-mat alignment

SECTION 2 – CONNECTING ROBOTS to the COMPUTER & DOBOTLAB

Step 4 – Connect & Power On

  1. Connect both robots to the computer using their included USB cables.
  2. Open up DobotBlock Lab in the software.
  3. Once ALL of the wiring is done (power cables and robot arm connected), power ON both robots.
    WATCH and WAIT for the robots to completely power on (GREEN INDICATOR).
DobotLab screen 1
DobotLab screen 2
DobotLab Teach & Playback screen

Step 5 – Set Up Robots on the Mats

Select the connect icon to establish control from the siftware ro ROBOT 1. A connection window should pop up.

Both robots on mats

Step 6 – Connect Robot 1

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

HOME ROBOT 1 to ensure communication.

Arm Control Home Power switch icon

Step 7 – Add & Home Robot 2

Helpful tip lock button Two robots can be plugged into the same computer at the same time!

Select Choose a device and add a second Magician Lite. Connect to this device and home it just as we have done with previous activities.

As you click back and forth between the magician devices (icons), you will see a different programming page, one for each. When you save the program, you will save both programs at the same time.

Two devices added

SKILL BUILDER 1 – BROADCAST / Internal Handshaking Between Robots

For this skill builder, test the ability to send a signal from one robot (ROBOT1) to another robot (ROBOT2) as long as they are plugged into the same computer and running off the same file.

The process of sending a signal from one robot to another robot can be done with messages.

Step 8 – Add Broadcast & When Receiving Blocks

Drag over WHEN RECEIVING and BROADCAST blocks from the EVENTS toolbox.

  • The WHEN RECEIVING works the same as the WHEN STARTED, but instead of selecting the START FLAG, the program waits for a message to be received.
  • The BROADCAST block is the tool that initiates the message. Both blocks also have the option to create new messages in their drop-downs.
Arm Control Home

Step 9 – Program ROBOT 1

Create a program similar to the one on the right for ROBOT 2:

  1. WHEN STARTED – send ROBOT2 HOME
  2. BROADCAST MESSAGE
  3. WAIT 5 seconds and repeat
ROBOT1 program screenshot ROBOT1 program screenshot

Step 10 – Program ROBOT 2

Create a program similar to the one on the right for ROBOT 2:

  1. WHEN STARTED – send ROBOT2 HOME
  2. WHEN RECEIVING MESSAGE – once received, move ROBOT2 to one or two new positions and then back to home. ROBOT2 needs to be back at the home position in less than the 5 seconds to receive the next message.
ROBOT2 program screenshot

The program created is an OPEN LOOP system. ROBOT1 does not know ROBOT2 has received the signal.

Step 11 – Broadcast and Wait

Change the BROADCAST MESSAGE to BROADCAST and WAIT. ROBOT1 will now send the signal and wait until the broadcast is received by ROBOT2.

Recreate the CLOSED LOOP process using VARIABLES:

ROBOT2 program screenshot
ROBOT1 program screenshot ROBOT1 program screenshot

Step 12 – Re-create Using VARIABLES

  • Create a VARIABLE called SIG RECEIVED ROBOT2 and alter the two programs.
  • Is the program really working correctly? It may look like it is working, but once the variable is set to TRUE it never changes. Alter ROBOT1’s program to change the variable back to 0 once it is received.
  • Change the time to 10 seconds to make sure it is working correctly. Run the program.
ROBOT2 program screenshot

These tools are great for one way communication, but the trick is how to wait for a message in the middle of a program rather than just using it to start the ENTIRE PROCESS… Is there a better way to do this?

…Notice that there is only one list of variables for the SPRITE

…NOTICE that variables are not only GLOBAL for one robot’s program but for all of them!! (each robot can SET AND USE the same variables)

If the program can use WHEN MESSAGE RECEIVED blocks to control variables… we can then handshake in the middle of a program.

The program can use the variable in the middle of the program to tell the robot when to proceed. (each time the message is received, set a variable to tell the program the message has been received)

The WAIT UNTIL with the SIG RECEIVED block is a great way to make this happen.

Two devices added Two devices added

SKILL BUILDER 2 – VARIABLES ONLY / Internal Handshaking Between Robots

Step 13 – Create Additional Variables

Create an additional variable:

  • SEND SIG ROBOT1
  • SIG RECEIVED ROBOT2

ROBOT1 will use SET SEND SIG to TRUE (1) to start ROBOT2.
ROBOT2 will use SET SIG RECEIVED to TRUE (1) to let ROBOT1 know the signal has been processed.

The variables will be SET to FALSE (0) to reset them for the next loop.

Step 14 – Operation ROBOT 1 (Control Robot)

Outline:

  1. Initialize variables to ZERO (only one robot needs to do this).
  2. GO TO HOME  → Start FOREVER LOOP:
  3. Move to location “A”.
  4. Move to location “B”.
  5. GO TO HOME.
  6. SEND the signal to start ROBOT2.
  7. WAIT until ROBOT2 has received the signal.
  8. Turn off the SEND signal and the RECEIVE signal.
  9. Wait 5 seconds.
  10. Loop the process.
Two devices added

Step 15 – Operation ROBOT 2

Outline:

  1. GO TO HOME  → Start FOREVER LOOP:
  2. SEND a signal to ROBOT1 that the sequence has been started (ROBOT1 resets variables).
  3. Move to location “A”.
  4. Move to location “B”.
  5. GO TO HOME.
  6. Loop the process.
Two devices added

SECTION 3 – PASS the BLOCK

HOME both robots before placing them on the templates. NOTICE there is an overlap in their work envelopes. The robots can run into each other during the homing operation.

Order of operations

  • ROBOT 1
    • Move – SAFE HOME
    • Move – Cube from Position #1 to #2
    • Move – SAFE HOME
    • Send START SIGNAL to ROBOT2
    • WAIT for START SIGNAL from ROBOT2
    • Turn OFF Signal from ROBOT2
    • ** LOOP
  • ROBOT 2
    • Move – SAFE HOME
    • WAIT for START SIGNAL from ROBOT1
    • Turn OFF Signal from ROBOT1
    • Move Cube from Position #2 to #3
    • Move – SAFE HOME
    • Send START SIGNAL to ROBOT1
    • ** LOOP
Snapping suction cup

Give each robot a SAFE HOME position. A position that is out of the way of the other robot, so that they never run into one another.

Fun Fact: If they did run into each other, the robots are intelligent enough to know they have run into something along their path and will stop immediately so that there is minimal damage to the equipment, and everyone working around them is a lot safer!


Teaching Tips:

CONCLUSION

  1. Explain why you would ever want to make two robots communicate with each other. What are the benefits? Use at least three bullet points.
  2. What is the advantage to using variables in this program? Use at least three bullet points.
  3. Look up the word “Cobot” or “Collaborative Robot” on the internet and find a definition that you understand. Is the Magician Lite, the robot that you are using in this activity a Cobot? Explain why it is in your own words.

GOING BEYOND

  • Use what you learned in previous activities and make ROBOT 1 move to the other two spots in the row automatically, and make ROBOT 2 stack the three blocks on pallet 2.
  • Use two robots where:
      a. ROBOT 1 picks up the first block on Pallet 1 in a row of three.
      b. ROBOT 1 places it on the corner of pallet 2.
      c. ROBOT 2 then moves it to another part of pallet 2.
      d. ROBOT 2 stacks the block on the other one.
      e. ROBOT 2 goes home.
      f. Repeat this multiple times.
      g. How many can you get them to stack successfully?

Teacher Initials _________