Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Lab 8 – RAPID programming language

Instructor: Fernando Villalba


Assistant professor: Mario Gualsaqui – Wendy Fonseca
Group #7: Ana Andrade, Marlene Puchaicela, Dayanna Baque, Sofía Tripul, Mateo
Quizhpe
1. Objectives:

1.1. Acquire skills with the programming language used by the Robotstudio
1.2. Handle variables, functions, loops and conditionals to create routines.
1.3. Create digital inputs and outputs within procedures.

2. Introduction

The programming language is the language in which the actions to be performed


are communicated to the robot. Each robot manufacturer has its own programming
language, for example ABB's programming language is RAPID.
Within the programming language, different instructions are distinguished
depending on their function: movement instructions, entry/exit instructions and
program flow instructions.

2.1. Movement instructions


The movement instructions are those with which the robot is ordered to be in a
specific position. There are different types of movement depending on how you
want the robot to reach the demanded position.
● Linear movement: the robot draws a straight line between the current
position and the demanded position.
● Axis-to-axis movement: the robot reaches the required position quickly but
without making a specific path.

Table 1. The Rapid language for movement instructions of ABB robots

RAPID LANGUAGE FOR MOVEMENT OF ABB ROBOTS


AXIS TO AXIS MOVEMENT: MOVEJ P1,V1000,Z15,Tpinza;
LINEAR MOTION: MOVEL P1,V1000,Z15,Tpinza;
MoveL Linear movement instruction.
MoveJ Axis-to-axis movement instruction.
P1 Destination point of the movement. This must be defined in the variable
declaration section (data type: Robtarget). At one point, the X, Y and Z
coordinates are indicated where the tool tip should be located as well. as
the position of the tool.
V1000 the maximum speed with which to carry out the movement in mm / s.
Z15 precision in mm. If Z15 is indicated, the robot, once it has reached 15mm
from the destination point, will begin to execute the following
instruction. If you want the instruction to end at the point, you must set
FINE.
Tpinza the tool that the robot carries. It is the tip of this tool that will place it at
the point that has been determined.
Table 2. Offset function

Offset FUNCTION
Point2:=Offs (Point1, XOffset, YOffset, ZOffset)
Offs Returns a value of the robotarget type and accepts 4 arguments.
A robotarget (a point) and three values in mm corresponding to the offset for
the different axes.
For example:
- CONST robtarget P2: Define a point P2
- P2: = Offs (P1,5,10,15): point P2 will have the values of P1 offset 5mm
on the X axis, 10mm on the Y axis and 15mm on the Z axis
- MoveL Offs(P2,0,0,10),v1000,z50,tool1: The robot will move linearly
to point P2 but 10mm higher (offset in the Z axis)

2.2. Entry / Exit Instructions.

The robot, in addition to performing movements, governs and supervises inputs


and outputs. The robot can control digital inputs / outputs, analogy inputs /
outputs, etc.

Digital outputs are widely used to send orders to different actuators,


communication with other controllers and activation of clamps, tools, among
others. The digital inputs indicate the status of the sensors (sensors, pushbuttons),
thus depending on the status of each one of them, the desired work can be carried
out.

Table 3. The Rapid language for entry/exit instructions of ABB robots

RAPID LANGUAGE FOR ENTRY/EXIT OF ABB ROBOTS


DIGITAL OUTPUTS
SET Instruction to activate a digital output.
For example: SET DOpinza
- SET: activate a digital output.
- DOpinza: the output that will be activated.
Finally, the gripper that the robot carries will open.
RESET Instruction to deactivate a digital output.
For example: RESET DOpinza
The gripper on the robot is closed.
DIGITAL INPUTS
WAITDI Used to wait until a digital input signal is activated. It is widely used to
start a work process by means of a signal from another machine or a user
actuated pushbutton and check that the tool has closed. The robot will
not do anything else until it receives the indicated signal.
For example: WAITDI DIsensor,1
- WAITDI: Instruction to wait for a signal
- DIsensor: digital input to wait for.
- 1: the value expected to be received from the digital input. It can
be 1 or 0.
2.3. Program flow instructions

