ABB RobotStudio - Industrial Palletizing Robot - Sorting and Pick&Place Tutorial by Maurilio Patino
Video: https://youtu.be/y0FjnO8AysQ
#Industrial_Robot #RobotStudio #ABB #Industrial_Automation #Robotics
Table of Contents:
A) Intro - Goals & Tutorial Content
The goal of this tutorial is:
Using Robot Studio:
- Select a robot from the ABB family and attach a suction cup as a gripper.
- On a conveyor belt, 3 small orange boxes (20x20x10 cm) and 3 large green boxes (20x20x20 cm) will appear, which the robot must stack on each side.
- Create a video (tutorial-style) with all the steps to accomplish this.
- Using ISO 10218, include safety elements for industrial robots.
Image Source: https://youtu.be/e9MmI2cGiE8?si=uYsEaGdG5C7VK0yr
The tutorial consists of 4 parts:
-
Part 1 – Vacuum Gripper using Smart Components
In this section a .SAT CAD model is imported to generate the gripper in RobotStudio and with Smart Components a sensor is placed on the TCP and the Attach/Detach function is activated with a digital input. -
Part 2 – Conveyor using Smart Components
In this section, a conveyor is built by applying physical properties to the belt and to the boxes. Sensors are placed at the end of the conveyor and the belt is stopped if a box is detected at the end. -
Part 3 – Pick & Place with Work Objects, Offsets and Digital Signals
For the Pick & Place, trajectories were made using Work Objects with respect to the conveyor and the 2 pallets near the robot. The creation of boxes and the activation of the suction cup are controlled from the controller using digital input and output signals, finally the Paths are modified to include an offset that allows the boxes to be stacked one on top of the other. -
Part 4 – Security Measures with ISO 10218, QuickStop and World Zones
Finally, a brief presentation of the ISO 10218:2011 standard is made and the respective CAD models that represent the security elements established in the ISO standard are imported. A QuickStop and Start button is implemented to simulate the scenario in which the light curtain detects a person entering the palletizer and the World Zone function is added to stop the robot if it is inside a special zone defined by the user.
You can clone the repository here
A.1) 🔣 Legend of Symbols Used in this Tutorial
📝 = Procedure
💡 = Tip
⚠️ = Warning
🧠 = Theory Explained
🌐 = Web Site used
A.2) 💡 Tip - Basic Keyboard Shortcuts & Commands
Read more here:
B) 📦🤏 Part 1 – Build a Vacuum Gripper using Smart Components
B.1) 🌐Tip - Find a CAD File for the Robot Tool (Vacuum Gripper)
First, make the [[robot tool]] with [[Smart Components]]
Export the CAD in .SAT
format (use any CAD SW to save the file as .SAT
),
you can grab any example from GrabCAD,🌐
B.2) Procedure📝- How to Create a Custom Gripper Smart Component
B.2.0) Step 0: Import the Gripper CAD into an Empty Station
Create an Empty Station,
Import the desired Geometry,
Select the .SAT
file for our [[robot tool]],
B.2.1) Step1: Set up the Tool Frame at the Tool Center Point (TCP)
Before creating the Robot's [[Tool Frame]], first we need to align the tool.
Note: We will use the the [[World Frame]] as Reference.
Our goal is to have this alignment,
We start by clicking on our Component and select the Rotate tool,
Next, we rotate the tool to expose its base,
And now we need to select a point from the base, use the Place Tool --> One Point,
Select the Snap Center Tool,
Then, select where we want to write our coordinates,
Click on the Center Point of the Tool Base,
And click on Apply to place our tool to the Worlds Frame Origin,
Now we will Rotate the tool to align it's axis,
We must achieve this orientation,
Once the tool is aligned, go to Frame --> Create Frame,
And just click on Create (make sure the [[World Frame]] is selected as Reference),
And now, to place the [[Tool Frame]] at the [[Tool Center Point (TCP)]], we will open the CAD model and measure the distance to the [[Tool Center Point (TCP)]] from the base, it is 184 mm
,
And now we move the [[Tool Frame]] to the [[Tool Center Point (TCP)]], we select the Set Position tool,
And Apply the new position,
Now we can close it,
B.2.2) Step2: Generate a Custom Tool File for RobotStudio
Now go to Modeling and then Create Tool,
First, we name our Tool and use "Existing Component",
Then we need to select the tool's [[Center of Gravity]], for this we need to use the Snap Gravity tool,
Highlight one coordinate and click on the Robot Tool,
Now the [[Center of Gravity]] is selected, click on Next,
Now we name the [[Tool Center Point (TCP)]] and select the created [[Tool Frame]],
Now add the [[Tool Center Point (TCP)]] Information,
We have finished,
B.2.3) Step3: (Optional) Save Custom Tool as Library
If we want to reuse this custom tool. We can click on the tool, and select Save as Library,
Here we can see all custom tools we create as .rslib
files,
B.2.4) Step4: Create the Smart Component for our Tool
Select Modeling and click on Smart Component,
And let's rename our Smart Component as "SC_VentosaTool"
Drag and Drop the Custom Tool inside the Smart Component, this will make it a Child Component to our Smart Component,
B.2.4.1) Configure the Smart Component Attributes
Now click on the Tool and change its attribute with the Set as Role option,
The Tool Component should now be under the Role category,
Now we can add more Child Components to our Smart Component,
We will require 4 additional Child Components,
To include a LogicGate (NOT), first add a regular LogicGate,
And in properties select the NOT option,
B.2.4.1) Configure the Line Sensor at TCP
Select the Line Sensor, then Go Back to the Window where we have our Tool,
Now we create a Small Cylinder by setting the Start and End points of the sensor,
We can see the sensor at the TCP,
Configuring the Digital Input of the Line Sensor
Go back to the Smart Component window, and click on "Design",
Now we create a Digital Input to tell the Tool when to attach the boxes we want to move in our palletizer,
Now we do the following connections,
We want to release the boxes from the Gripper with the Detacher
, so the logic is,
// The Detacher should execute if DI_Attach is FALSE
IF NOT DI_Attach THEN
Detacher.Execute(); // Execute Detacher logic
END_IF
And we want to attach boxes to our Gripper with the Attacher
, so the logic is,
// The Attacher should execute if the LineSensor's SensorOut is TRUE
IF LineSensor.SensorOut THEN
Attacher.Execute(); // Execute Attacher logic
END_IF
LineSensor.SensedPart()
is used to determine the target object (or Child
) for the Attacher
and Detacher
, so they know who to apply their Execute
logic.
// Set the Child for the Attacher and Detacher based on the LineSensor's SensedPart
Attacher.Child := LineSensor.SensedPart; // e.g. the box detected by sensor
Detacher.Child := LineSensor.SensedPart; // e.g. the box detected by sensor
In our case that would be the boxes we want to stack,
Finally, we just have to select the Gripper as the Attacher.Parent()
, so double click on the Attacher
to see the Properties,
Select the Tool from our project,
And close the Window,
The Parent
is now defined,
B.2.5) Step 5: Save Custom Smart Component Gripper as Library
Select the Smart Component, and Save as Library,
It will be included as another .rslib
file,
And now our Smart Component Gripper is finished,
We can close the Station and work in something else,
If we want to edit the Smart Component Gripper in the future, we can also save the Station,
It will be saved as a .rsstn
file,
DONE
C)📦➡️📦 Part 2 – Conveyor & Boxes using Smart Components
C.1) Procedure📝- How to Create a Conveyor "Smart Component" with Surface Velocity
C.1.1) Step1: Import a Conveyor From Library to an Empty Station
Now we want to create the Conveyor using Smart Component.
First, open a New Station and Import a Conveyor (950 x 4000),
Go to Home, Import Library, Equipment,
Choose the Size and click OK,
Center the Conveyor using the Set Position Tool,
Move it to the center,
C.1.2) Step2: Create the "Carrying Belt" of the Conveyor
Now, go to Modeling, Solid and select Box,
Set the size of the Box and shape it as a Conveyor Belt,
Call it "Belt" for example,
And Place it on top of the Conveyor,
C.1.3) Step3: Create the "Moving Boxes" (Big and Small Boxes)
Create a new Box,
Small Box (200x200x100):
Rename your box (e.g. Caja_pq
) and select a color for its surface,
I'll use the color orange,
Then we place the box at one end of the conveyor, use the Set Position tool,
Repeat the processes for the bigger box,
Big Box (200x200x200):
Rename it and choose the color green,
Finally place it on top of the conveyor,
Note: we can hide the bigger box for now,
C.1.3.1) Set Local Frames for our 2 Types of Boxes
Start by selecting the Set Local Origin tool in one of our boxes,
Pick the Snap End Tool,
Select the coordinates where we will apply changes and click on one edge of the box,
Once you hit Apply, you we'll see the Local Frame of the Box at the Top,
Repeat the process for the Big Box,
We are moving the Local Frame of each box, so that once we apply "Physics" to the boxes and the conveyor belt, we get a larger distance between the surface of the belt and the surface of the box. Otherwise, we sometimes get a glitch where the box traspases the conveyor belt.
C.1.4) Step4: Use Physical Properties for the Conveyor Belt
Now place a Physical Property to the Conveyor Belt for it to Interact with the boxes during Simulation.
Go to Physics --> Behavior --> Fixed,
Now we have to set the speed to the conveyor belt, use the Surface Velocity tool,
Enable velocity, and select the direction of movement, which will be along the positive X-axis.
At this point, the conveyor belt now has a set velocity for the simulation.
C.1.5) Step5: Create a Smart Component for the Conveyor
Create a New Smart Component,
Give it a Name, like SC_Conveyor
,
Drag the boxes and the conveyor into a Smart Component.
This groups them into one functional entity.
Add additional subordinate components for functionality:
- A Source for generating small boxes.
- A Source for generating large boxes.
- A Physics Controller to control starting and stopping of the conveyor.
- A lower sensor to detect small boxes on the conveyor.
- An upper sensor to detect large boxes.
- Finally, include a logic gate, which will connect and manage the control flow.
You can rename them like this:
C.1.5.1) Configure the Child Component: Box Sources
Begin with the Source for the large box (click on it to see its Properties),
Tip: Click on the View Tab to see our Scene, (we will need to click on the box soon),
Assign the large box to this source.
Using the Snap End Tool,
Set its position to the previously defined local origin
Remember... It is the Frame that was configured previously
Enable Transient and Enable dynamic transition,
so that:
- Boxes are deleted at the end of the conveyor’s simulation. (transient)
- Boxes behave with physical properties, allowing them to fall due to gravity. (dynamic)
Hide the Large Box,
And Reveal the Small Box,
Repeat the same process for the small box, ensuring to select the local origin and enable the same dynamic properties.
C.1.5.2) Configure the Child Component: Line Sensors
To position the sensors more easily, hide the conveyor frame temporarily.
We will use only the belt as reference,
Configure the lower sensor:
Using the Snap End Tool,
Define its start and end points.
Apply an Offset in X of -60mm
to ensure the sensor is slightly inside the conveyor,
And apply an Offset in Y of +50mm
adjust its height to be at the mid-level of the first box.
Once you are done, click Apply and the Line Sensor will show up,
Similarly, configure the upper sensor:
Using the Snap End Tool again,
Adjust its start and end points as well.
Use the same -60mm
offset in X, but now position it high enough (+150mm
) to avoid touching smaller boxes, ensuring it only detects larger ones.
Once the sensors are positioned,
restore the visibility of the conveyor frame.
C.1.5.3) Configure the Child Component: PhysicsControl
Select the PhysicsControl Component,
Select the conveyor object again to finalize its physics control.
Notice the Speed Parameters is already set from before.
C.1.5.4) Creating Digital Inputs and Outputs
Go to the Design Window,
Here you can see signals, inputs and outputs,
Define digital inputs for:
- Generating small boxes.
- Generating large boxes.
Define digital outputs for:
- The upper sensor to detect large boxes.
- The lower sensor to detect small boxes.
C.1.5.5) Connecting the Components
Now we wire the logic gate with the Digitial IO and the Sensors to Control the conveyor’s movement (start/stop).
Link the digital signals as follows:
- The Source components are triggered when their respective input signals are activated.
- The upper sensor output sends a signal when a large box is detected.
- The lower sensor output sends a signal when a small box is detected. But is also controls the conveyor’s speed, starting or stopping it (using the PhysicsControl Block) based on the signal status.
C.1.6) Step6: Testing and Saving the Simulation
Hide the boxes to prevent them from appearing during the initial setup.
Save the initial state of the simulation:
Name this state “Simulation Start”
and ensure it includes:
- The conveyor
- All Smart Components.
- All subordinate elements.
Prepare the simulation:
Click on I/O Simulator,
Select the IO from the Conveyor Smart Component,
We can see the IO appear,
Run the simulation:
Click on Play Simulation,
Activate the setup and observe the boxes falling onto the conveyor when you press the IO Buttons,
Watch the conveyor move the boxes while the sensors detect them.
This confirms that the physics control stops the conveyor when the sensor signals are triggered.
Note: We can Stop the Simulation,
And Reset the Simulation to the Saved initial State,
C.1.7) Step7: Saving the Station
Once the simulation is verified to work as intended,
We can Stop the Simulation,
And Reset the Simulation to the Saved initial State,
Now, we can save the entire station setup as part of the tutorial project.
DONE
D) 🦾📥📤 Part 3 – Pick & Place with Work Objects, Offsets and Digital Signals
D.1) ProcedureSSSS📝- How to Set Up a Scene with a Robot, a SC Gripper and a SC Conveyor
1. Importing the Robot Pedestal and Positioning It
- First, import a pedestal for the robot.
- Place it at the opposite end of the conveyor.
- Next, import the robot model:
- Use the robot controller named "Pick and Place".
- During setup, make sure to enable motion events in the options, as this will be used later in another section.
- Once the controller loads, move the robot:
- Place it on top of the pedestal.
- Adjust its position to make it slightly higher and rotate it as needed.
- Update the task coordinate system:
- Navigate to the robot controller, find the coordinate system settings, and apply changes to synchronize the robot’s base coordinate system.
2. Adding the Smart Components
- Drag the Smart Component created earlier (the conveyor system) and attach it to the robot.
- Import the robot controller model that will manage the robot:
- Place it beside the conveyor.
- Rotate it to align with the Pick and Place task.
- Add pallets on either side of the robot:
- Enable the workspace volume visualization to ensure the pallets are positioned correctly.
- Place one pallet on one side of the robot and another on the opposite side.
3. Assigning Physical Properties to the Pallets
- Apply physical properties to the pallets to ensure boxes don’t fall through or pass through them.
- Modify both pallets to make them rigid.
4. Adding Reference Boxes
- Create reference boxes to aid in programming trajectories:
- For a large box, place it on one pallet and mark it undetectable by the sensors to avoid interference during the Pick and Place task.
- Create a small box and place it on the other pallet. Adjust its position for alignment.
5. Adding World Objects for Calibration
- Create three World Objects for calibration and referencing:
- These will help align objects in a real-world scenario or assist in moving the conveyor.
- Assign the user coordinate system to ensure the Pick trajectory is relative to the conveyor.
- Similarly, create a new Place World Object:
- Assign it to the small pallet and link the coordinate system to a corner of the pallet.
- Repeat for the large pallet.
6. Configuring the Main Simulation Loop
- Synchronize the configuration to the controller.
- Open the Main program:
- Add a while true loop to prevent the simulation from stopping automatically, allowing continuous testing with the boxes.
7. Defining Initial Trajectories
-
Create the Home Position:
- Set it as the starting point for the robot program.
- Ensure it’s linked to the correct World Object (e.g., Work Object 0).
-
For the Pick Trajectory:
- Use the imported tool to select points:
- Define the position above the large box for the Pick operation.
- Name the points appropriately (e.g., Target Large Box).
- Adjust the tool's orientation for proper alignment.
- Use the imported tool to select points:
-
Create intermediate and higher points for transitioning between the Pick and Place operations:
- These help the robot move smoothly without collisions.
8. Adding Small Box Trajectories
- Repeat the process for the small box:
- Adjust the tool’s orientation for alignment.
- Use previously defined points to minimize redundancy and add the new Pick point for the small box.
9. Defining Place Trajectories
- Create trajectories for placing the boxes:
- For the small box, set points above the pallet and name them accordingly.
- Adjust the tool's orientation and create an intermediate transition point.
- Repeat the process for the large box, ensuring alignment with its designated pallet.
10. Synchronizing and Adding Digital Signals
- Synchronize all instructions to the controller using RAPID.
- Add digital inputs and outputs:
- For the sensors: These inputs will monitor the state of the sensors.
- For creating boxes: Digital outputs will trigger the creation of small and large boxes.
- For the vacuum tool: This output activates the vacuum during Pick and deactivates it during Place.
11. Programming the Sequences
-
Create procedures for:
- Pick and Place for the large box: Define trajectories and ensure the offsets are adjusted for stacking multiple boxes.
- Pick and Place for the small box: Use similar logic with adjustments for size and placement.
-
Add a Create Box procedure:
- Use a for loop to create a sequence of boxes:
- Create three small boxes followed by three large boxes.
- Use a delay between creations to simulate realistic spacing.
- Use a for loop to create a sequence of boxes:
12. Setting the Home Position and Main Logic
- Ensure the robot starts and ends at the Home Position:
- Add a Home instruction at the beginning and end of the Main program.
- Add a decision block (If condition) to determine which trajectory to execute:
- If only the lower sensor is active, perform the small box trajectory.
- If both sensors are active, execute the large box trajectory.
13. Final Adjustments
- Add delays (Wait Time) to ensure smooth movements during Pick and Place.
- Synchronize all configurations again and connect the controller to the Smart Components:
- Link sensors and outputs for the boxes and vacuum tool.
- Test the system:
- Verify that boxes are created automatically, the robot responds to sensors, and the Pick and Place operations execute as programmed.
14. Save the Simulation
- Reset the simulation and save the setup for future use.
E) 🚧⚠️🛑 Part 4 – Security Measures with ISO 10218, QuickStop and World Zones
E.1) ProcedureSSSS📝- How to Implement Safety Elements in RobotStudio
To implement safety elements in RobotStudio, we used these CAT models from the community graphics, such as the emergency stop button, an indicator, and a light curtain from Omron. The CAT model is available for free download.
-
Displaying the Robot's Workspace:
First, we show the robot's workspace and start importing safety elements. For example:- Place the guard around the cell. This gives our robotic cell its protective enclosure.
- Import other safety elements in .SAT format. For instance:
- Import an emergency stop button.
- Position it on the wall, check its coordinates, rotate it, and apply the changes.
- Duplicate the button to add another one, adjust its position, and place it on the station.
-
Adding a Status Indicator:
- Import a status indicator tower (also in
.SAT format
). - Fix its position using a local origin for easier manipulation. Adjust the base position and orientation to place it correctly.
- Import a status indicator tower (also in
-
Adding a Light Curtain:
- Copy and paste the light curtain onto the station. Position it at the cell entrance for pallet access. This will detect if a worker enters the cell (e.g., using a forklift) to ensure the robot halts.
- Fix the light curtain system on both sides of the cell. The setup is now ready.
-
Simulating the Light Curtain Emergency Stop:
- Create a new signal called
StopRobotEmergency
, configure it as a digital input, and add another digital input for resuming robot operations. Apply these signals and restart the controller. - Create a user signal list to interact with these signals during simulation:
- Add both signals to the list.
- In System Inputs, link the start action to the
Run
button and create a new signal for a quick stop action. Apply and restart the controller.
- Create a new signal called
-
Demonstrating the Emergency Stop:
- Disable the automatic sequence and the transition option to ensure boxes don’t disappear during the emergency stop.
- Start the simulation, create a small box, and observe the controller.
- Simulate someone entering the cell by activating the emergency stop signal. The robot will halt for safety until the worker exits, and the system is manually reactivated.
-
Collision Testing and Restricted Zones:
- Create a trajectory for testing collisions:
- Program the robot to intentionally collide with the guard using predefined points.
- Add points (e.g.,
Point1
,Point2
, etc.) and adjust the robot's position to create a trajectory that causes a collision.
- Create a work zone (WorkZone) to restrict robot movement:
- Define a tetrahedron (1m x 4m x 2m) as the restricted volume, adjust its transparency and color (red), and position it at the back of the cell.
- Use the base coordinate system to measure points for defining the restricted area.
- In RAPID, declare a variable for the stationary obstacle and create a procedure (
MyPowerOn
) to define the restricted volume. Use the measured points as inputs and apply these changes.
- Create a trajectory for testing collisions:
-
Activating the Restricted Zone:
- Link the
MyPowerOn
procedure to a PowerOn event associated with the robot. Restart the controller. - Test the trajectory again. If the tool center point (TCP) enters the restricted volume, an alert will appear, and the robot will halt before colliding with the guard. This software feature ensures the robot avoids undesired zones.
- Link the
-
Finalizing the Safety Simulation:
- Return the robot to its initial position.
- Save the simulation with all safety elements integrated into the robotic cell.
Recommended Courses
Tutoriales (Español)
https://youtube.com/playlist?list=PLVdvHpsfqw1bX194j7Slup6ri5se2668p
https://www.youtube.com/playlist?list=PLpyjNmi6BTHusr5sPuC7RiRZgZpHAPruR
Tutorials (English)
https://youtube.com/playlist?list=PL2R1JB3M1MkSZiqPzbhG92LY6UbQRnNn5 https://youtube.com/playlist?list=PLE1CU6EebvTAA2FVjCcvMgkqXY8OtvDPdZ) 🗃️ Glossary
File | Definition |
---|