These instructions are used to manage the flow of the program. Sometimes it is
interesting that certain program fragments are repeated, are executed at certain
times or are continuously cyclical. For this reason, it is very common to use these
instructions that control the itinerary or route of the program pointer within the
program code.

Table 4. The Rapid language for program flow instructions of ABB robots

RAPID LANGUAGE FOR PROGRAM FLOW OF ABB ROBOTS


TIME-OUT INSTRUCTION
WaitTime I With this instruction the robot will wait a certain time without
performing any operation.
REPEAT INSTRUCTION
WHILE It is used when a series of instructions must be repeated as long as a
specific condition is fulfilled.
WHILE [condición]
DO
[instrucciones]
ENDWHILE
As long as the condition is met, the robot will perform all the instructions
between the WHILE and ENDWHILE over and over again. Once the
condition is not met, it will continue with the instructions that come after
the ENDWHILE.
CONDITION INSTRUCTION
IF It is used for instructions under one condition
IF [condición]
THEN
[instrucciones]
ENDIF
In case the condition is met, the robot will carry out the instructions
between the IF and the ENDIF and will continue with the instructions
that come after the ENDIF. In case the condition set is not fulfilled, the
robot will jump to the instructions after the ENDIF without performing
the ones between the IF and the ENDIF.

3. Equipment and materials

● RobotStudio ABB Software

4. Method

4.1. ACTIVITY 1: JUMPS, VARIABLES AND CONDITIONALS.

Create a route using the Robot IRB120 with the following parameters:
● The robot must have a controller and it must have "MyTool" as a tool.
● The stage must have 2 solids, a rectangle measuring 400x300x250 mm and
a cylinder with a radius of 200mm and a height of 300mm.
● Place the solids and the robot on a table.
● Create a procedure in Rapid that executes the two paths, 2 times through a
loop:
o To do this, use a count variable.
o To implement this procedure, use the FOR loop.

4.1.1. Create a workstation

​ We select the robot with which we are going to work. We click on ABB Library
🡪 IRB 120. In the pop-up window we select IRB 120 and accept.

Figure 1. IRB 120 robot selection

​ We select the robot tool: Import Library 🡪 Equipament🡪 myTool.

Figure 2. Select MyTool

​ Now we place tool in the arm: Main window 🡪 Layout toolbar 🡪 Drag MyTool to
IRB120_. In the pop-up window we select Yes and we observe that the tool is in
place.

​ We select the controller: Robot System 🡪 From layout


Figure 3. Controller selection

​ In the pop-up window: define a system name 🡪 select folder 6.08.01.00 🡪 next
🡪 select IRB120_3_58 01 🡪 next 🡪 finish. We observe that in the lower part of
the main window the Controller Status: 1/1 is green (This may take a few
minutes)
Figure 4. Controller configuration

4.1.2. Create of the solids

​ We import the table. We click on Import Library 🡪 Browser for Library… 🡪We
select the file Table.rslib.

Figure 5. Import the table

​ In the Toolbar we select Modelling 🡪 Solid🡪 Box/Cylinder


Figure 6. Create solids

​ We introduce solid parameters: reference system, position and size. Then we


select Create.

Figure 7.Solids measurements

​ If the figure is not in the desired position, we can make turns and translations
by using the tools mentioned above. Or right click on Part_1 🡪 Position 🡪 Set
Position.

Figure 8. Change position of solids

​ Change the solid name to 'Box' and ‘Cylinder’.


Figure 9. Rename solids and place in work position

4.1.3. Create path

​ Before creating a trajectory, it is necessary to define an origin, for that we are


going to create a starting point in worbj0. First, let's check that we are taking
the robot's workobject and also that the "MyTool" tool is selected. To see this,
we go to toolbar 🡪 home 🡪 parameters.

Figure 10. WorkObject and tool Selection

​ We can save the position of the robot tool. For this go to the toolbar, select
home 🡪 Path programming 🡪 Teach target. Now, we observe that within
Wobj0_, a Target_ element is created which correspond to the position saved
of the tool. We rename it as Start1.
Figure 11. Creating a target from a robot postition using "Teach Target"

​ Previously we created two solids, but it is not yet linked to a WorkObject.


To do this go to the toolbar, select Path Programming🡪 Other 🡪 Create Workobject
Figure 12.Selection of work object

​ We define the name and position of the work object 🡪 Rename


WO_Box/WO_Cylinder.
Here you should change Object Frame position. We enter the Position values
(mm). Click on accept. Remember that the positions are created in relation to
the global frame. Finally, we select create.

Figure 13. Selection of object coordinates

​ Now we are going to create points, the same ones we will use to generate the
trajectory. It is important, check that we are working on the WO_Box system.
Then, we go to the toolbar, select Home 🡪 Path programming 🡪 Target 🡪
Create Target on Edge 🡪 OK

Figure 14. Create Target on Edge

​ A new window will appear on the main tree. Here we select a top vertex of the
cube 🡪 click on create 🡪Close
And we will see how 4 Target elements appear in the main tree in WO_Box.
Figure 15. Vertex selection to generate points

​ In this case, the orientation it has would prevent the execution of the activity.
We change the orientation right click on a target 🡪 Modify Target 🡪 Rotate.
We make the necessary turns so that the robot can access the tool.

Figure 16. Tool orientation change

​ Copy the orientation carried out and Apply Orientation to the rest of the
points.
​ Now we create the path for the cylinder surface. It is important, check that we
are working on the WO_Cylinder system.
Then, we go to the toolbar, select Home 🡪 Path programming 🡪 Path 🡪
AutoPath

Figure 17.Path for the cylinder


​ A new window will appear in the main tree. We select on the surface of the
cylinder 🡪 Approximation Parameters 🡪 Circular 🡪 We leave the other
default values 🡪 Create 🡪 Close
And we will see how Target elements appear in the main tree in WO_Cylinder.

Figure 18. Creating points for the cylinder path

​ The orientation it has would prevent the execution of the activity. We change
the orientation right click on a target 🡪 Modify Target 🡪 Rotate.
We make the necessary turns so that the robot can access the tool.

Figure 19. Tool orientation change

​ Now, we connect the work object space to the solid figure. Right click on WO_,
go to attach to and choose the solid.
Figure 20. Connect workspace to solid

​ We create the trajectory: Go to main tree. Right click on Paths & procedures,
create patch. To create a movement, we drag the Targets created from wobj0,
WO_Box and WO_Cylinder to Path_. It is important to mark a path that begins
and ends at the same point.

Figure 21. Creating a path

​ We changed the precision of the trajectory. Under Path & Procedures, select
each move instruction (Path_), Right click 🡪Edit instruction 🡪 Zone 🡪 fine 🡪
Apply 🡪 Close.
Figure 22. Edit instruction Zone

​ Once the trajectories are created, we right-click over path created. Click on
auto configuration 🡪 Linear/Circular move instructions.

Figure 23.Automatic configuration selection

​ Now we synchronize with RAPID. Go to the toolbar, home 🡪 controller 🡪


Synchronize 🡪 Synchronize to RAPID. In Synchronize to RAPID window, we
select all System.

Figure 24. Synchronize with RAPID


​ To program the trajectories we will work in RAPID. In the toolbar click on
RAPID. Now, in the main tree, RAPID🡪 Sistem1 🡪 RAPID 🡪 double click on
Module1.

Figure 25. RAPID workspace

​ To make the trajectories repeat 2 times we use a FOR loop and the Count
variable

Figure 26. RAPID code for the path

​ When we have finished the changes in the RAPID script, we select Apply 🡪
Apply all. In the end, go to Access 🡪 Synchronize 🡪 Synchronize to station🡪
OK
Figure 27. Synchronize to Station

​ Finally, we obtain the simulation of the final trajectory.

Figure 28. final trajectory

4.2. ACTIVITY 2: DIGITAL INPUTS AND OUTPUTS.

Create a route using the Robot IRB120 with the following parameters:
● The robot must have a controller and it must have "MyTool" as a tool.
● The stage must have a cylinder with a radius of 100mm and a height of
300mm.
● Create two digital signals, one input and one output so that when pressing
the play button of the simulator, the robot waits for us to activate the input
signal to make a trajectory on the surface of the cylinder, at the end of the
trajectory, the output signal will be set to one.
4.2.1. Create a workstation

​ We select the robot with which we are going to work. We click on ABB Library
🡪 IRB 120. In the pop-up window we select IRB 120 and accept.

​ We select the robot tool: Import Library 🡪 Equipament🡪 myTool.

​ Now we place tool in the arm: Main window 🡪 Layout toolbar 🡪 Drag MyTool to
IRB120_. In the pop-up window we select Yes and we observe that the tool is in
place.

​ We select the controller: Robot System 🡪 From layout

Figure 29. Controller selection

​ In the pop-up window: define a system name 🡪 select folder 6.08.01.00 🡪 next
🡪 select IRB120_3_58 01 🡪 next

Figure 30. Controller setting (1)

​ In the next window: System Options 🡪 Edit 🡪 select options…


Figure 31. Controller setting (2)

⮚ We load the industrial communication card. Industrial Networks 🡪 888-2


PROFINET Controller/Device🡪 Ok 🡪 Finish. We observe that in the lower
part of the main window the Controller Status: 1/1 is green (This may take
a few minutes)

Figure 32. Load 888-2PROFINET controller/device

4.2.2. Create of the solids

​ In the Toolbar we select Modelling 🡪 Solid🡪 Cylinder

Figure 33. Create cylinder


​ We introduce solid parameters: reference system, position and size. Then we
select Create.

Figure 34. Solid measurements

​ We are going to create a starting point in worbj0. First, let's check that we are
taking the robot's workobject and also that the "MyTool" tool is selected.
To see this, we go to toolbar 🡪 home 🡪 parameters.

Figure 35. WorkObject and tool Selection

​ We can save the position of the robot tool. For this go to the toolbar, select
home 🡪 Path programming 🡪 Teach target. Now, we observe that within
Wobj0_, a Target_ element is created which correspond to the position saved
of the tool. We rename it as Start1.

​ Previously we created two solids, but it is not yet linked to a WorkObject.


To do this go to the toolbar, select Path Programming🡪 Other 🡪 Create Workobject

Figure 36. Selection of work object

​ We define the name and position of the work object 🡪 Rename WO_Cylinder. Here
you should change Object Frame position. We enter the Position values
(mm). Click on accept. Remember that the positions are created in relation to
the global frame. Finally, we select create.

Figure 37. Selection of object coordinates

​ Now we create the path for the cylinder surface. It is important, check that we
are working on the WO_Cylinder system. Then, we go to the toolbar, select
Home 🡪 Path programming 🡪 Path 🡪 AutoPath

Figure 38. Path for the cylinder

​ A new window will appear in the main tree. We select on the surface of the
cylinder 🡪 Approximation Parameters 🡪 Circular 🡪 We leave the other
default values 🡪 Create 🡪 Close. Finally, we will see how Target elements
appear in the main tree in WO_Cylinder.

Figure 39.Creating points for the cylinder path

​ The orientation it has would prevent the execution of the activity. We change
the orientation right click on a target 🡪 Modify Target 🡪 Rotate.
We make the necessary turns so that the robot can access the tool.
Figure 40. Tool orientation change

​ Copy the orientation carried out and Apply Orientation to the rest of the
points.

Figure 41.Apply Orientation

​ The trajectory was created automatically. We must check if the order is correct
and cut that the trajectory begins and ends at the same point.
Figure 42. Created path

​ We changed the precision of the trajectory. Under Path & Procedures, select
each move instruction (Path_), Right click 🡪Edit instruction 🡪 Zone 🡪 fine 🡪
Apply 🡪 Close.

Figure 43. Edit instruction Zone

​ Once the trajectories are created, we right-click over path created. Click on
auto configuration 🡪 Linear/Circular move instructions.

​ Now we synchronize with RAPID. Go to the toolbar, home 🡪 controller 🡪


Synchronize 🡪 Synchronize to RAPID. In Synchronize to RAPID window, we
select all System.

4.2.3. Create sign


​ To create the input and output signals, we select controller in the toolbar. We
select Configuration 🡪 I/O System
Figure 44. Opening the I / O system window

​ We create the input signal. Inside the Configuration- I/O System window, we
select Signal 🡪 New Signal…

Figure 45. Create new signal

​ In the pop-up window, we call the signal Input1 🡪 Type of Signal 🡪Digital
Input 🡪 Assigned to Device 🡪PN_Internal_Device🡪 Device Mapping 🡪128 🡪 Ok.
We select accept in the warning popup
Figure 46. Input signal configuration

​ We create the exit signal. Inside the Configuration- I/O System window, we
select Signal 🡪 New Signal…

Figure 47. Create new signal

​ In the pop-up window, we call the signal Exit1 🡪 Type of Signal 🡪Digital Input
🡪 Assigned to Device 🡪PN_Internal_Device🡪 Device Mapping 🡪129 🡪 Ok. We
select accept in the warning popup
Figure 48. Exit signal configuration

​ In order to work with the new signals created we have to restart the
controller. We select Controller 🡪 Controller Tools 🡪 Restart. We accept in
the pop-up window and wait for it to reload.

Figure 49. Restart controller

​ Now we open the system signal control: in the toolbar we select Simulation🡪
Monitor 🡪 I/0 Simulator

Figure 50. Open the system signal control


​ On the right of the main window the system signal controls open. We have to
configure it: Select System🡪 We select our controller System8_0_2 🡪 Filter 🡪
Device 🡪 Device 🡪 PN_Internal_Device 🡪 I / O Range 🡪 All
We can observe the signals created Input1 and Output1

Figure 51. Signals created

​ Now we synchronize with RAPID again. Go to the toolbar, home 🡪 controller


🡪 Synchronize 🡪 Synchronize to RAPID. In Synchronize to RAPID window, we
select all System.

Figure 52. Synchronize to RAPID

​ To program the trajectories, we will work in RAPID. In the toolbar click on


RAPID. Now, in the main tree, RAPID🡪 Sistem1 🡪 RAPID 🡪 double click on
Module1.

Figure 53. RAPID workspace


​ We must create a code that when activating Input1 performs the trajectory
and when the signal ends, Output1 marks one. For this we need it to detect
when Input1 is activated.

Figure 54. RAPID code for the path

​ When we have finished the changes in the RAPID script, we select Apply
🡪Apply all. In the end, go to Access 🡪 Synchronize 🡪 Synchronize to station🡪
OK

Figure 55. Synchronize to Station

​ Finally, we obtain the simulation of the final trajectory and the correct
operation of the signal control panel.

Figure 56. Final path with signal control panel


4.3. ACTIVITY 3: OFFSET FUNCTION

Create a route using the Robot IRB120 with the following parameters:
● The robot must have a controller and it must have "MyTool" as a tool.
● Create a 300x400x300 mm tetrahedron, which will support the following
solid
● Create a solid in the form of a dot matrix; 4 rows
(6m apart) x 5 columns (5cm apart).
● Create a path where the robot traverses each point
of the matrix using the Offs function (see table 2)

4.3.1. Create a workstation

​ We select the robot with which we are going to work. We click on ABB Library
🡪 IRB 120. In the pop-up window we select IRB 120 and accept.

Figure 57. IRB 120 robot selection

​ We select the robot tool: Import Library 🡪 Equipament🡪 myTool.


​ Now we place tool in the arm: Main window 🡪 Layout toolbar 🡪 Drag MyTool to
IRB120_. In the pop-up window we select Yes and we observe that the tool is in
place.

​ We select the controller: Robot System 🡪 From layout

Figure 58. Controller selection

​ In the pop-up window: define a system name 🡪 select folder 6.08.01.00 🡪 next
🡪 select IRB120_3_58 01 🡪 next 🡪 finish. We observe that in the lower part of
the main window the Controller Status: 1/1 is green (This may take a few
minutes)

4.3.2. Create of the solids


​ In the Toolbar we select Modelling 🡪 Solid🡪 Box. We introduce solid
parameters: reference system, position and size. Then we select Create.
Figure 59. Box measurements

​ We import the matrix. We click on Import Geometry🡪 Browser for Geometry…


🡪We select the file Point_Matrix.sat

Figure 60. Import point matrix

​ We set the local origin of the tool: Right click on the matrix 🡪 Modify 🡪 Set Local
Origin. We select the center of the solid.

Figure 61. Selection of local origin of matrix

​ Colocamos la matriz sobre el solido-soporte. Or right click on Part_1 🡪 Position


🡪 Set Position.
4.3.3. Create path

​ We define an origin, for that we are going to create a starting point in worbj0.
First, let's check that we are taking the robot's workobject and also that the
"MyTool" tool is selected. To see this, we go to toolbar 🡪 home 🡪 parameters.

​ We can save the position of the robot tool. For this go to the toolbar, select
home 🡪 Path programming 🡪 Teach target. Now, we observe that within
Wobj0_, a Target_ element is created which correspond to the position saved
of the tool. We rename it as Start1.

Figure 62. Create an inicial target

​ We create a point, for this exercise, we can work in wobj0. Then, we go to the
toolbar, select Home 🡪 Path programming 🡪 Target 🡪 Create Target on Edge
🡪 OK
A new window will appear above the main tree. Here we will create a point in
the center of first hole.
Figure 63. Point selection

​ In this case, the orientation it has would prevent the execution of the activity.
We change the orientation right click on a target 🡪 Modify Target 🡪 Rotate.

Figure 64. Tool orientation change

​ Now, we create the trajectory: Go to main tree. Right click on Paths &
procedures, create patch. To create a movement, we drag the Targets created
from wobj0 to Path_.
​ We changed the precision of the trajectory. Under Path & Procedures, select
each move instruction (Path_), Right click 🡪Edit instruction 🡪 Zone 🡪 fine 🡪
Apply 🡪 Close.

Figure 65. Edit instruction Zone

​ Once the trajectories are created, we right-click over path created. Click on
auto configuration 🡪 Linear/Circular move instructions.

​ Now we synchronize with RAPID. Go to the toolbar, home 🡪 controller 🡪


Synchronize 🡪 Synchronize to RAPID. In Synchronize to RAPID window, we
select all System.
Figure 66. Synchronize with RAPID

​ To program the trajectories we will work in RAPID. In the toolbar click on


RAPID. Now, in the main tree, RAPID🡪 Sistem1 🡪 RAPID 🡪 double click on
Module1.
Figure 67. RAPID workspace

⮚ We create the necessary algorithm for the trajectory. In this case we use the
offset function and the FOR loop

Figure 68.RAPID code for the path

​ When we have finished the changes in the RAPID script, we select Apply 🡪
Apply all. In the end, go to Access 🡪 Synchronize 🡪 Synchronize to station🡪
OK
Figure 69. Synchronize to station

​ Finally, we obtain the simulation of the final trajectory.


Figure 70. Final trajectory

5. Activities

5.1. Jumps and variables [Use the station of section 4.1.]


5.1.1. Add a 400x400x400 cube to the station and create a path that goes
through the vertices of the top face of the cube, and place it on the other
side of the cylinder, then create the following procedures:
⮚ Procedure 1: The trajectory of the cylinder and the cube must be
executed 3 times.
⮚ Procedure 2: The trajectory of the cylinder, rectangular prism and
cube must be executed 2 times.
⮚ Procedure 3: The trajectory of the cube and rectangular prism must be
executed 4 times.
⮚ The 3 procedures must be called in the MAIN procedure.

[Take screenshots, upload used RAPID code and record final simulation]

Figure 71. Trajectory of the robot with jumps and variables


Figure 72. Code of the trajectory of the robot with jumps and variables
5.2. Digital inputs and outputs
5.2.1.Input [Use the station of the section 4.2.]:
⮚ Create a second cylinder with a path on the top face edges.
⮚ Add a second digital input. When it is activated, it performs the
trajectory of the second cylinder. And when it is deactivated, it stops.
⮚ Add a third digital input. When activated, the robot performs the
trajectory of cylinder 1 and cylinder 2. If digital inputs 2 and 3 are
activated before starting the simulation, input 3 will have priority.
[Take screenshots, upload used RAPID code and record final simulation]

Figure 73: Station of section 4.2

Figure 74. Simulation of input1 performing path10 on the top face edges of the first cylinder
Figure 75. Simulation of input2 performing path20 on the top face edges of the second cylinder

Figure 76. Performing Input 3 following the trajectory of path 10 and path 20

Figure 77. Performing Input 3 when input2 and input3 are activated.
Figure 78. Code of the trayectory of the robot with input

5.2.2. Output [Create a new station]:


⮚ Create a new workstation, load the IRB120 robot and its controller,
then load the MyTool.
⮚ Create a rectangular prism, generate its trajectory and place it close
to the robot.
⮚ Create two digital signals, one input (IN_1) and one output (OUT_1) so
that when you press the play button of the simulator, the robot waits
for us to activate the IN_1 signal to perform a trajectory on the edge
of the rectangular prism, at the end of the trajectory, the OUT_1 signal
will be set to one.
You will need to use a loop in the Rapid program to detect when
INPUT1 is activated. Use the example code to accomplish this activity
⮚ Create a second digital output. This must be activated when it touches
the third edge of the rectangular prism.
⮚ Create a cube, and place it near the robot. Then, generate a
procedure that makes the path over the top edges of the cube and
continues along the path of the prism. Create a third digital output
that is activated when it hits the fourth vertex of the top face of the
cube.
[Take screenshots, upload used RAPID code and record final simulation]

Figure 79. The picture shows the whole simulation in prism rectangular.
Figure 80. Code for the robot movement through prism

Figure 81. Robot with prism and cube


Figure 82. Code for the robot movement through prism and cube

5.3. OFFSET function [Use the station of the point 4.3. as template]
5.3.1. Consider that the approach to each point will be made by an offset of
4cm in the Z axis. That is, before reaching each point, the tool will be
located 4cm above that point and will go down linearly to the point, will
go up again linearly 4cm and will look for a new point in the same way.
According to these conditions implement the following procedures:

5.3.1.1. Procedure 1: Move through each point of row 2 and 4 of


the matrix. ]
[Take screenshots, upload used RAPID code and record final simulation]

Figure 83. Trajectory of the robot movement through each point of row 2 and 4 of the matrix

Figure 84. Code for the robot movement through each point of row 2 and 4 of the matrix
5.3.1.2. Procedure 2: Move through each point of column 1, 3 and
5 of the matrix.

[Take screenshots, upload used RAPID code and record final simulation]

Figure 85. Trajectory of the robot movement through each point of column 1, 3 and 5 of the matrix.
Figure 86. Code for the robot movement through each point of column 1, 3 and 5 of the matrix.

Conclusions
Finally, this practice carried out in the RobotStudio software allowed us to acquire and
improve our abilities and skills with the programming language used by Robotstudio.
Specifically in activity 1 it allowed us to improve our programming skills with loops, such as the
for that allows us to perform the same activity n times depending on the activity that is being
carried out. In this way, it is shown that programming and robotics work together in real life
applications. Since in the industry where robotics comes into play, robots perform the same
activity n times depending on the task they are executing.
Moreover, we can configure I/O for a robot controller system in RobotStudio. The robot can be
equipped with a number of digital and analog user signals that can be read and changed from
within the program. The signal names are defined in the system parameters. These names are
always available in the program for reading or setting I/O operations. To activity 5.2, we used a
set of commands to activate or inactivate input or output signals. For example, set and reset
can be used to change the value of the output signal and WaitDi can be used to wait until a
digital input signal is activated or for testing inputs.
For activity 5.2.2, when generating the simulation errors, but the program ignored these errors
and could go through the surfaces normally. It is important to highlight that the inputs and
outputs helped to synchronize and make the simulation independent without the need for
manual control. thus improving the automation of the robot.
In activity 5.3, an OFFSET function was carried out where it was taken into account that the
approach to each point will be carried out through a 4 cm offset in the Z axis. That is, before
reaching each point, the tool will be located 4 cm above that point and it will go down linearly
to the point, it will rise again linearly 4cm and it will look for a new point in the same way. It
was possible to create a function with digital inputs and outputs using instructions like MoveL
for linear movement, v1000 for the maximum speed that can be carried and offs that returns a
value of the robotarget type and accepts 4 arguments: a robotarget and three values ​in mm
corresponding to the offset for the different axes.

References

1. Tutorials for RobotStudio. (s. f.). ABB.


https://new.abb.com/products/robotics/robotstudio/tutorials
2. Liqiu, Z., Juan, A., Ronghao, Z., & Hairong, M. (2021, May). Trajectory Planning and
Simulation of Industrial Robot Based on MATLAB and RobotStudio. In 2021 IEEE 4th
International Conference on Electronics Technology (ICET) (pp. 910-914). IEEE.

You might also like